1 |
On 08-03-2020 15:26:50 +0800, heroxbd@g.o wrote: |
2 |
> From: Benda Xu <heroxbd@g.o> |
3 |
> |
4 |
> Gentoo Prefix runs with a normal user and cannot grant extra |
5 |
> capabilities. Exit gracefully with a message. |
6 |
> |
7 |
> Signed-off-by: Benda Xu <heroxbd@g.o> |
8 |
> --- |
9 |
> eclass/fcaps.eclass | 5 +++++ |
10 |
> 1 file changed, 5 insertions(+) |
11 |
> |
12 |
> diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass |
13 |
> index 467f955f5e9a..563d177c92d5 100644 |
14 |
> --- a/eclass/fcaps.eclass |
15 |
> +++ b/eclass/fcaps.eclass |
16 |
> @@ -78,6 +78,11 @@ DEPEND="filecaps? ( sys-libs/libcap )" |
17 |
> fcaps() { |
18 |
> debug-print-function ${FUNCNAME} "$@" |
19 |
> |
20 |
> + if [[ ${EUID} != 0 ]] ; then |
21 |
> + einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
22 |
> + return 0 |
23 |
|
24 |
Perhaps add "ignoring" or something in the message here to make it clear |
25 |
this isn't treated as an error? |
26 |
|
27 |
Thanks, |
28 |
Fabian |
29 |
|
30 |
> + fi |
31 |
> + |
32 |
> # Process the user options first. |
33 |
> local owner='root' |
34 |
> local group='0' |
35 |
> -- |
36 |
> 2.25.0 |
37 |
> |
38 |
> |
39 |
|
40 |
-- |
41 |
Fabian Groffen |
42 |
Gentoo on a different level |