From: Avinesh Kumar <akumar@suse.de>
To: rpalethorpe@suse.de
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] setfsuid02: using -1 as invalid fsuid for setfsuid()
Date: Wed, 02 Nov 2022 13:22:37 +0530 [thread overview]
Message-ID: <4268642.s8uzx1A9P8@localhost> (raw)
In-Reply-To: <87tu3j9h64.fsf@suse.de>
Hi Richie,
On Tuesday, November 1, 2022 2:33:00 PM IST Richard Palethorpe wrote:
> Hello,
>
> Petr Vorel <pvorel@suse.cz> writes:
>
> >> Hello,
> >
> >> Avinesh Kumar <akumar@suse.de> writes:
> >
> >> > a uid which does not have an entry in the /etc/passwd
> >> > file is not really an invalid fsuid for setfsuid(), so changing
> >> > the test to use -1 as an invalid fsuid.
> >> > And second setfsuid(-1) call is to verify that preceding call has
> >> > actually failed and there is no change in the fsuid.
> >
> >> I think the original test is flawed and testing what using -1 does is
> >> not very interesting as the kernel uses standard boilerplate to deal
> >> with this.
> >
> >> AFAICT we don't test what happens if a non-root user tries to set the
> >> fsuid to a uid that is not the euid, ruid or saved uid or 0/-1.
> >
> >> Possibly that is something for a new test though.
I'll post a new patch for this. Thank you for the suggestion.
> >
> > Ah, sorry, I overlooked this, merged now.
>
> No problem, I think that is the correct thing to do. I'll leave it to
> Avinesh or someone else to extend the test (or not).
>
>
Regards,
Avinesh
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-11-02 7:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 14:09 [LTP] [PATCH] setfsuid02: using -1 as invalid fsuid for setfsuid() Avinesh Kumar
2022-10-31 11:37 ` Petr Vorel
2022-10-31 13:36 ` Martin Doucha
2022-10-31 13:50 ` Petr Vorel
2022-10-31 14:00 ` Martin Doucha
2022-10-31 14:56 ` Petr Vorel
2022-10-31 17:23 ` Martin Doucha
2022-10-31 21:39 ` Petr Vorel
2022-11-02 7:40 ` Avinesh Kumar
2022-10-31 13:01 ` Richard Palethorpe
2022-10-31 21:40 ` Petr Vorel
2022-11-01 9:03 ` Richard Palethorpe
2022-11-02 7:52 ` Avinesh Kumar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4268642.s8uzx1A9P8@localhost \
--to=akumar@suse.de \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.