pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40737: bad flag in useradd for Linux



>Number:         40737
>Category:       pkg
>Synopsis:       bad flag in useradd for Linux
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 24 16:20:04 +0000 2009
>Originator:     Piotr Meyer
>Release:        none
>Organization:
>Environment:
Linux tester 2.6.26-1-686 #1 SMP Mon Dec 15 18:15:07 UTC 2008 i686 GNU/Linux

>Description:
Changes made in pkgsrc/mk/pkginstall/usergroupfuncs.Linux (rev 1.4) should be 
reverted. '-M' flags for 'useradd' command looks like 
RedHat-specific extension, not supported by other distros (ok, at this moment 
we are able to build packages under CentOS too). 

In result we can't build packages in following environments:
- Debian 4 (etch)
- Debian 5 (lenny)
- Ubuntu 8.04 
- Ubuntu 8.10
- Slackware (at least 10.x)
...and, probably, others.
>How-To-Repeat:
Try to build any packages that requires extra users, for example 
security/amavisd-new:

# bmake package
=> Bootstrap dependency digest>=20010302: found digest-20080510
=> Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806
===> Checking for vulnerabilities in amavisd-new-2.6.2
===> Installing for amavisd-new-2.6.2
=> Generating pre-install file lists
=> Creating installation directories
=> Running PRE-INSTALL script actions
amavisd-new-2.6.2: Creating user ``vscan''
Usage: useradd [options] LOGIN

Options:
  -b, --base-dir BASE_DIR       base directory for the new user account
                                home directory
  -c, --comment COMMENT         set the GECOS field for the new user account
  -d, --home-dir HOME_DIR       home directory for the new user account
  -D, --defaults                print or save modified default useradd
                                configuration
  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -f, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -g, --gid GROUP               force use GROUP for the new user account
  -G, --groups GROUPS           list of supplementary groups for the new
                                user account
  -h, --help                    display this help message and exit
  -k, --skel SKEL_DIR           specify an alternative skel directory
  -K, --key KEY=VALUE           overrides /etc/login.defs defaults
  -l,                           do not add the user to the lastlog and
                                faillog databases
  -m, --create-home             create home directory for the new user
                                account
  -N, --no-user-group           do not create a group with the same name as
                                the user
  -o, --non-unique              allow create user with duplicate
                                (non-unique) UID
  -p, --password PASSWORD       use encrypted password for the new user
                                account
  -r, --system                  create a system account
  -s, --shell SHELL             the login shell for the new user account
  -u, --uid UID                 force use the UID for the new user account
  -U, --user-group              create a group with the same name as the user

===========================================================================
The following users need to be created for amavisd-new-2.6.2:

        vscan: vscan, /var/lib/amavis, /bin/sh

===========================================================================
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/security/amavisd-new
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/security/amavisd-new
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/security/amavisd-new

>Fix:
Revert changes from pkgsrc/mk/pkginstall/usergroupfuncs.Linux to rev 1.3.



Home | Main Index | Thread Index | Old Index