summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-09-10 14:54:25 -0700
committerJeremy Allison <jra@samba.org>2008-09-10 14:54:25 -0700
commitcb40b1ae83cf689e95e03f2d2d3fccc666dc4472 (patch)
tree261af6d0b648fc66d751c8343bc60fd7a0c3bb4b
parent3978317af0c265d317258f5f6a04436100437a8c (diff)
downloadsamba-cb40b1ae83cf689e95e03f2d2d3fccc666dc4472.tar.gz
samba-cb40b1ae83cf689e95e03f2d2d3fccc666dc4472.tar.bz2
samba-cb40b1ae83cf689e95e03f2d2d3fccc666dc4472.zip
When requesting UNIX info levels on findfirst/findnext, don't play games with write time,
just return what the underlying filesystem says. Trying not to confuse UNIX apps any more than necessary. Jeremy. (This used to be commit b81a4dd003957a611ea190979d828b75d07a1f80)
-rw-r--r--source3/smbd/trans2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 3c1753354b..2e2da5cc71 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1945,6 +1945,8 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
break;
case SMB_FIND_FILE_UNIX:
case SMB_FIND_FILE_UNIX_INFO2:
+ /* Always use filesystem for UNIX mtime query. */
+ ask_sharemode = false;
if (!lp_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
@@ -2302,6 +2304,8 @@ resume_key = %d resume name = %s continue=%d level = %d\n",
break;
case SMB_FIND_FILE_UNIX:
case SMB_FIND_FILE_UNIX_INFO2:
+ /* Always use filesystem for UNIX mtime query. */
+ ask_sharemode = false;
if (!lp_unix_extensions()) {
reply_nterror(req, NT_STATUS_INVALID_LEVEL);
return;
@@ -4148,7 +4152,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
}
}
- if (!null_timespec(write_time_ts)) {
+ if (!null_timespec(write_time_ts) && !INFO_LEVEL_IS_UNIX(info_level)) {
mtime_ts = write_time_ts;
}