+++ /dev/null
-diff -Naur shadow-19990827/src/groupadd.c shadow-19990827-patched/src/groupadd.c
---- shadow-19990827/src/groupadd.c Mon Jun 7 18:40:45 1999
-+++ shadow-19990827-patched/src/groupadd.c Wed Apr 12 12:25:07 2000
-@@ -72,6 +72,8 @@
- static int oflg = 0; /* permit non-unique group ID to be specified with -g */
- static int gflg = 0; /* ID value for the new group */
- static int fflg = 0; /* if group already exists, do nothing and exit(0) */
-+static int rflg = 0; /* for adding system accounts */
-+#define MIN_GID 10
-
- #ifdef NDBM
- extern int gr_dbm_mode;
-@@ -103,7 +105,7 @@
- static void
- usage(void)
- {
-- fprintf(stderr, _("usage: groupadd [-g gid [-o]] group\n"));
-+ fprintf(stderr, _("usage: groupadd [-g gid [-o]] [-r] [-f] group\n"));
- exit(E_USAGE);
- }
-
-@@ -228,9 +230,13 @@
- const struct group *grp;
- gid_t gid_min, gid_max;
-
-- gid_min = getdef_num("GID_MIN", 100);
-+ if (!rflg) {
-+ gid_min = getdef_num("GID_MIN", 500);
- gid_max = getdef_num("GID_MAX", 60000);
--
-+ } else {
-+ gid_min = MIN_GID;
-+ gid_max = getdef_num("GID_MIN", 499);
-+ }
- /*
- * Start with some GID value if the user didn't provide us with
- * one already.
-@@ -339,7 +345,7 @@
- char *cp;
- int arg;
-
-- while ((arg = getopt(argc, argv, "og:O:f")) != EOF) {
-+ while ((arg = getopt(argc, argv, "og:O:fr")) != EOF) {
- switch (arg) {
- case 'g':
- gflg++;
-@@ -383,6 +389,12 @@
- * RedHat's patch from shadow-utils-970616-9.
- */
- fflg++;
-+ break;
-+ case 'r':
-+ /*
-+ * create system group
-+ */
-+ rflg++;
- break;
- default:
- usage();
-diff -Naur shadow-19990827/src/useradd.c shadow-19990827-patched/src/useradd.c
---- shadow-19990827/src/useradd.c Mon Jun 7 18:40:45 1999
-+++ shadow-19990827-patched/src/useradd.c Wed Apr 12 12:25:41 2000
-@@ -72,10 +72,10 @@
- /*
- * These defaults are used if there is no defaults file.
- */
--static gid_t def_group = 100;
-+static gid_t def_group = 1000;
- static const char *def_gname = "other";
--static const char *def_home = "/home";
--static const char *def_shell = "";
-+static const char *def_home = "/home/users";
-+static const char *def_shell = "/dev/null";
- static const char *def_template = SKEL_DIR;
- #ifdef SHADOWPWD
- static long def_inactive = -1;
-@@ -87,7 +87,7 @@
- #define VALID(s) (strcspn (s, ":\n") == strlen (s))
-
- static const char *user_name = "";
--static const char *user_pass = "!";
-+static const char *user_pass = "!!";
- static uid_t user_id;
- static gid_t user_gid;
- static const char *user_comment = "";
-@@ -115,10 +115,13 @@
- sflg = 0, /* shell program for new account */
- cflg = 0, /* comment (GECOS) field for new account */
- mflg = 0, /* create user's home directory if it doesn't exist */
-+ nflg = 0, /* no group for this user */
- kflg = 0, /* specify a directory to fill new user directory */
-+ Mflg = 0, /* don't crate user's home directory */
- fflg = 0, /* days until account with expired password is locked */
- eflg = 0, /* days since 1970-01-01 when account is locked */
-- Dflg = 0; /* set/show new user default values */
-+ Dflg = 0, /* set/show new user default values */
-+ rflg = 0; /* system account */
-
- #ifdef AUTH_METHODS
- static int Aflg = 0; /* specify authentication method for user */
-@@ -171,6 +174,7 @@
- * exit status values
- */
- #define E_SUCCESS 0 /* success */
-+#define E_LOCKING 1 /* locking error */
- #define E_PW_UPDATE 1 /* can't update password file */
- #define E_USAGE 2 /* bad command syntax */
- #define E_BAD_ARG 3 /* invalid argument to option */
-@@ -711,7 +715,7 @@
- #ifdef AUTH_METHODS
- fprintf(stderr, _("[-A program] "));
- #endif
-- fprintf(stderr, _("[-p passwd] name\n"));
-+ fprintf(stderr, _("[-p passwd] [-n] [-r] name\n"));
-
- fprintf(stderr, _(" %s\t-D [-g group] [-b base] [-s shell]\n"),
- Prog);
-@@ -968,10 +972,13 @@
- {
- const struct passwd *pwd;
- uid_t uid_min, uid_max;
--
-- uid_min = getdef_num("UID_MIN", 100);
-+ if (!rflg) {
-+ uid_min = getdef_num("UID_MIN", 500);
- uid_max = getdef_num("UID_MAX", 60000);
--
-+ } else {
-+ uid_min = 1;
-+ uid_max = 949;
-+ }
- /*
- * Start with some UID value if the user didn't provide us with
- * one already.
-@@ -1126,9 +1133,9 @@
- char *cp;
-
- #ifdef SHADOWPWD
--#define FLAGS "A:Du:og:G:d:s:c:mk:p:f:e:b:O:M"
-+#define FLAGS "A:Du:og:G:d:s:c:mk:p:f:e:b:O:M:nr"
- #else
--#define FLAGS "A:Du:og:G:d:s:c:mk:p:b:O:M"
-+#define FLAGS "A:Du:og:G:d:s:c:mk:p:b:O:M:nr"
- #endif
- while ((arg = getopt(argc, argv, FLAGS)) != EOF) {
- #undef FLAGS
-@@ -1261,6 +1268,12 @@
- case 'o':
- oflg++;
- break;
-+ case 'n':
-+ nflg++;
-+ break;
-+ case 'r':
-+ rflg++;
-+ break;
- case 'O':
- /*
- * override login.defs defaults (-O name=value)
-@@ -1312,9 +1325,10 @@
- * Certain options are only valid in combination with others.
- * Check it here so that they can be specified in any order.
- */
-- if ((oflg && !uflg) || (kflg && !mflg))
-+ if (kflg && !mflg)
-+ usage();
-+ if (mflg && Mflg)
- usage();
--
- /*
- * Either -D or username is required. Defaults can be set with -D
- * for the -b, -e, -f, -g, -s options only.
+++ /dev/null
-Summary: Shadow password file utilities for Linux
-Summary(de): Shadow-Paßwortdatei-Dienstprogramme für Linux
-Summary(fr): Fichiers utilitaires pour Shadow password pour Linux
-Summary(pl): Narzêdzia do obs³ugi shadow passwords
-Summary(tr): Gölge parola dosyasý araçlarý
-Name: shadow
-Version: 20001016
-Release: 2
-License: BSD
-Group: Applications/System
-Group(de): Applikationen/System
-Group(pl): Aplikacje/System
-Source0: ftp://ftp.pld.org.pl/software/shadow/%{name}-%{version}.tar.gz
-Source1: %{name}-login.defs
-Source2: %{name}.useradd
-Source3: chage.pamd
-Source4: userdb.pamd
-Source5: chsh.pamd
-Source6: chfn.pamd
-Source7: passwd.pamd
-Patch1: %{name}-pld.patch
-Patch2: %{name}-utmpx.patch
-BuildRequires: pam-devel
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: gettext-devel
-Provides: shadow-utils
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes: shadow-utils
-Obsoletes: passwd
-
-%description
-This package includes the programs necessary to convert standard UNIX
-password files to the shadow password format, as well as programs for
-command-line management of the user's accounts.
- - 'pwconv' converts everything to the shadow password format.
- - 'pwunconv' unconverts from shadow passwords, generating a file in
- the current directory called npasswd that is a standard UNIX password
- file.
- - 'pwck' checks the integrity of the password and shadow files.
- - 'lastlog' prints out the last login times of all users.
- - 'useradd', 'userdel' and 'usermod' for accounts management.
- - 'groupadd', 'groupdel' and 'groupmod' for group management.
-
-A number of man pages are also included that relate to these
-utilities, and shadow passwords in general.
-
-%description -l pl
-Pakiet zawiera programy do obs³ugi shadow password. Zanjduj± siê w nim
-programy do konwersji standardowego pliku hase³ do wersji shadow
-password a tak¿e programy do zarz±danie kontami u¿ytkowników w
-systemie
- - 'pwconv' konwertuje do formatu shadow passwords
- - 'pwunconv' konwertuje z shadow passwords do formatu standardowego
- pliku hase³. W bierz±cym katalogu tworzy plik npasswd bêd±cy
- standardowym plikiem z has³ami.
- - 'lastlog' wy¶wietla czas logowanie u¿ytkowników
- - 'userdel' i 'usermod' do zarz±dzania kontami u¿ytkowników.
- - 'groupadd', 'groupdel' and 'groupmod' do zarz±dzania grupami
-
-Ostrze¿enie:
-
-Programy znajduj±ce siê w tym pakiecie s± niezbêdne do prawid³owej
-pracy twojego systemu i podobnie jak pakiet z bibliotekami systemowymi
-- glibc nigdy nie powinien zostaæ odinstalowany !
-
-%prep
-%setup -q
-%patch1 -p1
-%patch2 -p1
-
-%build
-gettextize --copy --force
-aclocal
-autoheader
-autoconf
-automake -a -c --foreign
-%configure \
- --disable-desrpc \
- --with-libcrypt \
- %{!?_without_static:--enable-static} \
- %{!?_without_static:--disable-shared} \
- %{?_without_static:--disable-static} \
- %{?_without_static:--enable-shared} \
- --with-libpam \
- --with-md5crypt \
- --with-nls \
- --without-included-gettext
-%{__make}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/{default,pam.d,skel}
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/chage
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/shadow
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/chsh
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/chfn
-install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/passwd
-
-:> $RPM_BUILD_ROOT%{_sysconfdir}/shadow
-
-echo .so pwconv.8 > $RPM_BUILD_ROOT%{_mandir}/man8/pwunconv.8
-echo .so pwconv.8 > $RPM_BUILD_ROOT%{_mandir}/man8/grpconv.8
-echo .so pwconv.8 > $RPM_BUILD_ROOT%{_mandir}/man8/grpunconv.8
-
-gzip -9nf doc/ANNOUNCE NEWS doc/README doc/README.linux doc/HOWTO
-
-%find_lang %{name}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-%{!?_without_static:#}/sbin/ldconfig
-if [ ! -f /etc/shadow ]; then
- %{_sbindir}/pwconv
-fi
-
-%{!?_without_static:#}%postun -p /sbin/ldconfig
-
-%files -f %{name}.lang
-%defattr(644,root,root,755)
-%doc doc/*.gz
-
-%attr(750,root,root) %dir %{_sysconfdir}/default
-%attr(640,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/default/*
-%attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/*
-
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/login.defs
-%attr(400,root,root) %ghost %{_sysconfdir}/shadow
-
-%dir /etc/skel
-
-%{!?_without_static:#}%attr(755,root,root) /lib/lib*.so.*.*.*
-%attr(755,root,root) %{_sbindir}/user*
-%attr(755,root,root) %{_sbindir}/group*
-%attr(755,root,root) %{_sbindir}/grpck
-%attr(755,root,root) %{_sbindir}/pwck
-%attr(755,root,root) %{_sbindir}/*conv
-%attr(755,root,root) %{_sbindir}/chpasswd
-%attr(755,root,root) %{_sbindir}/newusers
-%attr(755,root,root) %{_sbindir}/mkpasswd
-%attr(755,root,root) %{_bindir}/chage
-%attr(4755,root,root) %{_bindir}/chfn
-%attr(4755,root,root) %{_bindir}/chsh
-%attr(4755,root,root) %{_bindir}/expiry
-%attr(4755,root,root) %{_bindir}/passwd
-%attr(4755,root,root) %{_bindir}/gpasswd
-%attr(755,root,root) %{_bindir}/lastlog
-%attr(755,root,root) %{_bindir}/faillog
-%attr(755,root,root) %{_bindir}/sg
-
-%{_mandir}/man1/gpasswd.*
-%{_mandir}/man1/chage.*
-%{_mandir}/man1/chfn.*
-%{_mandir}/man1/chsh.*
-%{_mandir}/man1/passwd.*
-%{_mandir}/man5/login.defs.*
-%{_mandir}/man5/passwd.*
-%{_mandir}/man5/shadow.*
-%{_mandir}/man5/porttime.*
-%{_mandir}/man5/faillog.*
-%{_mandir}/man8/faillog.*
-%{_mandir}/man8/groupdel.*
-%{_mandir}/man8/groupmod.*
-%{_mandir}/man8/grpck.*
-%{_mandir}/man8/grpconv.*
-%{_mandir}/man8/logoutd.*
-%{_mandir}/man8/mkpasswd.*
-%{_mandir}/man8/newusers.*
-%{_mandir}/man8/pwck.*
-%{_mandir}/man8/pwunconv.*
-%{_mandir}/man8/useradd.*
-%{_mandir}/man8/userdel.*
-%{_mandir}/man8/usermod.*
-%{_mandir}/man8/lastlog.*
-%{_mandir}/man8/pwconv.*
-%{_mandir}/man8/chpasswd.*
-%{_mandir}/man8/groupadd.*
-%{_mandir}/man8/grpunconv.*
-%{_mandir}/man8/shadowconfig.*
-
-%lang(pl) %{_mandir}/pl/man1/chage.*
-%lang(pl) %{_mandir}/pl/man1/gpasswd.*
-%lang(pl) %{_mandir}/pl/man1/chfn.*
-%lang(pl) %{_mandir}/pl/man1/chsh.*
-%lang(pl) %{_mandir}/pl/man1/passwd.*
-%lang(pl) %{_mandir}/pl/man5/faillog.*
-%lang(pl) %{_mandir}/pl/man5/login.defs.*
-%lang(pl) %{_mandir}/pl/man5/passwd.*
-%lang(pl) %{_mandir}/pl/man5/porttime.*
-%lang(pl) %{_mandir}/pl/man5/shadow.*
-%lang(pl) %{_mandir}/pl/man8/chpasswd.*
-%lang(pl) %{_mandir}/pl/man8/faillog.*
-%lang(pl) %{_mandir}/pl/man8/groupadd.*
-%lang(pl) %{_mandir}/pl/man8/groupdel.*
-%lang(pl) %{_mandir}/pl/man8/groupmod.*
-%lang(pl) %{_mandir}/pl/man8/grpck.*
-%lang(pl) %{_mandir}/pl/man8/lastlog.*
-%lang(pl) %{_mandir}/pl/man8/logoutd.*
-%lang(pl) %{_mandir}/pl/man8/mkpasswd.*
-%lang(pl) %{_mandir}/pl/man8/newusers.*
-%lang(pl) %{_mandir}/pl/man8/pwck.*
-%lang(pl) %{_mandir}/pl/man8/pwconv.*
-%lang(pl) %{_mandir}/pl/man8/shadowconfig.*
-%lang(pl) %{_mandir}/pl/man8/useradd.*
-%lang(pl) %{_mandir}/pl/man8/userdel.*
-%lang(pl) %{_mandir}/pl/man8/usermod.*