summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 07:11:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:46 -0500
commitf1814e5a53d2f685e193ba5f28b38ea48efd9269 (patch)
tree793d12eff2886e0db58515e36cf16a3a2008165d
parent7a11723cfcb05a308568e3e286f63842c0b93942 (diff)
downloadsamba-f1814e5a53d2f685e193ba5f28b38ea48efd9269.tar.gz
samba-f1814e5a53d2f685e193ba5f28b38ea48efd9269.tar.bz2
samba-f1814e5a53d2f685e193ba5f28b38ea48efd9269.zip
r3249: - change_time is closer to ctime than mtime
- pvfs now passes the RAW-CLOSE test (This used to be commit 98aea91ce67a0c64a98537bfe244495f10672323)
-rw-r--r--source4/ntvfs/posix/pvfs_fileinfo.c6
-rw-r--r--source4/ntvfs/posix/pvfs_open.c4
-rwxr-xr-xsource4/script/tests/test_posix.sh4
3 files changed, 9 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c
index 2e2acb2c82..42aad1a20e 100644
--- a/source4/ntvfs/posix/pvfs_fileinfo.c
+++ b/source4/ntvfs/posix/pvfs_fileinfo.c
@@ -84,13 +84,13 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name)
/* for now just use the simple samba mapping */
unix_to_nt_time(&name->dos.create_time, name->st.st_ctime);
unix_to_nt_time(&name->dos.access_time, name->st.st_atime);
- unix_to_nt_time(&name->dos.write_time, name->st.st_mtime);
- unix_to_nt_time(&name->dos.change_time, name->st.st_mtime);
+ unix_to_nt_time(&name->dos.write_time, name->st.st_mtime);
+ unix_to_nt_time(&name->dos.change_time, name->st.st_ctime);
#ifdef HAVE_STAT_TV_NSEC
name->dos.create_time += name->st.st_ctim.tv_nsec / 100;
name->dos.access_time += name->st.st_atim.tv_nsec / 100;
name->dos.write_time += name->st.st_mtim.tv_nsec / 100;
- name->dos.change_time += name->st.st_mtim.tv_nsec / 100;
+ name->dos.change_time += name->st.st_ctim.tv_nsec / 100;
#endif
name->dos.attrib = dos_mode_from_stat(pvfs, &name->st);
name->dos.alloc_size = name->st.st_size;
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index f533a36637..1575ca82c1 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -634,6 +634,10 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
struct utimbuf unix_times;
+ if (io->generic.level == RAW_CLOSE_SPLCLOSE) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
if (io->generic.level != RAW_CLOSE_CLOSE) {
return ntvfs_map_close(req, io, ntvfs);
}
diff --git a/source4/script/tests/test_posix.sh b/source4/script/tests/test_posix.sh
index 7712afb80d..290d52bd90 100755
--- a/source4/script/tests/test_posix.sh
+++ b/source4/script/tests/test_posix.sh
@@ -37,12 +37,12 @@ tests="$tests BASE-DELETE BASE-PROPERTIES BASE-MANGLE"
tests="$tests BASE-CHKPATH BASE-SECLEAK"
tests="$tests RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO-BUG"
tests="$tests RAW-LOCK RAW-MKDIR RAW-SEEK RAW-CONTEXT BASE-RENAME"
-tests="$tests RAW-UNLINK RAW-READ"
+tests="$tests RAW-UNLINK RAW-READ RAW-CLOSE"
tests="$tests LOCAL-ICONV LOCAL-TALLOC LOCAL-MESSAGING LOCAL-BINDING LOCAL-IDTREE"
soon="BASE-DENY1 BASE-DEFER_OPEN BASE-OPENATTR BASE-CHARSET"
soon="$soon RAW-SFILEINFO RAW-SEARCH RAW-OPEN RAW-OPLOCK RAW-NOTIFY RAW-MUX RAW-IOCTL"
-soon="$soon RAW-CHKPATH RAW-WRITE RAW-RENAME RAW-CLOSE BASE-TRANS2"
+soon="$soon RAW-CHKPATH RAW-WRITE RAW-RENAME BASE-TRANS2"
soon="$soon BASE-TRANS2"
for t in $tests; do