From: zhaogongyi <zhaogongyi@huawei.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/setfsgid02: Bugfix for running as root
Date: Sat, 8 May 2021 06:48:29 +0000 [thread overview]
Message-ID: <4aa96ba2e4da40cca03556cb7f0e331f@huawei.com> (raw)
Hi Cyril,
Thanks for your review!
I have resubmitted the patch and rewrite setfsgid02.c,
please see: https://patchwork.ozlabs.org/project/ltp/patch/20210508064351.10737-1-zhaogongyi@huawei.com/
Thanks so much!
Best Regards,
Gongyi
>
> Hi!
> > When we run the test as root id, and with the option "-i 2", test will
> > fail.
>
> Looking at the test there is much more to fix.
>
> - the description does not match what the test is doing
> - the pass/fail condition and TFAIL message does not make any sense
>
> And its the same for the rest of the setfsgid tests.
>
> Looking at the manual pages for this oddball syscall we should check if:
>
> - unpriviledged process cannot change the value i.e. value that is
> different from return from ret=setfsgid(-1) is passed as
> setfsgid(ret+1) followed by setfsgid(-1) and all of these returns the
> same value and the value also matches process effective group ID
>
> - priviledged process can change the value i.e. the same as
> unpriviledged but we expect the last setfsgid(-1) return
> the new value. We either have to reset the setfsgid() at the end of
> the test or run it in a fork()-ed process so that we start with a
> clean plate for each iteration
>
> --
> Cyril Hrubis
> chrubis@suse.cz
next reply other threads:[~2021-05-08 6:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 6:48 zhaogongyi [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-28 12:49 [LTP] [PATCH] syscalls/setfsgid02: Bugfix for running as root Zhao Gongyi
2021-04-28 13:56 ` Cyril Hrubis
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=4aa96ba2e4da40cca03556cb7f0e331f@huawei.com \
--to=zhaogongyi@huawei.com \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox