Matthias Drochner
2006-09-28 12:01:31 UTC
Hi -
when I did a system rebuild after our (my company's) NFS
server was switched from a DEC OSF/1 cluster to a Linux box
I had to find out that all SUID bits of my (diskless)
development system disappeared.
I tracked it down to the following:
-NetBSD's "install" program does a fchmod() on the open file
descriptor of the file being installed, and a close()
afterwards. This makes, due to caching etc that an NFS
WRITE is done to the file after the SETATTR.
-Linux (Debian, 2.6 kernel) appearently deletes the SUID bits
if a file is written to. The NFS WRITE reply contains the
new non-suid attributes.
Is this legal, or well-known, behaviour? I couldn't find
anything in the NFSv3 spec telling that the server is allowed
to change attributes unrequested, or that the client should
check every attribute coming back whether it has changed
unexpectedly.
Or is this a Linux security feature which I can hopefully
switch off?
(I can send a tcpdump capture file if anyone is interested.)
best regards
Matthias
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
when I did a system rebuild after our (my company's) NFS
server was switched from a DEC OSF/1 cluster to a Linux box
I had to find out that all SUID bits of my (diskless)
development system disappeared.
I tracked it down to the following:
-NetBSD's "install" program does a fchmod() on the open file
descriptor of the file being installed, and a close()
afterwards. This makes, due to caching etc that an NFS
WRITE is done to the file after the SETATTR.
-Linux (Debian, 2.6 kernel) appearently deletes the SUID bits
if a file is written to. The NFS WRITE reply contains the
new non-suid attributes.
Is this legal, or well-known, behaviour? I couldn't find
anything in the NFSv3 spec telling that the server is allowed
to change attributes unrequested, or that the client should
check every attribute coming back whether it has changed
unexpectedly.
Or is this a Linux security feature which I can hopefully
switch off?
(I can send a tcpdump capture file if anyone is interested.)
best regards
Matthias
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de