This commit is contained in:
Peter Vrabec 2009-05-15 10:46:55 +00:00
parent d4689ff3b2
commit c28651e7a4
6 changed files with 83 additions and 103 deletions

View File

@ -1 +1 @@
shadow-4.1.3.1.tar.gz
shadow-4.1.4.tar.gz

View File

@ -1,21 +0,0 @@
diff -up shadow-4.1.3.1/src/lastlog.c.lastlog shadow-4.1.3.1/src/lastlog.c
--- shadow-4.1.3.1/src/lastlog.c.lastlog 2009-04-22 10:29:53.000000000 +0200
+++ shadow-4.1.3.1/src/lastlog.c 2009-04-22 10:30:40.000000000 +0200
@@ -266,8 +266,7 @@ int main (int argc, char **argv)
exit (1);
}
- print ();
- /* Get the laslog size */
+ /* Get the lastlog size */
if (fstat (fileno (lastlogfile), &statbuf) != 0) {
fprintf (stderr,
_("lastlog: Cannot get the size of %s: %s\n"),
@@ -275,6 +274,7 @@ int main (int argc, char **argv)
exit (1);
}
+ print ();
fclose (lastlogfile);
exit (0);
}

View File

@ -1,75 +0,0 @@
diff -up shadow-4.1.3/libmisc/find_new_gid.c.redhat shadow-4.1.3/libmisc/find_new_gid.c
--- shadow-4.1.3/libmisc/find_new_gid.c.redhat 2009-04-11 17:55:13.000000000 +0200
+++ shadow-4.1.3/libmisc/find_new_gid.c 2009-04-14 14:49:34.000000000 +0200
@@ -56,11 +56,11 @@ int find_new_gid (bool sys_group, gid_t
assert (gid != NULL);
if (!sys_group) {
- gid_min = getdef_ulong ("GID_MIN", 1000L);
+ gid_min = getdef_ulong ("GID_MIN", 500L);
gid_max = getdef_ulong ("GID_MAX", 60000L);
} else {
gid_min = getdef_ulong ("SYS_GID_MIN", 1L);
- gid_max = getdef_ulong ("GID_MIN", 1000L) - 1;
+ gid_max = getdef_ulong ("GID_MIN", 500L) - 1;
gid_max = getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max);
}
used_gids = alloca (sizeof (char) * gid_max +1);
diff -up shadow-4.1.3/libmisc/find_new_uid.c.redhat shadow-4.1.3/libmisc/find_new_uid.c
--- shadow-4.1.3/libmisc/find_new_uid.c.redhat 2009-04-11 17:53:19.000000000 +0200
+++ shadow-4.1.3/libmisc/find_new_uid.c 2009-04-14 14:49:34.000000000 +0200
@@ -56,11 +56,11 @@ int find_new_uid (bool sys_user, uid_t *
assert (uid != NULL);
if (!sys_user) {
- uid_min = getdef_ulong ("UID_MIN", 1000L);
+ uid_min = getdef_ulong ("UID_MIN", 500L);
uid_max = getdef_ulong ("UID_MAX", 60000L);
} else {
uid_min = getdef_ulong ("SYS_UID_MIN", 1L);
- uid_max = getdef_ulong ("UID_MIN", 1000L) - 1;
+ uid_max = getdef_ulong ("UID_MIN", 500L) - 1;
uid_max = getdef_ulong ("SYS_UID_MAX", (unsigned long) uid_max);
}
used_uids = alloca (sizeof (char) * uid_max +1);
diff -up shadow-4.1.3/src/useradd.c.redhat shadow-4.1.3/src/useradd.c
--- shadow-4.1.3/src/useradd.c.redhat 2009-04-11 20:39:52.000000000 +0200
+++ shadow-4.1.3/src/useradd.c 2009-04-14 14:58:17.000000000 +0200
@@ -89,7 +89,7 @@ char *Prog;
static gid_t def_group = 100;
static const char *def_gname = "other";
static const char *def_home = "/home";
-static const char *def_shell = "";
+static const char *def_shell = "/sbin/nologin";
static const char *def_template = SKEL_DIR;
static const char *def_create_mail_spool = "no";
@@ -101,7 +101,7 @@ static char def_file[] = USER_DEFAULTS_F
#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 = "";
@@ -978,9 +978,9 @@ static void process_flags (int argc, cha
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
+ "b:c:d:De:f:g:G:k:K:lmMnNop:rs:u:UZ:",
#else
- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
+ "b:c:d:De:f:g:G:k:K:lmMnNop:rs:u:U",
#endif
long_options, NULL)) != -1) {
switch (c) {
@@ -1130,6 +1130,7 @@ static void process_flags (int argc, cha
case 'M':
Mflg = true;
break;
+ case 'n':
case 'N':
Nflg = true;
break;

75
shadow-4.1.4-redhat.patch Normal file
View File

@ -0,0 +1,75 @@
diff -up shadow-4.1.4/libmisc/find_new_gid.c.redhat shadow-4.1.4/libmisc/find_new_gid.c
--- shadow-4.1.4/libmisc/find_new_gid.c.redhat 2009-04-23 19:36:42.000000000 +0200
+++ shadow-4.1.4/libmisc/find_new_gid.c 2009-05-15 12:01:18.000000000 +0200
@@ -58,11 +58,11 @@ int find_new_gid (bool sys_group,
assert (gid != NULL);
if (!sys_group) {
- gid_min = (gid_t) getdef_ulong ("GID_MIN", 1000UL);
+ gid_min = (gid_t) getdef_ulong ("GID_MIN", 500UL);
gid_max = (gid_t) getdef_ulong ("GID_MAX", 60000UL);
} else {
gid_min = (gid_t) getdef_ulong ("SYS_GID_MIN", 1UL);
- gid_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1;
+ gid_max = (gid_t) getdef_ulong ("GID_MIN", 500UL) - 1;
gid_max = (gid_t) getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max);
}
used_gids = alloca (sizeof (bool) * (gid_max +1));
diff -up shadow-4.1.4/libmisc/find_new_uid.c.redhat shadow-4.1.4/libmisc/find_new_uid.c
--- shadow-4.1.4/libmisc/find_new_uid.c.redhat 2009-04-23 19:37:12.000000000 +0200
+++ shadow-4.1.4/libmisc/find_new_uid.c 2009-05-15 12:01:39.000000000 +0200
@@ -58,11 +58,11 @@ int find_new_uid (bool sys_user,
assert (uid != NULL);
if (!sys_user) {
- uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
+ uid_min = (uid_t) getdef_ulong ("UID_MIN", 500UL);
uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
} else {
uid_min = (uid_t) getdef_ulong ("SYS_UID_MIN", 1UL);
- uid_max = (uid_t) getdef_ulong ("UID_MIN", 1000UL) - 1;
+ uid_max = (uid_t) getdef_ulong ("UID_MIN", 500UL) - 1;
uid_max = (uid_t) getdef_ulong ("SYS_UID_MAX", (unsigned long) uid_max);
}
used_uids = alloca (sizeof (bool) * (uid_max +1));
diff -up shadow-4.1.4/src/useradd.c.redhat shadow-4.1.4/src/useradd.c
--- shadow-4.1.4/src/useradd.c.redhat 2009-05-10 20:26:35.000000000 +0200
+++ shadow-4.1.4/src/useradd.c 2009-05-15 11:59:40.000000000 +0200
@@ -90,7 +90,7 @@ char *Prog;
static gid_t def_group = 100;
static const char *def_gname = "other";
static const char *def_home = "/home";
-static const char *def_shell = "";
+static const char *def_shell = "/sbin/nologin";
static const char *def_template = SKEL_DIR;
static const char *def_create_mail_spool = "no";
@@ -102,7 +102,7 @@ static char def_file[] = USER_DEFAULTS_F
#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 = "";
@@ -996,9 +996,9 @@ static void process_flags (int argc, cha
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
+ "b:c:d:De:f:g:G:k:K:lmMnNop:rs:u:UZ:",
#else
- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
+ "b:c:d:De:f:g:G:k:K:lmMnNop:rs:u:U",
#endif
long_options, NULL)) != -1) {
switch (c) {
@@ -1148,6 +1148,7 @@ static void process_flags (int argc, cha
case 'M':
Mflg = true;
break;
+ case 'n':
case 'N':
Nflg = true;
break;

View File

@ -1,15 +1,14 @@
Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils
Version: 4.1.3.1
Release: 2%{?dist}
Version: 4.1.4
Release: 1%{?dist}
Epoch: 2
URL: http://pkg-shadow.alioth.debian.org/
Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.gz
Source1: shadow-4.0.17-login.defs
Source2: shadow-4.0.18.1-useradd
Patch0: shadow-4.1.3-redhat.patch
Patch0: shadow-4.1.4-redhat.patch
Patch1: shadow-4.1.3-goodname.patch
Patch2: shadow-4.1.3-lastlog.patch
License: BSD and GPLv2+
Group: System Environment/Base
BuildRequires: libselinux-devel >= 1.25.2-1
@ -36,7 +35,6 @@ are used for managing group accounts.
%setup -q -n shadow-%{version}
%patch0 -p1 -b .redhat
%patch1 -p1 -b .goodname
%patch2 -p1 -b .lastlog
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO
@ -176,6 +174,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/vigr.8*
%changelog
* Fri May 15 2009 Peter Vrabec <pvrabec@redhat.com> 2:4.1.4-1
- upgrade
* Wed Apr 22 2009 Peter Vrabec <pvrabec@redhat.com> 2:4.1.3.1-2
- lastlog fix

View File

@ -1 +1 @@
dd22f2ad8f7550bc1177ddcca49877ff shadow-4.1.3.1.tar.gz
e1072df927bfb4410ee4dfe26dd81a17 shadow-4.1.4.tar.gz