summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-08-12 13:00:54 -0700
committerJeremy Allison <jra@samba.org>2009-08-12 13:00:54 -0700
commitd6270df748dcfd8d5a02c328518c2332da8fbed5 (patch)
tree7e921433a6e293f54fac3c0405b42be36ff7ac78 /source3/smbd/open.c
parent1ddd10b56aea663b06768638d83e3bdcfea9ec89 (diff)
downloadsamba-d6270df748dcfd8d5a02c328518c2332da8fbed5.tar.gz
samba-d6270df748dcfd8d5a02c328518c2332da8fbed5.tar.bz2
samba-d6270df748dcfd8d5a02c328518c2332da8fbed5.zip
Add "store create time" parameter (docs to follow)
that stores the create time in the user.DosTimestamps EA. Jeremy.
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 62a0fa73b7..63982341ac 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3280,6 +3280,15 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
SMB_VFS_FSTAT(fsp, &smb_fname->st);
fsp->fsp_name->st = smb_fname->st;
}
+
+ /* Try and make a create timestamp, if required. */
+ if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
+ if (lp_store_create_time(SNUM(conn))) {
+ set_create_timespec_ea(conn, fsp,
+ smb_fname, smb_fname->st.st_ex_btime);
+ }
+ }
+
return NT_STATUS_OK;
fail: