Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692274 - app-admin/lib_users-0.13 - print newline at end of PERMWARNING(/UID0)
Summary: app-admin/lib_users-0.13 - print newline at end of PERMWARNING(/UID0)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tobias Klausmann (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-08-16 06:55 UTC by Jeroen Roovers (RETIRED)
Modified: 2019-08-16 11:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2019-08-16 06:55:37 UTC
- print newline at end of PERMWARNING
- have PERMWARNINGUID0 be the warning printed for UID == 0
- have PERMWARNING be the warning printed for UID != 0

--- a/lib_users.py
+++ b/lib_users.py
@@ -16,8 +16,8 @@
 from collections import defaultdict
 from lib_users_util import common

-PERMWARNING = """Warning: Some files could not be read."""
-PERMWARNINGUID0="""\
+PERMWARNINGUID0 = """Warning: Some files could not be read.\n"""
+PERMWARNING="""\
 Warning: Some files could not be read. Note that lib_users has to be run as
 root to get a full list of deleted in-use libraries.\n"""

@@ -113,9 +113,9 @@

     if read_failure:
         if os.geteuid() == 0:
-            sys.stderr.write(PERMWARNING)
-        else:
             sys.stderr.write(PERMWARNINGUID0)
+        else:
+            sys.stderr.write(PERMWARNING)

     if len(users) > 0:
         if options.machine_readable:
Comment 1 Tobias Klausmann (RETIRED) gentoo-dev 2019-08-16 11:00:26 UTC
Committed:

https://github.com/klausman/lib_users/commit/62dce7c1be98c22aeac9d36e0b7c7ad82d293c50