s3: Restore "fake directory create times" as a share parameter
authorVolker Lendecke <vl@samba.org>
Fri, 27 Nov 2009 14:44:50 +0000 (15:44 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 29 Nov 2009 10:22:05 +0000 (11:22 +0100)
docs-xml/smbdotconf/misc/fakedirectorycreatetimes.xml
source3/include/proto.h
source3/modules/vfs_default.c
source3/param/loadparm.c

index 7c8807e332a55c6d26fc43f1d1cef7569242b85d..974b6f0f30c12ad1160dcae7690dba50efd3d101 100644 (file)
@@ -1,5 +1,5 @@
 <samba:parameter name="fake directory create times"
-                context="G"
+                context="S"
                 type="boolean"
                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
index a2d0397d4efe873f39cc35f70a06355336d9c104..f0ce7a32f8293adaa89f67bb0cf6cc87419d92aa 100644 (file)
@@ -4210,7 +4210,7 @@ bool lp_recursive_veto_delete(int );
 bool lp_dos_filemode(int );
 bool lp_dos_filetimes(int );
 bool lp_dos_filetime_resolution(int );
-bool lp_fake_dir_create_times(void);
+bool lp_fake_dir_create_times(int);
 bool lp_blocking_locks(int );
 bool lp_inherit_perms(int );
 bool lp_inherit_acls(int );
index cfa10692eccafeaf00df5377802952b4a48d7fb2..9abf792769491bb2ce06c8d4180fd29c67010267 100644 (file)
@@ -616,7 +616,7 @@ static int vfswrap_stat(vfs_handle_struct *handle,
        }
 
        result = sys_stat(smb_fname->base_name, &smb_fname->st,
-                         lp_fake_dir_create_times());
+                         lp_fake_dir_create_times(SNUM(handle->conn)));
  out:
        END_PROFILE(syscall_stat);
        return result;
@@ -628,7 +628,7 @@ static int vfswrap_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUC
 
        START_PROFILE(syscall_fstat);
        result = sys_fstat(fsp->fh->fd,
-                          sbuf, lp_fake_dir_create_times());
+                          sbuf, lp_fake_dir_create_times(SNUM(handle->conn)));
        END_PROFILE(syscall_fstat);
        return result;
 }
@@ -646,7 +646,7 @@ static int vfswrap_lstat(vfs_handle_struct *handle,
        }
 
        result = sys_lstat(smb_fname->base_name, &smb_fname->st,
-                          lp_fake_dir_create_times());
+                          lp_fake_dir_create_times(SNUM(handle->conn)));
  out:
        END_PROFILE(syscall_lstat);
        return result;
index ce235edf5b2bcb0a787cab43cb23c75a789e4acd..29e3a2509f382cc40478ed60c283620071e2cf02 100644 (file)
@@ -357,7 +357,6 @@ struct global {
        int cups_connection_timeout;
        char *szSMBPerfcountModule;
        bool bMapUntrustedToDomain;
-       bool bFakeDirCreateTimes;
 };
 
 static struct global Globals;
@@ -475,6 +474,7 @@ struct service {
        bool bDosFilemode;
        bool bDosFiletimes;
        bool bDosFiletimeResolution;
+       bool bFakeDirCreateTimes;
        bool bBlockingLocks;
        bool bInheritPerms;
        bool bInheritACLS;
@@ -618,6 +618,7 @@ static struct service sDefault = {
        False,                  /* bDosFilemode */
        True,                   /* bDosFiletimes */
        False,                  /* bDosFiletimeResolution */
+       False,                  /* bFakeDirCreateTimes */
        True,                   /* bBlockingLocks */
        False,                  /* bInheritPerms */
        False,                  /* bInheritACLS */
@@ -4301,8 +4302,8 @@ static struct parm_struct parm_table[] = {
        {
                .label          = "fake directory create times",
                .type           = P_BOOL,
-               .p_class        = P_GLOBAL,
-               .ptr            = &Globals.bFakeDirCreateTimes,
+               .p_class        = P_LOCAL,
+               .ptr            = &sDefault.bFakeDirCreateTimes,
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
@@ -5629,7 +5630,7 @@ FN_LOCAL_BOOL(lp_recursive_veto_delete, bDeleteVetoFiles)
 FN_LOCAL_BOOL(lp_dos_filemode, bDosFilemode)
 FN_LOCAL_BOOL(lp_dos_filetimes, bDosFiletimes)
 FN_LOCAL_BOOL(lp_dos_filetime_resolution, bDosFiletimeResolution)
-FN_GLOBAL_BOOL(lp_fake_dir_create_times, &Globals.bFakeDirCreateTimes)
+FN_LOCAL_BOOL(lp_fake_dir_create_times, bFakeDirCreateTimes)
 FN_LOCAL_BOOL(lp_blocking_locks, bBlockingLocks)
 FN_LOCAL_BOOL(lp_inherit_perms, bInheritPerms)
 FN_LOCAL_BOOL(lp_inherit_acls, bInheritACLS)