Bug 146336 - STARTING_UID not numeric in /usr/sbin/genhomedircon
Summary: STARTING_UID not numeric in /usr/sbin/genhomedircon
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-27 05:54 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: policycoreutils-1.18.1-2.8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-05 18:59:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:254 0 low SHIPPED_LIVE policycoreutils bug fix update 2005-06-09 04:00:00 UTC

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


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