summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@us.ibm.com>2011-11-29 13:23:29 -0700
committerChristian Ambach <ambi@samba.org>2012-02-10 18:10:43 +0100
commit8ce9982be9dac71bbfc109e7f0c43aec94850c89 (patch)
tree3ea9b1e5d9a2ed14cdc89ed399d2af7a3b609559 /source3
parent318346a9373df9b16c436b8539362ff8d341960e (diff)
downloadsamba-8ce9982be9dac71bbfc109e7f0c43aec94850c89.tar.gz
samba-8ce9982be9dac71bbfc109e7f0c43aec94850c89.tar.bz2
samba-8ce9982be9dac71bbfc109e7f0c43aec94850c89.zip
s3:vfs_gpfs:Fix query of creation time from GPFS
Setting the creation time through SetFileTime on a GPFS file system and querying it with GetFileTime shows a mismatch. The vfs_gpfs module first retrieves the information from the operating system and the flag st_ex_calculated_birthtime is set to false. When vfs_gpfs retrieves the birthtime from GPFS the flag st_ex_calculated_birthtime has to be set to true. Otherwise the birth time will get overwritten by a call to update_stat_ex_mtime, reporting the wrong time to a client system. Signed-off-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 8400c50d2e..bf47ee52f2 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1131,6 +1131,7 @@ static int vfs_gpfs_stat(struct vfs_handle_struct *handle,
ret = get_gpfs_winattrs(discard_const_p(char, fname), &attrs);
TALLOC_FREE(fname);
if (ret == 0) {
+ smb_fname->st.st_ex_calculated_birthtime = false;
smb_fname->st.st_ex_btime.tv_sec = attrs.creationTime.tv_sec;
smb_fname->st.st_ex_btime.tv_nsec = attrs.creationTime.tv_nsec;
smb_fname->st.vfs_private = attrs.winAttrs;
@@ -1162,6 +1163,7 @@ static int vfs_gpfs_fstat(struct vfs_handle_struct *handle,
ret = smbd_fget_gpfs_winattrs(fsp->fh->fd, &attrs);
if (ret == 0) {
+ sbuf->st_ex_calculated_birthtime = false;
sbuf->st_ex_btime.tv_sec = attrs.creationTime.tv_sec;
sbuf->st_ex_btime.tv_nsec = attrs.creationTime.tv_nsec;
}
@@ -1197,6 +1199,7 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle,
ret = get_gpfs_winattrs(discard_const_p(char, path), &attrs);
TALLOC_FREE(path);
if (ret == 0) {
+ smb_fname->st.st_ex_calculated_birthtime = false;
smb_fname->st.st_ex_btime.tv_sec = attrs.creationTime.tv_sec;
smb_fname->st.st_ex_btime.tv_nsec = attrs.creationTime.tv_nsec;
smb_fname->st.vfs_private = attrs.winAttrs;