Bug 124967 - Redhat-config-users fails with UID > 31bit
Redhat-config-users fails with UID > 31bit
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: libuser (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-01 13:04 EDT by Chris Van Hoof
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.53-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-14 17:53:20 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 Chris Van Hoof 2004-06-01 13:04:18 EDT
Description of problem:
App fails when a UID > 2147483648 is entered

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

How reproducible:
Run application, and enter UID > 2147483648 and save changes. 
Application will fail with python traceback.

Steps to Reproduce:
1. Start App
2. Enter UID > 2147483648
3. Create user
  
Actual results:

[root@localhost root]# redhat-config-users & 
[1] 67815 
[root@ashurst root]# Traceback (most recent call last): 
  File "/usr/share/redhat-config-users/userWindow.py", line 237, in 
on_userWin_ok_button_clicked 
    uidNumber = int(self.uidSpinButton.get_value()) 
OverflowError: float too large to convert


Expected results: User should be created with UID specified


Additional info:

Problem is with the size of an int.  2147483648 is 2**31, a Python int
can only hold up to 2**31-1.  For anything from 2**31 through 2**63-1,
it needs to be a long int.
Comment 1 Brent Fox 2004-06-24 16:32:12 EDT
The conversion to Python2.3 will make the initial problem go away
because of better longint handling in Python 2.3

From http://www.python.org/2.3/highlights.html:
int() - this can now return a long when converting a string with     
                                                        many digits,
rather than raising OverflowError. 

However, this causes another traceback:

Traceback (most recent call last):
  File
"/home/devel/bfox/fedora/system-config-users/src/userWindow.py", line
257, in on_userWin_ok_button_clicked
    uid = self.parent.ADMIN.lookupUserById(uidNumber)
OverflowError: long int too large to convert to int

I'm guessing that this traceback is a problem in the libuser Python
bindings.  Changing component to libuser to see if Nalin knows more.
Comment 2 Miloslav Trmač 2004-11-14 17:53:20 EST
libuser-0.53-1, which will appear in rawhide soon,
handles >31-bit ID values correctly. This should allow
system-config-users to handle them too.
Comment 3 Miloslav Trmač 2004-11-14 17:53:45 EST
libuser-0.53-1, which will appear in rawhide soon,
handles >31-bit ID values correctly. This should allow
system-config-users to handle them too.

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