Bug 628730

Summary: s-c-users fails to start with account having a huge uid/gid
Product: Red Hat Enterprise Linux 6 Reporter: Ondrej Moriš <omoris>
Component: system-config-usersAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: Zbysek MRAZ <zmraz>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: ebenes, fnadge, twoerner
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause With default settings, tries to allocate UID/GID higher than the highest found at startup. Consequence UID/GID overflows, throws traceback. Fix Ignores UIDs/GIDs that are at the top of the ID space.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:13:59 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:
Bug Depends On: 697470, 849988    
Bug Blocks: 682670    

Description Ondrej Moriš 2010-08-30 20:57:06 UTC
Description of problem:

Having an account with a huge uid/gid (see below) in the system s-c-users fails to start and prints traceback.

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

* libuser-0.56.13-2.el6
* libuser-python-0.56.13-2.el6
* system-config-users-1.2.104-1.el6

How reproducible:

Always.

Steps to Reproduce:

1. s-c-users -> add user, custom uid (1111111111111122222222222221111111...)
   * no abort, no error, user added with uid (= gid) 4294967294
2. close s-c-users
3. s-c-users

Alternative Reproducer:

1. create user with uid=gid=4294967294
2. start s-c-users
  
Actual results:

$ system-config-users 
Traceback (most recent call last):
  File "/usr/share/system-config-users/system-config-users.py", line 42, in
<module>
    mainWindow.mainWindow()
  File "/usr/share/system-config-users/mainWindow.py", line 227, in __init__
    self.userWin = userWindow.userWindow(self, self.userStore,
self.groupTreeView, xml, selinuxEnabled)
  File "/usr/share/system-config-users/userWindow.py", line 65, in __init__
    uidNumber, gidNumber = userGroupFind.find_uid_gid (self.parent.ADMIN,
self.parent.preferences)
  File "/usr/share/system-config-users/userGroupFind.py", line 74, in
find_uid_gid
    gidNumber = find_gid (lu_admin, preferences,
preferences['PREFER_SAME_UID_GID'] and uidNumber or None)
  File "/usr/share/system-config-users/userGroupFind.py", line 130, in find_gid
    raise IdSpaceExceededError(gidNumber=gidNumber)
userGroupFind.IdSpaceExceededError

Expected results:

s-c-users starts or print warning message, no traceback

Additional info:

$ getent passwd xxxxxx
xxxxxx:x:4294967294:4294967294::/home/xxxxxx:/bin/bash

See also BZ#610838 comments 6, 7, 8.

Comment 1 Nils Philippsen 2010-09-08 08:45:14 UTC
I've implemented a workaround in the upstream repo:

commit faa131e7022febda9e7054583a8ee275c918c199
Author: Nils Philippsen <nils>
Date:   Fri Aug 27 17:07:03 2010 +0200

    fix startup if max uid/gid is allocated

I would fix this in RHEL by rebasing to the then current version of s-c-users (> 1.2.105) which will get fixes for other bugs found during QA.

Comment 10 Florian Nadge 2011-05-06 12:57:14 UTC
Hi,
I am assigned to review the erratum that includes this bug.

and need your help to document this bug. Please, enter a few a keywords for this bug into the Technical Notes field of this Bugzilla entry. It would be a great help if you could use the CCFR pattern I have already copied into the Technical Notes field. Of course, only where it makes sense.

For details on the Technical Notes field, see:
https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

If you have further questions, you can drop me an email or ping me (nick: fnadge) on one of the following irc channels:
#errata, #devel, #docs

Comment 11 Florian Nadge 2011-05-06 12:57:14 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.

Comment 12 Nils Philippsen 2011-05-06 13:39:57 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -3,8 +3,9 @@
 The Technical Note template, known as CCFR, is as follows:
 
 Cause
-    What actions or circumstances cause this bug to present.
+    With default settings, tries to allocate UID/GID higher than the
+    highest found at startup.
 Consequence
-    What happens when the bug presents.
+    UID/GID overflows, throws traceback.
 Fix
-    What was done to fix the bug.+    Ignores UIDs/GIDs that are at the top of the ID space.

Comment 13 errata-xmlrpc 2011-05-19 14:13:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0730.html