mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
switch from mtime to ctime which is more reliable if files can be accessed outside samba as well
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Nov 20 03:07:04 CET 2010 on sn-devel-104
This commit is contained in:
parent
2b788aa6ce
commit
817ee96277
@ -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;
|
||||
}
|
||||
@ -488,8 +488,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user