1 |
On 11/20/17 05:09, heroxbd@g.o wrote: |
2 |
[...] |
3 |
> diff --git a/eclass/user.eclass b/eclass/user.eclass |
4 |
> index 86bcd282479..76a622df698 100644 |
5 |
> --- a/eclass/user.eclass |
6 |
> +++ b/eclass/user.eclass |
7 |
> @@ -103,6 +103,10 @@ egetent() { |
8 |
> # Default uid is (pass -1 for this) next available, default shell is |
9 |
> # /bin/false, default homedir is /dev/null, and there are no default groups. |
10 |
> enewuser() { |
11 |
> + if [[ ${EUID} != 0 ]] ; then |
12 |
> + einfo "Insufficient privileges to execute ${FUNCNAME[0]}" |
13 |
maybe ewarn() is more appropriate than einfo()? |
14 |
Just in case it's executed outside the scope of prefix |
15 |
|
16 |
[...] |