Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 69419 Details for
Bug 107514
[PATCH] let enewuser use a UID suitable for apache suexec
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
eutils patch
enewuser.diff (text/plain), 1.50 KB, created by
0g
on 2005-09-28 07:54:17 UTC
(
hide
)
Description:
eutils patch
Filename:
MIME Type:
Creator:
0g
Created:
2005-09-28 07:54:17 UTC
Size:
1.50 KB
patch
obsolete
>--- /usr/portage/eclass/eutils.eclass 2005-09-19 08:05:37.000000000 +1000 >+++ /usr/local/portage/eclass/myeutils.eclass 2005-09-29 00:28:47.000000000 +1000 >@@ -465,23 +465,32 @@ > local opts= > > # handle uid >- local euid=$1; shift >- if [[ ! -z ${euid} ]] && [[ ${euid} != "-1" ]] ; then >- if [[ ${euid} -gt 0 ]] ; then >- if [[ ! -z $(egetent passwd ${euid}) ]] ; then >- euid="next" >- fi >- else >- eerror "Userid given but is not greater than 0 !" >- die "${euid} is not a valid UID" >- fi >+ local emin_uid= >+ local emax_uid= >+ if [[ $1 = -1 ]] || [[ -z $1 ]] ; then >+ emin_uid=100 >+ emax_uid=999 >+ elif [[ $1 -gt 19999 ]] ; then # Arbitrary upper limit. Could be raised >+ emin_uid=$1 # within constraints of portability >+ emax_uid=${emin_uid} # and search time (NIS, LDAP, NetInfo etc). >+ elif [[ $1 -gt 999 ]] ; then >+ emin_uid=$1 >+ emax_uid=19999 >+ elif [[ $1 -gt 0 ]] ; then >+ emin_uid=$1 >+ emax_uid=999 > else >- euid="next" >+ eerror "Userid given but is not greater than 0 !" >+ die "$1 is not a valid UID" > fi >- if [[ ${euid} == "next" ]] ; then >- for euid in $(seq 101 999) ; do >- [[ -z $(egetent passwd ${euid}) ]] && break >- done >+ shift >+ local euid= >+ for euid in $(seq ${emin_uid} ${emax_uid}) "x" ; do >+ [[ ${euid} = "x" ]] || [[ -z $(egetent passwd ${euid}) ]] && break >+ done >+ if [[ ${euid} = "x" ]] ; then >+ eerror "A search failed to find a free UID !" >+ die "No free UID between ${emin_uid} and ${emax_uid}" > fi > opts="${opts} -u ${euid}" > einfo " - Userid: ${euid}"
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 107514
: 69419