summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr Khomenko <Volodymyr_Khomenko@dell.com>2010-10-28 09:34:05 +0200
committerVolker Lendecke <vl@samba.org>2010-10-28 10:11:29 +0200
commit97595597a32900aa064b88f7b5473df3064a6ee4 (patch)
treecb3918796aec5252ede712a1027b6588d70b7cf9
parentb73a05e4e184238614d73c1519f2880cd946908d (diff)
downloadsamba-97595597a32900aa064b88f7b5473df3064a6ee4.tar.gz
samba-97595597a32900aa064b88f7b5473df3064a6ee4.tar.bz2
samba-97595597a32900aa064b88f7b5473df3064a6ee4.zip
s3: Fix bug 7759
-rw-r--r--source3/modules/vfs_default.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 2cbb84cad0..6f5b09a5a9 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -754,25 +754,27 @@ static int vfswrap_ntimes(vfs_handle_struct *handle,
goto out;
}
- if (null_timespec(ft->atime)) {
- ft->atime= smb_fname->st.st_ex_atime;
- }
+ if (ft != NULL) {
+ if (null_timespec(ft->atime)) {
+ ft->atime= smb_fname->st.st_ex_atime;
+ }
- if (null_timespec(ft->mtime)) {
- ft->mtime = smb_fname->st.st_ex_mtime;
- }
+ if (null_timespec(ft->mtime)) {
+ ft->mtime = smb_fname->st.st_ex_mtime;
+ }
- if (!null_timespec(ft->create_time)) {
- set_create_timespec_ea(handle->conn,
- smb_fname,
- ft->create_time);
- }
+ if (!null_timespec(ft->create_time)) {
+ set_create_timespec_ea(handle->conn,
+ smb_fname,
+ ft->create_time);
+ }
- if ((timespec_compare(&ft->atime,
- &smb_fname->st.st_ex_atime) == 0) &&
- (timespec_compare(&ft->mtime,
- &smb_fname->st.st_ex_mtime) == 0)) {
- return 0;
+ if ((timespec_compare(&ft->atime,
+ &smb_fname->st.st_ex_atime) == 0) &&
+ (timespec_compare(&ft->mtime,
+ &smb_fname->st.st_ex_mtime) == 0)) {
+ return 0;
+ }
}
#if defined(HAVE_UTIMENSAT)