Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 235641 - useradd dumps core when build without WITH_SELINUX
Summary: useradd dumps core when build without WITH_SELINUX
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-08 23:52 UTC by Wolfgang Denk
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-10 10:25:35 UTC

Attachments (Terms of Use)

Description Wolfgang Denk 2007-04-08 23:52:03 UTC
Description of problem:

The "useradd" command will dump core if shadow-utils gets built without SELINUX

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


How reproducible:

Steps to Reproduce:
1. Build shadow-utils without SELINUX support
2. Install it
3. Run "useradd ... -u user ..."
Actual results:

Core dump.

Expected results:

User added.

Additional info:

Patch "shadow-4.0.17-useradd.patch" contains this hunk:

        --- shadow-4.0.17/src/useradd.c.useradd 2007-01-16 18:24:34.000000000 +0100
        +++ shadow-4.0.17/src/useradd.c 2007-01-16 18:24:34.000000000 +0100
        @@ -1048,11 +1054,18 @@
        -                       getopt_long (argc, argv,
        +#ifdef WITH_SELINUX
        +                       getopt_long (argc, argv,
        +                       getopt_long (argc, argv,

   The code in the #else part is wrong - it drops the colon  for  the
   -u  option,  which  causes  the  useradd command to dump core when
   built without the  WITH_SELINUX  setting.  The  code  should  read

        +                       getopt_long (argc, argv,

Comment 1 Peter Vrabec 2007-04-10 10:19:15 UTC
thnx. Wolfgang, 
it's fixed in shadow-utils-

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