From c5a9c71b2ebd919cac059883a54813fd4a0d6355 Mon Sep 17 00:00:00 2001 From: olivier Date: Wed, 10 Nov 2010 17:48:06 +0100 Subject: [PATCH] switch from mtime to ctime which is more reliable if files can be accessed outside samba as well --- source3/modules/vfs_scannedonly.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c index 3c30b07..1972735 100644 --- a/source3/modules/vfs_scannedonly.c +++ b/source3/modules/vfs_scannedonly.c @@ -426,8 +426,8 @@ static bool scannedonly_allow_access(vfs_handle_struct * handle, retval = SMB_VFS_NEXT_STAT(handle, cache_smb_fname); } if (retval == 0 && VALID_STAT(cache_smb_fname->st)) { - if (timespec_is_newer(&smb_fname->st.st_ex_mtime, - &cache_smb_fname->st.st_ex_mtime)) { + if (timespec_is_newer(&smb_fname->st.st_ex_ctime, + &cache_smb_fname->st.st_ex_ctime)) { talloc_free(cache_smb_fname); return true; } @@ -489,8 +489,8 @@ static bool scannedonly_allow_access(vfs_handle_struct * handle, } /* still no cachefile, or still too old, return 0 */ if (retval != 0 - || !timespec_is_newer(&smb_fname->st.st_ex_mtime, - &cache_smb_fname->st.st_ex_mtime)) { + || !timespec_is_newer(&smb_fname->st.st_ex_ctime, + &cache_smb_fname->st.st_ex_ctime)) { DEBUG(SCANNEDONLY_DEBUG, ("retval=%d, return 0\n",retval)); return false; -- 1.5.6.5