summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-27 15:44:50 +0100
committerKarolin Seeger <kseeger@samba.org>2009-12-08 09:15:09 +0100
commit1041e476a4e6d103d8a700af8a279380713619a1 (patch)
treeb2f77b8af8ae7624cdf6582fbce5f3e3c9d5ecfe /source3
parent1c2dad7b288b279fad9cb1bb9ddc07cdfe29cf0a (diff)
downloadsamba-1041e476a4e6d103d8a700af8a279380713619a1.tar.gz
s3: Restore "fake directory create times" as a share parameter
(cherry picked from commit bd652cce8f38f33b1f36cec4099c61adf67d7dbf)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/modules/vfs_default.c6
-rw-r--r--source3/param/loadparm.c9
3 files changed, 9 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1d6b5f0f594..52808f6d4e4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4197,7 +4197,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 );
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cfa10692ecc..9abf7927694 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -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;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 223fc71661c..9da853f75e3 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -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)