Bug 124967

Summary: Redhat-config-users fails with UID > 31bit
Product: Red Hat Enterprise Linux 3 Reporter: Chris Van Hoof <vanhoof>
Component: libuserAssignee: Miloslav Trmač <mitr>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: axel.thimm, kdmasary
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.53-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-14 22:53:20 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 Chris Van Hoof 2004-06-01 17:04:18 UTC
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 20:32:12 UTC
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 22:53:20 UTC
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 22:53:45 UTC
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.