xfs
[Top] [All Lists]

Re: [PATCH] xfsqa: add testcase for ->setattr permission checking

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsqa: add testcase for ->setattr permission checking
From: Timothy Shimmin <tes@xxxxxxx>
Date: Wed, 10 Dec 2008 15:36:27 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <493F34CA.3040101@xxxxxxx>
References: <20081202142039.GA25155@xxxxxxxxxxxxx> <493CB518.7000001@xxxxxxx> <20081209095546.GB8599@xxxxxxxxxxxxx> <493F34CA.3040101@xxxxxxx>
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)
Timothy Shimmin wrote:
> For chown:
>       "If the specified file is a regular file, one or more of the S_IXUSR,
>       S_IXGRP, or S_IXOTH bits of the file mode are set, and the process
>       does not have appropriate privileges, the set-user-ID (S_ISUID) and
>       set-group-ID (S_ISGID) bits of the file mode shall be cleared upon
>       successful return from chown(). If the specified file is a regular
>       file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the
>       file mode are set, and the process has appropriate privileges, it
>       is implementation-defined whether the set-user-ID and set-group-ID
>       bits are altered. If the chown() function is successfully invoked
>       on a file that is not a regular file and one or more of the S_IXUSR,
>       S_IXGRP, or S_IXOTH bits of the file mode are set, the set-user-ID
>       and set-group-ID bits may be cleared."
> 
> reg file + mode-bits set + no appropriate privileges -> clear suid,sgid
> reg file + mode-bits set + appropriate privileges -> maybe clear suid,sgid
> non reg file + mode-bits set + chown success on file (??) -> maybe clear 
> suid/sgid
> 
s/mode-bits/exec-mode-bits/

--Tim

<Prev in Thread] Current Thread [Next in Thread>