Write times code update.
[amitay/samba.git] / source3 / include / smb.h
index 5248fd2725b8be6bb5354d647a2fc907e47830e6..d450eb51fad54fb3d9236bee93a81f56b687eea6 100644 (file)
@@ -173,40 +173,6 @@ typedef uint32 codepoint_t;
 
 /* pipe string names */
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
-#define PIPE_SRVSVC   "\\PIPE\\srvsvc"
-#define PIPE_SAMR     "\\PIPE\\samr"
-#define PIPE_WINREG   "\\PIPE\\winreg"
-#define PIPE_WKSSVC   "\\PIPE\\wkssvc"
-#define PIPE_NETLOGON "\\PIPE\\NETLOGON"
-#define PIPE_NTLSA    "\\PIPE\\ntlsa"
-#define PIPE_NTSVCS   "\\PIPE\\ntsvcs"
-#define PIPE_LSASS    "\\PIPE\\lsass"
-#define PIPE_LSARPC   "\\PIPE\\lsarpc"
-#define PIPE_SPOOLSS  "\\PIPE\\spoolss"
-#define PIPE_NETDFS   "\\PIPE\\netdfs"
-#define PIPE_ECHO     "\\PIPE\\rpcecho"
-#define PIPE_SHUTDOWN "\\PIPE\\initshutdown"
-#define PIPE_EPM      "\\PIPE\\epmapper"
-#define PIPE_SVCCTL   "\\PIPE\\svcctl"
-#define PIPE_EVENTLOG "\\PIPE\\eventlog"
-
-#define PIPE_NETLOGON_PLAIN "\\NETLOGON"
-
-#define PI_LSARPC              0
-#define PI_DSSETUP             1
-#define PI_SAMR                        2
-#define PI_NETLOGON            3
-#define PI_SRVSVC              4
-#define PI_WKSSVC              5
-#define PI_WINREG              6
-#define PI_SPOOLSS             7
-#define PI_NETDFS              8
-#define PI_RPCECHO             9
-#define PI_INITSHUTDOWN                10
-#define PI_SVCCTL              11
-#define PI_EVENTLOG            12
-#define PI_NTSVCS              13
-#define PI_MAX_PIPES           14
 
 /* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */
 typedef uint64_t NTTIME;
@@ -307,10 +273,13 @@ extern const DATA_BLOB data_blob_null;
 #include "librpc/gen_ndr/netlogon.h"
 #include "librpc/gen_ndr/samr.h"
 #include "librpc/gen_ndr/dssetup.h"
+#include "librpc/gen_ndr/epmapper.h"
 #include "librpc/gen_ndr/libnet_join.h"
 #include "librpc/gen_ndr/krb5pac.h"
 #include "librpc/gen_ndr/ntsvcs.h"
 #include "librpc/gen_ndr/nbt.h"
+#include "librpc/gen_ndr/drsuapi.h"
+#include "librpc/gen_ndr/drsblobs.h"
 
 struct lsa_dom_info {
        bool valid;
@@ -372,10 +341,10 @@ typedef struct nt_user_token {
        SE_PRIV privileges;
 } NT_USER_TOKEN;
 
-typedef struct _unix_token {
+typedef struct unix_user_token {
        uid_t uid;
        gid_t gid;
-       int ngroups;
+       size_t ngroups;
        gid_t *groups;
 } UNIX_USER_TOKEN;
 
@@ -487,7 +456,6 @@ typedef struct files_struct {
        uint32 access_mask;             /* NTCreateX access bits (FILE_READ_DATA etc.) */
        uint32 share_access;            /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
 
-       bool update_write_time_triggered;
        struct timed_event *update_write_time_event;
        bool update_write_time_on_close;
        struct timespec close_write_time;
@@ -515,7 +483,7 @@ typedef struct files_struct {
        char *fsp_name;
 
        struct vfs_fsp_data *vfs_extension;
-       FAKE_FILE_HANDLE *fake_file_handle;
+       struct fake_file_handle *fake_file_handle;
 
        struct notify_change_buf *notify;
 
@@ -526,8 +494,8 @@ typedef struct files_struct {
 #include "sysquotas.h"
 
 struct vuid_cache_entry {
-       uint16 vuid;
        struct auth_serversupplied_info *server_info;
+       uint16_t vuid;
        bool read_only;
        bool admin_user;
 };
@@ -624,9 +592,12 @@ typedef struct connection_struct {
        struct vfs_ops vfs_opaque;                      /* OPAQUE Filesystem operations */
        struct vfs_handle_struct *vfs_handles;          /* for the new plugins */
 
+       /*
+        * This represents the user information on this connection. Depending
+        * on the vuid using this tid, this might change per SMB request.
+        */
        struct auth_serversupplied_info *server_info;
 
-       char *user; /* name of user who *opened* this connection */
        char client_address[INET6_ADDRSTRLEN]; /* String version of client IP address. */
 
        uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */
@@ -1358,12 +1329,19 @@ struct bitmap {
 #define FILE_DELETE_ON_CLOSE      0x1000
 #define FILE_OPEN_BY_FILE_ID     0x2000
 
-/* Private create options used by the ntcreatex processing code. From Samba4. */
-#define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS     0x01000000
-#define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB     0x02000000
+#define NTCREATEX_OPTIONS_MUST_IGNORE_MASK      (0x008F0480)
+
+#define NTCREATEX_OPTIONS_INVALID_PARAM_MASK    (0xFF100030)
+
+/*
+ * Private create options used by the ntcreatex processing code. From Samba4.
+ * We reuse some ignored flags for private use.
+ */
+#define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS     0x00010000
+#define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB     0x00020000
 
 /* Private options for streams support */
-#define NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE 0x04000000
+#define NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE 0x00040000
 
 /* Responses when opening a file. */
 #define FILE_WAS_SUPERSEDED 0
@@ -1700,7 +1678,8 @@ minimum length == 18.
 
 enum smbd_capability {
     KERNEL_OPLOCK_CAPABILITY,
-    DMAPI_ACCESS_CAPABILITY
+    DMAPI_ACCESS_CAPABILITY,
+    LEASE_CAPABILITY
 };
 
 /* if a kernel does support oplocks then a structure of the following
@@ -1837,6 +1816,7 @@ typedef struct _smb_iconv_t {
 #ifndef LDAP_PORT
 #define LDAP_PORT      389
 #endif
+#define LDAP_GC_PORT    3268
 
 /* used by the IP comparison function */
 struct ip_service {