Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 650900 Details for
Bug 734002
acct-user.eclass user.eclass do not respect ROOT variable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
account-creation.patch
file_734002.txt (text/plain), 3.18 KB, created by
Stefan Langenmaier
on 2020-07-26 21:20:25 UTC
(
hide
)
Description:
account-creation.patch
Filename:
MIME Type:
Creator:
Stefan Langenmaier
Created:
2020-07-26 21:20:25 UTC
Size:
3.18 KB
patch
obsolete
>diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass >index e82f3c56db..ec4a4eaf39 100644 >--- a/eclass/acct-user.eclass >+++ b/eclass/acct-user.eclass >@@ -212,7 +212,7 @@ elockuser() { > ;; > > *) >- usermod -e 1 -L "$1" || die "Locking account $1 failed" >+ usermod -R ${ROOT} -e 1 -L "$1" || die "Locking account $1 failed" > ;; > esac > >@@ -256,7 +256,7 @@ eunlockuser() { > > *) > # silence warning if account does not have a password >- usermod -e "" -U "$1" 2>/dev/null || die "Unlocking account $1 failed" >+ usermod -R ${ROOT} -e "" -U "$1" 2>/dev/null || die "Unlocking account $1 failed" > ;; > esac > >diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass >index 15e9238ab4..67b447d661 100644 >--- a/eclass/user-info.eclass >+++ b/eclass/user-info.eclass >@@ -47,8 +47,8 @@ egetent() { > ;; > *) > # ignore nscd output if we're not running as root >- type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null >- getent "${db}" "${key}" >+ chroot ${ROOT} type -p nscd >/dev/null && chroot ${EROOT} nscd -i "${db}" 2>/dev/null >+ chroot ${ROOT} getent "${db}" "${key}" > ;; > esac > } >diff --git a/eclass/user.eclass b/eclass/user.eclass >index b70698356a..d66b633b07 100644 >--- a/eclass/user.eclass >+++ b/eclass/user.eclass >@@ -199,7 +199,7 @@ enewuser() { > ;; > > *) >- useradd -M -N -r "${opts[@]}" "${euser}" || die >+ useradd -R ${ROOT} -M -N -r "${opts[@]}" "${euser}" || die > ;; > esac > >@@ -305,7 +305,7 @@ enewgroup() { > opts="-g ${egid}" > fi > # We specify -r so that we get a GID in the system range from login.defs >- groupadd -r ${opts} "${egroup}" || die >+ groupadd -R ${ROOT} -r ${opts} "${egroup}" || die > ;; > esac > } >@@ -373,7 +373,7 @@ esethome() { > ;; > > *) >- usermod -d "${ehome}" "${euser}" && return 0 >+ usermod -R {ROOT} -d "${ehome}" "${euser}" && return 0 > [[ $? == 8 ]] && eerror "${euser} is in use, cannot update home" > eerror "There was an error when attempting to update the home directory for ${euser}" > eerror "Please update it manually on your system (as root):" >@@ -434,7 +434,7 @@ esetshell() { > ;; > > *) >- usermod -s "${eshell}" "${euser}" && return 0 >+ usermod -R ${ROOT} -s "${eshell}" "${euser}" && return 0 > [[ $? == 8 ]] && eerror "${euser} is in use, cannot update shell" > eerror "There was an error when attempting to update the shell for ${euser}" > eerror "Please update it manually on your system (as root):" >@@ -490,7 +490,7 @@ esetcomment() { > ;; > > *) >- usermod -c "${ecomment}" "${euser}" && return 0 >+ usermod -R ${ROOT} -c "${ecomment}" "${euser}" && return 0 > [[ $? == 8 ]] && eerror "${euser} is in use, cannot update comment" > eerror "There was an error when attempting to update the comment for ${euser}" > eerror "Please update it manually on your system (as root):" >@@ -560,7 +560,7 @@ esetgroups() { > ;; > > *) >- usermod "${opts[@]}" "${euser}" && return 0 >+ usermod -R ${ROOT} "${opts[@]}" "${euser}" && return 0 > [[ $? == 8 ]] && eerror "${euser} is in use, cannot update groups" > eerror "There was an error when attempting to update the groups for ${euser}" > eerror "Please update it manually on your system (as root):"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 734002
: 650900