Bug 146336

Summary: STARTING_UID not numeric in /usr/sbin/genhomedircon
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: dwalsh, pgraner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: policycoreutils-1.18.1-2.8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-05 18:59:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2005-01-27 05:54:05 UTC
Unless you cast rc[1] to int when initializing STARTING_UID,
getPrefixes() will compare it with user ids lexicographically, as
opposed to numerically.  If you happen to have the default 
STARTING_UID as "500" and user ids starting at 1000, you lose :-(  The
patchlet below fixes the problem.

--- /usr/sbin/genhomedircon~    2005-01-24 17:42:30.000000000 -0200
+++ /usr/sbin/genhomedircon     2005-01-27 03:01:42.000000000 -0200
@@ -93,7 +93,7 @@

        rc=commands.getstatusoutput("grep -h '^UID_MIN'
/etc/login.defs | sed -e 's/^UID_MIN[^0-9]*//'")
        if rc[0] == 0:
-               STARTING_UID=rc[1]
+               STARTING_UID=int(rc[1])
        else:
                STARTING_UID=500


Version-Release number of selected component (if applicable):
policycoreutils-1.18.1-2.6

Comment 1 Daniel Walsh 2005-01-27 15:28:51 UTC
Thanks added to 
policycoreutils-1_21_5-1
and
policycoreutils-1.18.1-2.7