#define LOOKUP_NAME_GROUP 0x00000004 /* (unused) This is a NASTY hack for
valid users = @foo where foo also
exists in as user. */
-#define LOOKUP_NAME_EXPLICIT 0x00000008 /* Only include
- explicitly mapped names and not
- the Unix {User,Group} domain */
+#define LOOKUP_NAME_NO_NSS 0x00000008 /* no NSS calls to avoid
+ winbind recursions */
#define LOOKUP_NAME_BUILTIN 0x00000010 /* builtin names */
#define LOOKUP_NAME_WKN 0x00000020 /* well known names */
#define LOOKUP_NAME_DOMAIN 0x00000040 /* only lookup own domain */
#include "librpc/gen_ndr/spoolss.h"
#include "librpc/gen_ndr/dcerpc.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
+#include "librpc/gen_ndr/ntlmssp.h"
struct lsa_dom_info {
bool valid;
struct notify_change_buf *notify;
struct files_struct *base_fsp; /* placeholder for delete on close */
+
+ struct dptr_struct *dptr;
} files_struct;
#include "ntquotas.h"
typedef struct connection_struct {
struct connection_struct *next, *prev;
+ struct smbd_server_connection *sconn; /* can be NULL */
unsigned cnum; /* an index passed over the wire */
struct share_params *params;
bool force_user;
struct vuid_cache vuid_cache;
- struct dptr_struct *dirptr;
bool printer;
bool ipc;
bool read_only; /* Attributes for the current user of the share. */
bool admin_user; /* Attributes for the current user of the share. */
- char *dirpath;
+ /* Does this filesystem honor
+ sub second timestamps on files
+ and directories when setting time ? */
+ enum timestamp_set_resolution ts_res;
char *connectpath;
char *origpath;
* state information for async smb handling
*/
void *async_priv;
+
+ bool done;
};
/* Defines for the sent_oplock_break field above. */
/* Mapping of generic access rights for files to specific rights. */
/* This maps to 0x1F01FF */
-#define FILE_GENERIC_ALL (STANDARD_RIGHTS_REQUIRED_ACCESS| SYNCHRONIZE_ACCESS|FILE_ALL_ACCESS)
+#define FILE_GENERIC_ALL (STANDARD_RIGHTS_REQUIRED_ACCESS|\
+ SYNCHRONIZE_ACCESS|\
+ FILE_ALL_ACCESS)
/* This maps to 0x120089 */
-#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ_ACCESS|FILE_READ_DATA|FILE_READ_ATTRIBUTES|\
- FILE_READ_EA|SYNCHRONIZE_ACCESS)
+#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ_ACCESS|\
+ FILE_READ_DATA|\
+ FILE_READ_ATTRIBUTES|\
+ FILE_READ_EA|\
+ SYNCHRONIZE_ACCESS)
/* This maps to 0x120116 */
-#define FILE_GENERIC_WRITE (STD_RIGHT_READ_CONTROL_ACCESS|FILE_WRITE_DATA|FILE_WRITE_ATTRIBUTES|\
- FILE_WRITE_EA|FILE_APPEND_DATA|SYNCHRONIZE_ACCESS)
-
-#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE_ACCESS|FILE_READ_ATTRIBUTES|\
- FILE_EXECUTE|SYNCHRONIZE_ACCESS)
+#define FILE_GENERIC_WRITE (STD_RIGHT_READ_CONTROL_ACCESS|\
+ FILE_WRITE_DATA|\
+ FILE_WRITE_ATTRIBUTES|\
+ FILE_WRITE_EA|\
+ FILE_APPEND_DATA|\
+ SYNCHRONIZE_ACCESS)
+
+#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE_ACCESS|\
+ FILE_READ_ATTRIBUTES|\
+ FILE_EXECUTE|\
+ SYNCHRONIZE_ACCESS)
/* Share specific rights. */
#define SHARE_ALL_ACCESS FILE_GENERIC_ALL
#define FILE_DIRECTORY_FILE 0x0001
#define FILE_WRITE_THROUGH 0x0002
#define FILE_SEQUENTIAL_ONLY 0x0004
+#define FILE_NO_INTERMEDIATE_BUFFERING 0x0008
+#define FILE_SYNCHRONOUS_IO_ALERT 0x0010 /* may be ignored */
+#define FILE_SYNCHRONOUS_IO_NONALERT 0x0020 /* may be ignored */
#define FILE_NON_DIRECTORY_FILE 0x0040
+#define FILE_CREATE_TREE_CONNECTION 0x0080 /* ignore, should be zero */
+#define FILE_COMPLETE_IF_OPLOCKED 0x0100 /* ignore, should be zero */
#define FILE_NO_EA_KNOWLEDGE 0x0200
-#define FILE_EIGHT_DOT_THREE_ONLY 0x0400
+#define FILE_EIGHT_DOT_THREE_ONLY 0x0400 /* aka OPEN_FOR_RECOVERY: ignore, should be zero */
#define FILE_RANDOM_ACCESS 0x0800
#define FILE_DELETE_ON_CLOSE 0x1000
#define FILE_OPEN_BY_FILE_ID 0x2000
+#define FILE_OPEN_FOR_BACKUP_INTENT 0x4000
+#define FILE_NO_COMPRESSION 0x8000
+#define FILE_RESERVER_OPFILTER 0x00100000 /* ignore, should be zero */
+#define FILE_OPEN_REPARSE_POINT 0x00200000
+#define FILE_OPEN_NO_RECALL 0x00400000
+#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 /* ignore should be zero */
#define NTCREATEX_OPTIONS_MUST_IGNORE_MASK (0x008F0480)
/* TCONX Flag (smb_vwv2). */
#define TCONX_FLAG_EXTENDED_RESPONSE 0x8
+/* File Status Flags. See:
+
+http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx
+*/
+
+#define NO_EAS 0x1
+#define NO_SUBSTREAMS 0x2
+#define NO_REPARSETAG 0x4
+
/* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
#define CAP_RAW_MODE 0x0001
#define SAMBA_XATTR_DOS_ATTRIB "user.DOSATTRIB"
/* Prefix for DosStreams in the vfs_streams_xattr module */
#define SAMBA_XATTR_DOSSTREAM_PREFIX "user.DosStream."
+/* Prefix for DOS timestamps. */
+#define SAMBA_XATTR_DOSTIMESTAMPS "user.DosTimestamps"
#define UUID_SIZE 16
struct smb_file_time {
struct timespec mtime;
struct timespec atime;
+ struct timespec ctime;
struct timespec create_time;
};
* unix_convert_flags
*/
#define UCF_SAVE_LCOMP 0x00000001
-#define UCF_ALLOW_WCARD_LCOMP 0x00000002
+#define UCF_ALWAYS_ALLOW_WCARD_LCOMP 0x00000002
+#define UCF_COND_ALLOW_WCARD_LCOMP 0x00000004
/*
* smb_filename