[Top] [All Lists]

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

To: Timothy Shimmin <tes@xxxxxxx>
Subject: Re: [PATCH] xfsqa: add testcase for ->setattr permission checking
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 9 Dec 2008 04:55:46 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <493CB518.7000001@xxxxxxx>
References: <20081202142039.GA25155@xxxxxxxxxxxxx> <493CB518.7000001@xxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Dec 08, 2008 at 04:48:08PM +1100, Timothy Shimmin wrote:
> 1.
> > +echo "user: chown root owned file to qa_user (should fail)"
> > +su ${qa_user} -c "chown root test.${qa_user}"
> > +
> I think the description and command above don't match.
> I think we have a swap with subtest 4 below.
> Need to either swap descriptions or commands.

Yes, I swapped the descriptions.

> > +#
> > +# Setup a file owned by the qa_user and with the suid bit set.
> > +# A chown by root should not clean the suid bit.
> > +#
> Typos:
> s/clean/clear/
> s/suceed/succeed/ in a couple of places.


> * It looks like you test the clearing of suid/sgid bits
> for setting the mode permission bits and not
> for setting ownership as the description suggests;
> i.e. you test with chmod instead of chown for clearing of suid/sgid bits

Yes, that's also what I intended too, as XFS had some code to clear
the suid bits for changing permissions, but those shouldn't happen
for the restricted_chown case (and don't even happen in the XFS code,
it's just not obvious when reading the old setattr implementation).
While for sgid we want to clear it on mode changes if the gid
is not in the group list.  So what needs fixing here is once again
the comment.

Btw, I just noticed you checked in another testcase as 192.  Do you want
a respin or do you want to fix it up yourself?

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