Bug 146336 - STARTING_UID not numeric in /usr/sbin/genhomedircon
STARTING_UID not numeric in /usr/sbin/genhomedircon
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-27 00:54 EST by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
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 13:59:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2005-01-27 00:54:05 EST
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 10:28:51 EST
Thanks added to 
policycoreutils-1_21_5-1
and
policycoreutils-1.18.1-2.7

Note You need to log in before you can comment on or make changes to this bug.