Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 540992 Details for
Bug 629398
add QA warning for system executables writable by a non-root user
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
90bad-bin-owner
90bad-bin-owner (text/plain), 1.22 KB, created by
Michael Orlitzky
on 2018-07-25 12:43:12 UTC
(
hide
)
Description:
90bad-bin-owner
Filename:
MIME Type:
Creator:
Michael Orlitzky
Created:
2018-07-25 12:43:12 UTC
Size:
1.22 KB
patch
obsolete
># Copyright 1999-2018 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > >bad_bin_owner_check() { > # Warn about globally-installed executables (in /bin, /usr/bin, /sbin, > # or /usr/sbin) that are owned by a nonzero UID. > > # This check doesn't work on non-root prefix installations at > # the moment, because every executable therein is owned by a > # nonzero UID. > [[ "${EUID}" -eq "0" ]] || return > > local d f found=() > > for d in "${ED%/}/bin" "${ED%/}/usr/bin" "${ED%/}/sbin" "${ED%/}/usr/sbin"; do > [[ -d "${d}" ]] || continue > > # Read the results of the "find" command into the "found" bash array. > # Use -L to catch symlinks whose targets are owned by a non-root user, > # even though it won't catch ABSOLUTE symlinks until the package > # is RE-installed (the first time around, the target won't exist). > while read -r -d '' f; do > found+=( "${f}" ) > done < <(find -L "${d}" -maxdepth 1 -type f ! -uid 0 -print0) > > if [[ ${found[@]} ]]; then > eqawarn "system executables owned by nonzero uid:" > for f in "${found[@]}"; do > # Strip off the leading destdir before outputting the path, > # but leave the prefix if there is one. > eqawarn " ${f#${D%/}/}" > done > fi > done >} > >bad_bin_owner_check >:
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 629398
:
491116
|
491120
|
491158
|
491160
|
492914
|
492916
|
540992
|
540994
|
541712
|
541714