From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH v2 6/9] acct-{group,user}.eclass: WIP eclasses to maintain users/groups
Date: Thu, 06 Jun 2019 06:56:13 +0200 [thread overview]
Message-ID: <a22811c2f978346ed5bd4706ddff6af2de579fb4.camel@gentoo.org> (raw)
In-Reply-To: <w6gftoo8db7.fsf@kph.uni-mainz.de>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
On Wed, 2019-06-05 at 13:46 +0200, Ulrich Mueller wrote:
> > > > > > On Wed, 05 Jun 2019, Michał Górny wrote:
> > +# @FUNCTION: acct-group_pkg_pretend
> > +# @DESCRIPTION:
> > +# Performs sanity checks for correct eclass usage, and early-checks
> > +# whether requested GID can be enforced.
> > +acct-group_pkg_pretend() {
> > + debug-print-function ${FUNCNAME} "${@}"
> > +
> > + # verify ACCT_GROUP_ID
> > + [[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!"
> > + [[ ${ACCT_GROUP_ID} -ge 0 ]] || die "Ebuild errors: ACCT_GROUP_ID=${ACCT_GROUP_ID} invalid!"
>
> Add a sanity check for [[ ${CATEGORY} == acct-group ]] too?
Done. I've actually went for adding it in global scope since CATEGORY
is reliably available there already.
>
> > +
> > + # check for ACCT_GROUP_ID collisions early
> > + if [[ -n ${ACCT_GROUP_ENFORCE_ID} ]]; then
> > + local grp=$(egetent group "${ACCT_GROUP_ID}")
> > + if [[ -n ${grp} ]]; then
> > + eerror "The required GID is already taken by another group."
> > + eerror " GID: ${ACCT_GROUP_ID} (needed for ${PN})"
> > + eerror " current group: ${grp}"
> > + die "GID ${ACCT_GROUP_ID} taken already"
> > + fi
> > + fi
> > +}
> > [...]
> > +# @FUNCTION: acct-user_pkg_pretend
>
> And a similar check for acct-user here.
>
> Ulrich
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
next prev parent reply other threads:[~2019-06-06 4:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 9:12 [gentoo-dev] [PATCH v2 0/9] User/group packages Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 1/9] user.eclass: Do not create user-group automatically Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 2/9] user.eclass: Prevent automated home creation in useradd Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 3/9] user.eclass: Support disabling home directory creation Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 4/9] user.eclass: Support forcing specified UID/GID Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 5/9] user.eclass: Die if no free UID/GID is found Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 6/9] acct-{group,user}.eclass: WIP eclasses to maintain users/groups Michał Górny
2019-06-05 11:46 ` Ulrich Mueller
2019-06-06 4:56 ` Michał Górny [this message]
2019-06-05 19:10 ` Pacho Ramos
2019-06-06 4:57 ` Michał Górny
2019-06-06 7:05 ` Ulrich Mueller
2019-06-05 21:14 ` Michael Orlitzky
2019-06-06 5:02 ` Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 7/9] acct-group/ftp: Add 'ftp' group (GID 21) Michał Górny
[not found] ` <3868289f-1e37-631a-daeb-d1a4b2454669@gentoo.org>
2019-06-07 5:01 ` Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 8/9] acct-user/ftp: Add 'ftp' user (UID 21) Michał Górny
2019-06-05 9:12 ` [gentoo-dev] [PATCH v2 9/9] net-ftp/ftpbase: Utilize {group,user}/ftp Michał Górny
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=a22811c2f978346ed5bd4706ddff6af2de579fb4.camel@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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