upgrade
This commit is contained in:
parent
c28651e7a4
commit
f556cf968e
@ -1 +1 @@
|
||||
shadow-4.1.4.tar.gz
|
||||
shadow-4.1.4.1.tar.bz2
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up shadow-4.1.3/libmisc/chkname.c.goodname shadow-4.1.3/libmisc/chkname.c
|
||||
--- shadow-4.1.3/libmisc/chkname.c.goodname 2008-12-23 23:42:21.000000000 +0100
|
||||
+++ shadow-4.1.3/libmisc/chkname.c 2009-04-14 11:46:21.000000000 +0200
|
||||
@@ -54,20 +54,28 @@
|
||||
diff -up shadow-4.1.4.1/libmisc/chkname.c.goodname shadow-4.1.4.1/libmisc/chkname.c
|
||||
--- shadow-4.1.4.1/libmisc/chkname.c.goodname 2009-04-28 21:14:04.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/chkname.c 2009-06-16 13:47:08.000000000 +0200
|
||||
@@ -49,20 +49,28 @@
|
||||
static bool is_valid_name (const char *name)
|
||||
{
|
||||
/*
|
||||
@ -40,28 +40,28 @@ diff -up shadow-4.1.3/libmisc/chkname.c.goodname shadow-4.1.3/libmisc/chkname.c
|
||||
return false;
|
||||
}
|
||||
}
|
||||
diff -up shadow-4.1.3/man/groupadd.8.goodname shadow-4.1.3/man/groupadd.8
|
||||
--- shadow-4.1.3/man/groupadd.8.goodname 2009-04-12 04:46:15.000000000 +0200
|
||||
+++ shadow-4.1.3/man/groupadd.8 2009-04-14 11:45:13.000000000 +0200
|
||||
@@ -139,9 +139,7 @@ Shadow password suite configuration\&.
|
||||
diff -up shadow-4.1.4.1/man/groupadd.8.goodname shadow-4.1.4.1/man/groupadd.8
|
||||
--- shadow-4.1.4.1/man/groupadd.8.goodname 2009-05-22 15:56:08.000000000 +0200
|
||||
+++ shadow-4.1.4.1/man/groupadd.8 2009-06-16 13:50:41.000000000 +0200
|
||||
@@ -153,9 +153,7 @@ Shadow password suite configuration\&.
|
||||
.RE
|
||||
.SH "CAVEATS"
|
||||
.PP
|
||||
-Groupnames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
|
||||
-Groupnames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
|
||||
-.PP
|
||||
-Groupnames may only be up to 16 characters long\&.
|
||||
+Groupnames may only be up to 32 characters long\&.
|
||||
.PP
|
||||
You may not add a NIS or LDAP group\&. This must be performed on the corresponding server\&.
|
||||
.PP
|
||||
diff -up shadow-4.1.3/man/useradd.8.goodname shadow-4.1.3/man/useradd.8
|
||||
--- shadow-4.1.3/man/useradd.8.goodname 2009-04-12 04:46:35.000000000 +0200
|
||||
+++ shadow-4.1.3/man/useradd.8 2009-04-14 11:45:13.000000000 +0200
|
||||
@@ -385,8 +385,6 @@ Similarly, if the username already exist
|
||||
diff -up shadow-4.1.4.1/man/useradd.8.goodname shadow-4.1.4.1/man/useradd.8
|
||||
--- shadow-4.1.4.1/man/useradd.8.goodname 2009-05-22 15:56:28.000000000 +0200
|
||||
+++ shadow-4.1.4.1/man/useradd.8 2009-06-16 13:51:17.000000000 +0200
|
||||
@@ -405,8 +405,6 @@ Similarly, if the username already exist
|
||||
\fBuseradd\fR
|
||||
will deny the user account creation request\&.
|
||||
.PP
|
||||
-Usernames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
|
||||
-Usernames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
|
||||
-.PP
|
||||
Usernames may only be up to 32 characters long\&.
|
||||
.SH "CONFIGURATION"
|
230
shadow-4.1.4.1-largeGroup.patch
Normal file
230
shadow-4.1.4.1-largeGroup.patch
Normal file
@ -0,0 +1,230 @@
|
||||
diff -U0 shadow-4.1.4.1/ChangeLog.large_group shadow-4.1.4.1/ChangeLog
|
||||
diff -up shadow-4.1.4.1/lib/gshadow.c.large_group shadow-4.1.4.1/lib/gshadow.c
|
||||
--- shadow-4.1.4.1/lib/gshadow.c.large_group 2009-04-23 13:53:56.000000000 +0200
|
||||
+++ shadow-4.1.4.1/lib/gshadow.c 2009-06-16 14:47:08.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) 1990 - 1994, Julianne Frances Haugh
|
||||
* Copyright (c) 1996 - 1998, Marek Michałkiewicz
|
||||
* Copyright (c) 2005 , Tomasz Kłoczko
|
||||
- * Copyright (c) 2008 , Nicolas François
|
||||
+ * Copyright (c) 2008 - 2009, Nicolas François
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "prototypes.h"
|
||||
#include "defines.h"
|
||||
static /*@null@*/FILE *shadow;
|
||||
-static char sgrbuf[BUFSIZ * 4];
|
||||
static /*@null@*//*@only@*/char **members = NULL;
|
||||
static size_t nmembers = 0;
|
||||
static /*@null@*//*@only@*/char **admins = NULL;
|
||||
@@ -131,12 +130,25 @@ void endsgent (void)
|
||||
|
||||
/*@observer@*//*@null@*/struct sgrp *sgetsgent (const char *string)
|
||||
{
|
||||
+ static char *sgrbuf = NULL;
|
||||
+ static size_t sgrbuflen = 0;
|
||||
+
|
||||
char *fields[FIELDS];
|
||||
char *cp;
|
||||
int i;
|
||||
+ size_t len = strlen (string) + 1;
|
||||
+
|
||||
+ if (len > sgrbuflen) {
|
||||
+ char *buf = (char *) realloc (sgrbuf, sizeof (char) * len);
|
||||
+ if (NULL == buf) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ sgrbuf = buf;
|
||||
+ sgrbuflen = len;
|
||||
+ }
|
||||
|
||||
- strncpy (sgrbuf, string, sizeof sgrbuf - 1);
|
||||
- sgrbuf[sizeof sgrbuf - 1] = '\0';
|
||||
+ strncpy (sgrbuf, string, len);
|
||||
+ sgrbuf[len-1] = '\0';
|
||||
|
||||
cp = strrchr (sgrbuf, '\n');
|
||||
if (NULL != cp) {
|
||||
@@ -161,7 +173,7 @@ void endsgent (void)
|
||||
* the line is invalid.
|
||||
*/
|
||||
|
||||
- if ((NULL != cp) || (i != FIELDS))
|
||||
+ if ((NULL != cp) || (i != FIELDS)) {
|
||||
#ifdef USE_NIS
|
||||
if (!IS_NISCHAR (fields[0][0])) {
|
||||
return 0;
|
||||
@@ -171,6 +183,7 @@ void endsgent (void)
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
+ }
|
||||
|
||||
sgroup.sg_name = fields[0];
|
||||
sgroup.sg_passwd = fields[1];
|
||||
@@ -199,20 +212,48 @@ void endsgent (void)
|
||||
|
||||
/*@observer@*//*@null@*/struct sgrp *fgetsgent (/*@null@*/FILE * fp)
|
||||
{
|
||||
- char buf[sizeof sgrbuf];
|
||||
+ static size_t buflen = 0;
|
||||
+ static char *buf = NULL;
|
||||
+
|
||||
char *cp;
|
||||
+ struct sgrp *ret;
|
||||
+
|
||||
+ if (0 == buflen) {
|
||||
+ buf = (char *) malloc (BUFSIZ);
|
||||
+ if (NULL == buf) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (NULL == fp) {
|
||||
- return (0);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
#ifdef USE_NIS
|
||||
- while (fgetsx (buf, (int) sizeof buf, fp) != (char *) 0)
|
||||
+ while (fgetsx (buf, (int) sizeof buf, fp) == buf)
|
||||
#else
|
||||
- if (fgetsx (buf, (int) sizeof buf, fp) != (char *) 0)
|
||||
+ if (fgetsx (buf, (int) sizeof buf, fp) == buf)
|
||||
#endif
|
||||
{
|
||||
- cp = strchr (buf, '\n');
|
||||
+ while ( ((cp = strrchr (buf, '\n')) == NULL)
|
||||
+ && (feof (fp) == 0)) {
|
||||
+ size_t len;
|
||||
+
|
||||
+ cp = (char *) realloc (buf, buflen*2);
|
||||
+ if (NULL == cp) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ buf = cp;
|
||||
+ buflen *= 2;
|
||||
+
|
||||
+ len = strlen (buf);
|
||||
+ if (fgetsx (&buf[len],
|
||||
+ (int) (buflen - len),
|
||||
+ fp) != &buf[len]) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ cp = strrchr (buf, '\n');
|
||||
if (NULL != cp) {
|
||||
*cp = '\0';
|
||||
}
|
||||
@@ -223,7 +264,7 @@ void endsgent (void)
|
||||
#endif
|
||||
return (sgetsgent (buf));
|
||||
}
|
||||
- return 0;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -235,7 +276,6 @@ void endsgent (void)
|
||||
#ifdef USE_NIS
|
||||
bool nis_1_group = false;
|
||||
struct sgrp *val;
|
||||
- char buf[BUFSIZ];
|
||||
#endif
|
||||
if (NULL == shadow) {
|
||||
setsgent ();
|
||||
@@ -334,7 +374,6 @@ void endsgent (void)
|
||||
struct sgrp *sgrp;
|
||||
|
||||
#ifdef USE_NIS
|
||||
- char buf[BUFSIZ];
|
||||
static char save_name[16];
|
||||
int nis_disabled = 0;
|
||||
#endif
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetgrgid.c.large_group shadow-4.1.4.1/libmisc/xgetgrgid.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetgrgid.c.large_group 2008-09-06 16:56:51.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetgrgid.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ARG_TYPE gid_t
|
||||
#define ARG_NAME gid
|
||||
#define DUP_FUNCTION __gr_dup
|
||||
-#define MAX_LENGTH 0x8000
|
||||
#define HAVE_FUNCTION_R (defined HAVE_GETGRGID_R)
|
||||
|
||||
#include "xgetXXbyYY.c"
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetgrnam.c.large_group shadow-4.1.4.1/libmisc/xgetgrnam.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetgrnam.c.large_group 2008-09-06 16:56:57.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetgrnam.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ARG_TYPE const char *
|
||||
#define ARG_NAME name
|
||||
#define DUP_FUNCTION __gr_dup
|
||||
-#define MAX_LENGTH 0x8000
|
||||
#define HAVE_FUNCTION_R (defined HAVE_GETGRNAM_R)
|
||||
|
||||
#include "xgetXXbyYY.c"
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetpwnam.c.large_group shadow-4.1.4.1/libmisc/xgetpwnam.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetpwnam.c.large_group 2008-09-06 16:57:05.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetpwnam.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ARG_TYPE const char *
|
||||
#define ARG_NAME name
|
||||
#define DUP_FUNCTION __pw_dup
|
||||
-#define MAX_LENGTH 0x8000
|
||||
#define HAVE_FUNCTION_R (defined HAVE_GETPWNAM_R)
|
||||
|
||||
#include "xgetXXbyYY.c"
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetpwuid.c.large_group shadow-4.1.4.1/libmisc/xgetpwuid.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetpwuid.c.large_group 2008-09-06 16:57:11.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetpwuid.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ARG_TYPE uid_t
|
||||
#define ARG_NAME uid
|
||||
#define DUP_FUNCTION __pw_dup
|
||||
-#define MAX_LENGTH 0x8000
|
||||
#define HAVE_FUNCTION_R (defined HAVE_GETPWUID_R)
|
||||
|
||||
#include "xgetXXbyYY.c"
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetspnam.c.large_group shadow-4.1.4.1/libmisc/xgetspnam.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetspnam.c.large_group 2008-09-06 16:57:17.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetspnam.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -58,7 +58,6 @@
|
||||
#define ARG_TYPE const char *
|
||||
#define ARG_NAME name
|
||||
#define DUP_FUNCTION __spw_dup
|
||||
-#define MAX_LENGTH 0x8000
|
||||
#define HAVE_FUNCTION_R (defined HAVE_GETSPNAM_R)
|
||||
|
||||
#include "xgetXXbyYY.c"
|
||||
diff -up shadow-4.1.4.1/libmisc/xgetXXbyYY.c.large_group shadow-4.1.4.1/libmisc/xgetXXbyYY.c
|
||||
--- shadow-4.1.4.1/libmisc/xgetXXbyYY.c.large_group 2009-04-23 11:15:53.000000000 +0200
|
||||
+++ shadow-4.1.4.1/libmisc/xgetXXbyYY.c 2009-06-16 14:15:08.000000000 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
exit (13);
|
||||
}
|
||||
|
||||
- do {
|
||||
+ while (true) {
|
||||
int status;
|
||||
LOOKUP_TYPE *resbuf = NULL;
|
||||
buffer = (char *)realloc (buffer, length);
|
||||
@@ -106,8 +106,14 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- length *= 4;
|
||||
- } while (length < MAX_LENGTH);
|
||||
+ if (length <= ((size_t)-1 / 4)) {
|
||||
+ length *= 4;
|
||||
+ } else if (length == (size_t) -1) {
|
||||
+ break;
|
||||
+ } else {
|
||||
+ length = (size_t) -1;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
free(buffer);
|
||||
free(result);
|
||||
diff -up shadow-4.1.4.1/NEWS.large_group shadow-4.1.4.1/NEWS
|
@ -1,14 +1,15 @@
|
||||
Summary: Utilities for managing accounts and shadow password files
|
||||
Name: shadow-utils
|
||||
Version: 4.1.4
|
||||
Version: 4.1.4.1
|
||||
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
|
||||
Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2
|
||||
Source1: shadow-4.0.17-login.defs
|
||||
Source2: shadow-4.0.18.1-useradd
|
||||
Patch0: shadow-4.1.4-redhat.patch
|
||||
Patch1: shadow-4.1.3-goodname.patch
|
||||
Patch1: shadow-4.1.4.1-goodname.patch
|
||||
Patch2: shadow-4.1.4.1-largeGroup.patch
|
||||
License: BSD and GPLv2+
|
||||
Group: System Environment/Base
|
||||
BuildRequires: libselinux-devel >= 1.25.2-1
|
||||
@ -35,6 +36,7 @@ are used for managing group accounts.
|
||||
%setup -q -n shadow-%{version}
|
||||
%patch0 -p1 -b .redhat
|
||||
%patch1 -p1 -b .goodname
|
||||
%patch2 -p1 -b .largeGroup
|
||||
|
||||
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
||||
cp -f doc/HOWTO.utf8 doc/HOWTO
|
||||
@ -174,6 +176,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man8/vigr.8*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 16 2009 Peter Vrabec <pvrabec@redhat.com> 2:4.1.4.1-1
|
||||
- upgrade
|
||||
|
||||
* Fri May 15 2009 Peter Vrabec <pvrabec@redhat.com> 2:4.1.4-1
|
||||
- upgrade
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user