All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] setregid: use common user and group names.
Date: Thu, 3 May 2018 16:17:32 +0200	[thread overview]
Message-ID: <20180503141731.GC27716@rei> (raw)
In-Reply-To: <20180503140815.uytpnrd7wjcm7tex@dell5510>

Hi!
> > FIY this seems cause failures on Debian 9 where I do get failures:
> 
> > setregid03    1  TBROK  :  setregid03.c:198: nobody must be a valid group
> > setregid03    2  TBROK  :  setregid03.c:198: Remaining cases broken
> 
> > setregid04    1  TBROK  :  setregid04.c:126: Couldn't find the `nobody' group
> > setregid04    2  TBROK  :  setregid04.c:126: Remaining cases broken
> Debian has nogroup as group for nobody. Sorry that I overlooked it in "1b7cf9474".
> 
> > I guess that we need a fallback if nobody group does not exist.
> Check for "nogroup"?

Let's just change the code to fallback to nogroup if group nobody does
not exist for the release and then we can think of an more elaborate
solution.

> Or allow to overwrite the group name with env. variable?
>
> BTW I wonder why we need more users than just nobody/nobody or nobody/nogroup.
> I'd be for having env. variable TST_USER and TST_GROUP, with helper, which would check for
> them if they're not defined (similar we use in tst_net.sh), so user wouldn't have to care
> for it.

I would rather go for adding some API to the test library that would
supply the test with useable user and group ids. Something as
.needs_user_id and .needs_group_id to the tst_test structure and then
put all the logic to the test library.

> BTW: code in IDcheck.sh expect difference in Debian, but that's useless (just to report
> it):
> if ! fe "nobody" "$passwd" || ! (fe "nogroup" "$group" || fe "nobody" "$group")
> then
>     MISSING_ENTRY=1
> fi

We should probably get rid of IDcheck.sh I doubt that it's up-to-date
enough to be useful.

-- 
Cyril Hrubis
chrubis@suse.cz

      reply	other threads:[~2018-05-03 14:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 20:01 [LTP] [PATCH] setregid: use common user and group names Sandeep Patil
2018-03-26 12:42 ` Petr Vorel
2018-03-26 19:29   ` Sandeep Patil
2018-03-27  9:43     ` Petr Vorel
2018-03-27 17:24       ` Sandeep Patil
2018-03-28  6:07         ` Petr Vorel
2018-03-28 20:32           ` Sandeep Patil
2018-03-27 12:31 ` Petr Vorel
2018-05-03 13:31 ` Cyril Hrubis
2018-05-03 14:08   ` Petr Vorel
2018-05-03 14:17     ` Cyril Hrubis [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=20180503141731.GC27716@rei \
    --to=chrubis@suse.cz \
    --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 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.