Re: [gentoo-dev] [PATCH] eclass/acct-user.eclass: disable fcaps() on Prefix.
Michał Górny writes: > ^ wrong subject. OK. should be `acct-user.eclass: disable fcaps() on Prefix.` > On Sun, 2020-03-08 at 12:20 +0800, hero...@gentoo.org wrote: >> From: Benda Xu >> >> Gentoo Prefix runs with a normal user and cannot grant extra >> capabilities. Exit gracefully with a message. > > Please don't add this weird indent. OK, thanks for pointing out. Didn't notice that. Benda signature.asc Description: PGP signature
Re: [gentoo-dev] [PATCH] eclass/acct-user.eclass: disable fcaps() on Prefix.
^ wrong subject. On Sun, 2020-03-08 at 12:20 +0800, hero...@gentoo.org wrote: > From: Benda Xu > > Gentoo Prefix runs with a normal user and cannot grant extra > capabilities. Exit gracefully with a message. Please don't add this weird indent. > > Closes: https://bugs.gentoo.org/699526 > Signed-off-by: Benda Xu > --- > eclass/fcaps.eclass | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass > index 467f955f5e9a..563d177c92d5 100644 > --- a/eclass/fcaps.eclass > +++ b/eclass/fcaps.eclass > @@ -78,6 +78,11 @@ DEPEND="filecaps? ( sys-libs/libcap )" > fcaps() { > debug-print-function ${FUNCNAME} "$@" > > + if [[ ${EUID} != 0 ]] ; then > + einfo "Insufficient privileges to execute ${FUNCNAME[0]}" > + return 0 > + fi > + > # Process the user options first. > local owner='root' > local group='0' -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part
[gentoo-dev] [PATCH] eclass/acct-user.eclass: disable fcaps() on Prefix.
From: Benda Xu Gentoo Prefix runs with a normal user and cannot grant extra capabilities. Exit gracefully with a message. Closes: https://bugs.gentoo.org/699526 Signed-off-by: Benda Xu --- eclass/fcaps.eclass | 5 + 1 file changed, 5 insertions(+) diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass index 467f955f5e9a..563d177c92d5 100644 --- a/eclass/fcaps.eclass +++ b/eclass/fcaps.eclass @@ -78,6 +78,11 @@ DEPEND="filecaps? ( sys-libs/libcap )" fcaps() { debug-print-function ${FUNCNAME} "$@" + if [[ ${EUID} != 0 ]] ; then + einfo "Insufficient privileges to execute ${FUNCNAME[0]}" + return 0 + fi + # Process the user options first. local owner='root' local group='0' -- 2.25.0