Fix bug 5185: repeated calls to smbc_getxattr() lose sid-name mapping
[ira/wip.git] / source3 / include / libsmb_internal.h
index 5aca12554f31761ae11edb25ec3db2b7097322eb..6c7dc80da8d9922830f602f0ba96c1f5746235a5 100644 (file)
 
 
 struct _SMBCSRV {
-       struct cli_state cli;
+       struct cli_state *cli;
        dev_t dev;
-       BOOL no_pathinfo;
-       BOOL no_pathinfo2;
-        BOOL no_nt_session;
+       bool no_pathinfo;
+       bool no_pathinfo2;
+        bool no_nt_session;
+        POLICY_HND pol;
 
        SMBCSRV *next, *prev;
        
@@ -37,7 +38,7 @@ struct _SMBCFILE {
        char *fname;
        SMB_OFF_T offset;
        struct _SMBCSRV *srv;
-       BOOL file;
+       bool file;
        struct smbc_dir_list *dir_list, *dir_end, *dir_next;
        int dir_type, dir_error;
 
@@ -50,7 +51,7 @@ struct smbc_internal_data {
        /*
          * Is this handle initialized ? 
         */
-       BOOL    _initialized;
+       bool    _initialized;
 
         /* dirent pointer location
          *
@@ -78,7 +79,22 @@ struct smbc_internal_data {
         /*
          * Log to standard error instead of the more typical standard output
          */
-        BOOL _debug_stderr;
+        bool _debug_stderr;
+
+        /*
+         * Support "Create Time" in get/set with the *xattr() functions, if
+         * true.  This replaces the dos attribute strings C_TIME, A_TIME and
+         * M_TIME with CHANGE_TIME, ACCESS_TIME and WRITE_TIME, and adds
+         * CREATE_TIME.  Default is FALSE, i.e.  to use the old-style shorter
+         * names and to not support CREATE time, for backward compatibility.
+         */
+        bool _full_time_names;
+
+        /*
+         * The share mode of a file being opened.  To match POSIX semantics
+         * (and maintain backward compatibility), DENY_NONE is the default.
+         */
+         smbc_share_mode _share_mode;
 
         /*
          * Authentication function which includes the context.  This will be
@@ -91,6 +107,13 @@ struct smbc_internal_data {
          * and retrieved with smbc_option_set() and smbc_option_get().
          */
         void * _user_data;
+
+        /*
+         * Should we attempt UNIX smb encryption ? 
+         * Set to 0 if we should never attempt, set to 1 if
+         * encryption requested, set to 2 if encryption required.
+         */
+        int _smb_encryption_level;
 };