lkml.org 
[lkml]   [1996]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Problems in 1.3.93
Date
Alan Cox wrote:
>
> > There really shouldn't be files laying around with r-S group permissions,
> > unless you really mean it. Additionally the whole issue of locks and NFS
> > needs to be resolved - I know Olaf Kirch started looking at lockd. I'm
> > tempted to pay X/Open the money they want for the standard and start looking
> > at it myself.
>
> Youve missed the problem totally. Mark a file mandatory locking, lock it
> (on the server), ask for it remotely - nfsd blocks. Goodbye nfs server.
>
> Ditto for backups and many other programs.
>
> Alan
>

You're right - I did miss your point slightly, although I hope you agree
with what I did write. Especially that marking files for mandatory locking
is a serious issue and shouldn't be undertaken lightly.

I do have a couple of comments which may or may not be of interest/
relevance:

1) A critical daemon like nfsd should be coded as defensively as possibly.
No harm in nfsd noticing the group-id bit and checking for locks with
F_GETLK.

2) Opening files with O_NONBLOCK avoids blocking on mandatory locks.

Throw the patches out if you really. They probably won't be missed by many
people. I implemented them as a small personal challenge and for a sense
of completeness - but if its more trouble than its worth then okay, no
problem.

-Andy

P.S.
I still maintain that anybody turning on mandatory locking for a file
without considering the circumstances is getting exactly what they ask
for, but I'm not so blind that I can't see the situation with a horde
of students who just love such devilish experiments. If the system
utilities can't feasibly be bulletproofed in this respect then I suppose
the locks just have to go.

--
Andy Walker Kvaerner Engineering a.s.
Andrew.Walker@lysaker.kvaerner.no P.O. Box 222, N-1324 Lysaker, Norway

......if the answer isn't violence, neither is your silence......



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.045 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site