summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-04-02 18:35:12 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-04-02 18:35:12 +0000
commit7d8833c8d0e498e7d3bbfee2f416c779e66fbac8 (patch)
tree11c563137e15d1caf13363843ce552c2c65f69ec /sys/nfs
parent243fe6257fd9d75a6d920a7e5d08da309a512190 (diff)
When setting timestamps TOSERVER having write permissions is adaquate;
problem experienced by Han Boetes; fix with "nfs4" rick at snowhite dot cis dot uoguelph dot ca. ok pedro@ tedu@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_serv.c3
-rw-r--r--sys/nfs/nfsm_subs.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 049b1a3e3dc..8a77269caa4 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.39 2005/06/18 18:09:43 millert Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.40 2006/04/02 18:35:11 otto Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -233,6 +233,7 @@ nfsrv_setattr(nfsd, slp, procp, mrq)
nfsm_srvmtofh(fhp);
VATTR_NULL(&va);
if (v3) {
+ va.va_vaflags |= VA_UTIMES_NULL;
nfsm_srvsattr(&va);
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED);
gcheck = fxdr_unsigned(int, *tl);
diff --git a/sys/nfs/nfsm_subs.h b/sys/nfs/nfsm_subs.h
index fe48555dae6..a9a8805135f 100644
--- a/sys/nfs/nfsm_subs.h
+++ b/sys/nfs/nfsm_subs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsm_subs.h,v 1.15 2004/06/24 19:35:26 tholo Exp $ */
+/* $OpenBSD: nfsm_subs.h,v 1.16 2006/04/02 18:35:11 otto Exp $ */
/* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */
/*
@@ -467,6 +467,7 @@
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
switch (fxdr_unsigned(int, *tl)) { \
case NFSV3SATTRTIME_TOCLIENT: \
+ (a)->va_vaflags &= ~VA_UTIMES_NULL; \
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \
fxdr_nfsv3time(tl, &(a)->va_atime); \
break; \
@@ -477,6 +478,7 @@
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
switch (fxdr_unsigned(int, *tl)) { \
case NFSV3SATTRTIME_TOCLIENT: \
+ (a)->va_vaflags &= ~VA_UTIMES_NULL; \
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); \
fxdr_nfsv3time(tl, &(a)->va_mtime); \
break; \