Unix Technical Forum

Re: more re: nfs openbsd setattr bug

This is a discussion on Re: more re: nfs openbsd setattr bug within the lucky.openbsd.tech forums, part of the OpenBSD category; --> On Tue, 28 Mar 2006, rick@snowhite.cis.uoguelph.ca wrote: > I've run the little test script and it seemed to be ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2008, 01:15 PM
Otto Moerbeek
 
Posts: n/a
Default Re: more re: nfs openbsd setattr bug

On Tue, 28 Mar 2006, rick@snowhite.cis.uoguelph.ca wrote:

> I've run the little test script and it seemed to be fixed after I had
> patched my server to set VA_UTIMES_NULL when setting to server time(s).
>
> So, I think that your diagnosis was correct, but your patch didn't quite
> fix it. Although I haven't tested it, here is the equivalent patch to
> what I did, for OpenBSD3.8. Maybe you can try this?
>
> Good luck with it, rick


I installed a 2.6.16 linux system. The problematic call with my diff
was only setting mtime TOSERVER, so the count never reached 2.

I can confirm your diff fixes things for me. I'm woried about one
thing though: what if the client does atime TOSERVER mtime TOCLIENT?
That should not be allowed.

So here's a revised diff that catches that.

Han, could you try this one?

-Otto

Index: nfsm_subs.h
================================================== =================
RCS file: /cvs/src/sys/nfs/nfsm_subs.h,v
retrieving revision 1.15
diff -u -p -r1.15 nfsm_subs.h
--- nfsm_subs.h 24 Jun 2004 19:35:26 -0000 1.15
+++ nfsm_subs.h 28 Mar 2006 20:11:09 -0000
@@ -471,16 +471,19 @@
fxdr_nfsv3time(tl, &(a)->va_atime); \
break; \
case NFSV3SATTRTIME_TOSERVER: \
+ (a)->va_vaflags |= VA_UTIMES_NULL; \
getnanotime(&(a)->va_atime); \
break; \
}; \
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; \
case NFSV3SATTRTIME_TOSERVER: \
+ (a)->va_vaflags |= VA_UTIMES_NULL; \
getnanotime(&(a)->va_mtime); \
break; \
}; }

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com