Bug 306241 - newusers creates users with negative UID and GID on x86_64
Summary: newusers creates users with negative UID and GID on x86_64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils
Version: 5.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Michel Samia
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-26 00:32 UTC by Victor Ashik
Modified: 2010-03-30 08:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:13:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
This patch should solve negative UIDs and GIDs and also adds some tests of input data (6.98 KB, patch)
2007-10-25 16:35 UTC, Michel Samia
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0209 0 normal SHIPPED_LIVE shadow-utils bug fix update 2010-03-29 12:28:50 UTC

Description Victor Ashik 2007-09-26 00:32:10 UTC
Description of problem:
newusers creates users with negative UID and GID on x86_64.
I think it may be related with different UID of nfsnobody on x86_64 (it looks
like 2^32 -1)

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


How reproducible:
always

Steps to Reproduce:
1.create file with 3 lines in passwd format with empty UID and GID fields
2.execute newusers with that file
3.tail /etc/passwd
  
Actual results:
users with negative UID and GID

Expected results:
users with UID and GID in range 500-2^32

Additional info:

Comment 1 Michel Samia 2007-10-25 16:35:23 UTC
Created attachment 237611 [details]
This patch should solve negative UIDs and GIDs and also adds some tests of input data

Here is patch. Uses some features used adduser.c to avoid adding users out of
range <500; 60000>, so now you can have daemons with UID or GID 2^16 or 2^32 or
similar.

Comment 2 Michal Nowak 2008-01-11 14:04:25 UTC
Michel, 
did you tried to push the patch upstream (as far as exists, can't find more than
Debian's QA page)?

Comment 3 Peter Vrabec 2008-01-14 12:51:05 UTC
http://pkg-shadow.alioth.debian.org/

It would be great to push it upstream guys.

Comment 4 Michal Nowak 2008-01-15 08:44:38 UTC
Cool, thanks Peter, I thought it's already dead.

Michel, if you succeed pushing it upstream I'll do you QA-check for free then.

Comment 5 Michal Nowak 2008-04-02 08:57:50 UTC
The upstream mailing list is kinda vital, do you know it's fixed in latest
(4.1.1-rc1)? 

ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/snapshot/ 

Might be worth to insert a bug in their BTS in case it's unfixed upstream.

Comment 6 Michel Samia 2008-04-02 14:11:10 UTC
I sent info about this bug into the shadow mailing list... The problem with this
patch is, that it can't be applied to the current version, it needs to be
re-written to fit with the current version
http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2008-April/006478.html

Comment 7 Michel Samia 2008-04-02 16:33:51 UTC
Great! They have fixed it in 4.1.1 (quite differently than my patch - they
shared more code with adduser). It which will be released today.
http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2008-April/006479.html

Michal, you can check it now.

Comment 8 Michal Nowak 2008-04-03 08:54:06 UTC
Nice, it's fixed upstream but I guess the patch in this BZ should be in future
obsoleted by backported one. 

Comment 9 RHEL Program Management 2008-07-21 23:09:12 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 15 errata-xmlrpc 2010-03-30 08:13:40 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-2010-0209.html


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