[PATCH] nfsd: revoking of suid/sgid bits after chown() in a consistent way

Christoph Hellwig hch at infradead.org
Thu Dec 12 02:13:59 CST 2013


On Wed, Dec 11, 2013 at 10:38:59PM -0500, J. Bruce Fields wrote:
> In the v3 case I'd expect the open O_TRUNC to result in a SETATTR rpc,
> in the v4 case an OPEN rpc.  Both result in a call to nfsd_setattr,
> though I only see nfsd_setattr turning off the SUID/SGID bits in the
> chown case.  Are you sure it isn't the subsequent write that clears
> those bits?

We've traditionally cleared the suid bits for O_TRUNC for local
filesystem, although this is more a convention than a real security
need.  It would still be good if NFSv4 would follow the general
semantics.



More information about the xfs mailing list