Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
Cc: Christian Brauner <brauner@kernel.org>,
	Martin Doucha <martin.doucha@suse.com>,
	"ltp@lists.linux.it" <ltp@lists.linux.it>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [LTP] [RFC PATCH 1/1] creat09: Fix on more restrictive umask
Date: Thu, 7 Jul 2022 20:04:18 +0200	[thread overview]
Message-ID: <YscgIvZauxbArm7i@pevik> (raw)
In-Reply-To: <62C5663C.2060009@fujitsu.com>

Hi Xu,

> Hi Petr

> Share some process with you...

> I have rejected this patch and a kernel patchset[1] is plan to fix this 
> but doesn't merged to upstream kernel due to none continue to review 
> this(It is about one month since v9...)

> TBH, this case only tests simple creat file with open but miss
> open with O_TMPFILE[2]
> mknodat[3]

> setgid strip logic is not only affected by umask but also include acl 
> operations[4].

Thanks a lot for an update.
Al, Christian, Amir, could you please have look on v9?

Kind regards,
Petr


> [1]https://patchwork.kernel.org/project/linux-fsdevel/list/?series=643645
> [2]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=87cf32ad3fa234e3d5ec501e0f86516bef91d805
> [3]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=5328ab947ff4d2d492a6ac90b22d31ab02637bd8
> [4]https://patchwork.kernel.org/project/fstests/list/?series=643643&state=%2A&archive=both

> Best Regards
> Yang Xu
> > XFS fails on umask 0077:

> > tst_test.c:1528: TINFO: Testing on xfs
> > tst_test.c:997: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
> > tst_test.c:1458: TINFO: Timeout per run is 0h 05m 00s
> > creat09.c:61: TINFO: User nobody: uid = 65534, gid = 65534
> > creat09.c:62: TINFO: Found unused GID 3: SUCCESS (0)
> > creat09.c:93: TPASS: mntpoint/testdir/creat.tmp: Owned by correct group
> > creat09.c:97: TFAIL: mntpoint/testdir/creat.tmp: Setgid bit is set
> > creat09.c:93: TPASS: mntpoint/testdir/open.tmp: Owned by correct group
> > creat09.c:97: TFAIL: mntpoint/testdir/open.tmp: Setgid bit is set

> > Thus clear the default umask.

> > Signed-off-by: Petr Vorel<pvorel@suse.cz>
> > ---
> >   testcases/kernel/syscalls/creat/creat09.c | 2 ++
> >   1 file changed, 2 insertions(+)

> > diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c
> > index bed7bddb0e..70da7d2fc7 100644
> > --- a/testcases/kernel/syscalls/creat/creat09.c
> > +++ b/testcases/kernel/syscalls/creat/creat09.c
> > @@ -56,6 +56,8 @@ static void setup(void)
> >   		(int)ltpuser->pw_gid);
> >   	free_gid = tst_get_free_gid(ltpuser->pw_gid);

> > +	umask(0);
> > +
> >   	/* Create directories and set permissions */
> >   	SAFE_MKDIR(WORKDIR, MODE_RWX);
> >   	SAFE_CHOWN(WORKDIR, ltpuser->pw_uid, free_gid);

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-07-07 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 19:12 [LTP] [RFC PATCH 1/1] creat09: Fix on more restrictive umask Petr Vorel
2022-03-18  7:59 ` xuyang2018.jy
2022-03-18 10:37   ` xuyang2018.jy
2022-03-18 22:12     ` Darrick J. Wong
2022-03-22  6:28       ` xuyang2018.jy
2022-07-06  9:37 ` xuyang2018.jy
2022-07-07 18:04   ` Petr Vorel [this message]
2022-07-08 14:37     ` Christian Brauner
2022-07-11  3:56       ` xuyang2018.jy
2022-07-11  5:25       ` Petr Vorel

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=YscgIvZauxbArm7i@pevik \
    --to=pvorel@suse.cz \
    --cc=brauner@kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xuyang2018.jy@fujitsu.com \
    /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