Add patch to include crypt.h, if present

Use %%make_{build,install} macros
Refresh other patches for proper alignment
This commit is contained in:
Björn Esser 2018-02-06 11:33:37 +01:00
parent 2d4f6e1972
commit 41955fa9ab
No known key found for this signature in database
GPG key ID: F52E98007594C21D
22 changed files with 307 additions and 207 deletions

View file

@ -1,6 +1,7 @@
diff -up shadow-4.1.5/src/grpconv.c.2ndskip shadow-4.1.5/src/grpconv.c Index: shadow-4.5/src/grpconv.c
--- shadow-4.1.5/src/grpconv.c.2ndskip 2012-06-18 13:08:34.438910815 +0200 ===================================================================
+++ shadow-4.1.5/src/grpconv.c 2012-06-18 13:12:51.270764552 +0200 --- shadow-4.5.orig/src/grpconv.c
+++ shadow-4.5/src/grpconv.c
@@ -143,6 +143,7 @@ int main (int argc, char **argv) @@ -143,6 +143,7 @@ int main (int argc, char **argv)
struct group grent; struct group grent;
const struct sgrp *sg; const struct sgrp *sg;
@ -48,9 +49,10 @@ diff -up shadow-4.1.5/src/grpconv.c.2ndskip shadow-4.1.5/src/grpconv.c
} }
/* /*
diff -up shadow-4.1.5/src/pwconv.c.2ndskip shadow-4.1.5/src/pwconv.c Index: shadow-4.5/src/pwconv.c
--- shadow-4.1.5/src/pwconv.c.2ndskip 2012-06-18 11:23:33.938511797 +0200 ===================================================================
+++ shadow-4.1.5/src/pwconv.c 2012-06-18 12:57:18.396426194 +0200 --- shadow-4.5.orig/src/pwconv.c
+++ shadow-4.5/src/pwconv.c
@@ -173,6 +173,7 @@ int main (int argc, char **argv) @@ -173,6 +173,7 @@ int main (int argc, char **argv)
struct passwd pwent; struct passwd pwent;
const struct spwd *sp; const struct spwd *sp;

View file

@ -1,8 +1,8 @@
diff -up shadow-4.1.5/man/useradd.8.redhat shadow-4.1.5/man/useradd.8 Index: shadow-4.5/src/useradd.c
diff -up shadow-4.1.5/src/useradd.c.redhat shadow-4.1.5/src/useradd.c ===================================================================
--- shadow-4.1.5/src/useradd.c.redhat 2011-12-09 23:23:15.000000000 +0100 --- shadow-4.5.orig/src/useradd.c
+++ shadow-4.1.5/src/useradd.c 2012-03-19 09:50:05.227588669 +0100 +++ shadow-4.5/src/useradd.c
@@ -93,7 +93,7 @@ const char *Prog; @@ -98,7 +98,7 @@ const char *Prog;
static gid_t def_group = 100; static gid_t def_group = 100;
static const char *def_gname = "other"; static const char *def_gname = "other";
static const char *def_home = "/home"; static const char *def_home = "/home";
@ -11,7 +11,7 @@ diff -up shadow-4.1.5/src/useradd.c.redhat shadow-4.1.5/src/useradd.c
static const char *def_template = SKEL_DIR; static const char *def_template = SKEL_DIR;
static const char *def_create_mail_spool = "no"; static const char *def_create_mail_spool = "no";
@@ -103,7 +103,7 @@ static const char *def_expire = ""; @@ -108,7 +108,7 @@ static const char *def_expire = "";
#define VALID(s) (strcspn (s, ":\n") == strlen (s)) #define VALID(s) (strcspn (s, ":\n") == strlen (s))
static const char *user_name = ""; static const char *user_name = "";
@ -20,7 +20,7 @@ diff -up shadow-4.1.5/src/useradd.c.redhat shadow-4.1.5/src/useradd.c
static uid_t user_id; static uid_t user_id;
static gid_t user_gid; static gid_t user_gid;
static const char *user_comment = ""; static const char *user_comment = "";
@@ -1011,9 +1011,9 @@ static void process_flags (int argc, cha @@ -1059,9 +1059,9 @@ static void process_flags (int argc, cha
}; };
while ((c = getopt_long (argc, argv, while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
@ -32,7 +32,7 @@ diff -up shadow-4.1.5/src/useradd.c.redhat shadow-4.1.5/src/useradd.c
#endif /* !WITH_SELINUX */ #endif /* !WITH_SELINUX */
long_options, NULL)) != -1) { long_options, NULL)) != -1) {
switch (c) { switch (c) {
@@ -1164,6 +1164,7 @@ static void process_flags (int argc, cha @@ -1212,6 +1212,7 @@ static void process_flags (int argc, cha
case 'M': case 'M':
Mflg = true; Mflg = true;
break; break;

View file

@ -1,6 +1,7 @@
diff -up shadow-4.1.5.1/lib/semanage.c.default-range shadow-4.1.5.1/lib/semanage.c Index: shadow-4.5/lib/semanage.c
--- shadow-4.1.5.1/lib/semanage.c.default-range 2012-01-08 17:35:44.000000000 +0100 ===================================================================
+++ shadow-4.1.5.1/lib/semanage.c 2013-06-14 15:14:51.970237594 +0200 --- shadow-4.5.orig/lib/semanage.c
+++ shadow-4.5/lib/semanage.c
@@ -143,6 +143,7 @@ static int semanage_user_mod (semanage_h @@ -143,6 +143,7 @@ static int semanage_user_mod (semanage_h
goto done; goto done;
} }

View file

@ -1,7 +1,8 @@
diff -up shadow-4.1.5.1/man/newusers.8.xml.info-parent-dir shadow-4.1.5.1/man/newusers.8.xml Index: shadow-4.5/man/newusers.8.xml
--- shadow-4.1.5.1/man/newusers.8.xml.info-parent-dir 2012-05-25 13:45:28.000000000 +0200 ===================================================================
+++ shadow-4.1.5.1/man/newusers.8.xml 2012-09-19 18:46:35.651613365 +0200 --- shadow-4.5.orig/man/newusers.8.xml
@@ -216,7 +216,15 @@ +++ shadow-4.5/man/newusers.8.xml
@@ -218,7 +218,15 @@
<para> <para>
If this field does not specify an existing directory, the If this field does not specify an existing directory, the
specified directory is created, with ownership set to the specified directory is created, with ownership set to the

View file

@ -1,6 +1,7 @@
diff -up shadow-4.1.5.1/src/newgrp.c.ingroup shadow-4.1.5.1/src/newgrp.c Index: shadow-4.5/src/newgrp.c
--- shadow-4.1.5.1/src/newgrp.c.ingroup 2014-08-29 13:31:38.000000000 +0200 ===================================================================
+++ shadow-4.1.5.1/src/newgrp.c 2014-08-29 14:04:57.183849650 +0200 --- shadow-4.5.orig/src/newgrp.c
+++ shadow-4.5/src/newgrp.c
@@ -83,15 +83,29 @@ static void usage (void) @@ -83,15 +83,29 @@ static void usage (void)
} }
} }
@ -52,7 +53,7 @@ diff -up shadow-4.1.5.1/src/newgrp.c.ingroup shadow-4.1.5.1/src/newgrp.c
} }
endgrent (); endgrent ();
return gr; return gr;
@@ -616,7 +624,7 @@ int main (int argc, char **argv) @@ -630,7 +638,7 @@ int main (int argc, char **argv)
* groups of the same GID like the requested group for * groups of the same GID like the requested group for
* membership of the current user. * membership of the current user.
*/ */

View file

@ -1,7 +1,8 @@
diff -up shadow-4.1.5.1/src/useradd.c.logmsg shadow-4.1.5.1/src/useradd.c Index: shadow-4.5/src/useradd.c
--- shadow-4.1.5.1/src/useradd.c.logmsg 2013-02-20 15:41:44.000000000 +0100 ===================================================================
+++ shadow-4.1.5.1/src/useradd.c 2013-03-19 18:40:04.908292810 +0100 --- shadow-4.5.orig/src/useradd.c
@@ -275,7 +275,7 @@ static void fail_exit (int code) +++ shadow-4.5/src/useradd.c
@@ -323,7 +323,7 @@ static void fail_exit (int code)
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif

View file

@ -1,7 +1,8 @@
diff -up shadow-4.1.5.1/src/usermod.c.move-home shadow-4.1.5.1/src/usermod.c Index: shadow-4.5/src/usermod.c
--- shadow-4.1.5.1/src/usermod.c.move-home 2014-08-29 13:31:38.000000000 +0200 ===================================================================
+++ shadow-4.1.5.1/src/usermod.c 2014-08-29 14:14:13.860671177 +0200 --- shadow-4.5.orig/src/usermod.c
@@ -1571,6 +1571,11 @@ static void move_home (void) +++ shadow-4.5/src/usermod.c
@@ -1814,6 +1814,11 @@ static void move_home (void)
Prog, user_home, user_newhome); Prog, user_home, user_newhome);
fail_exit (E_HOMEDIR); fail_exit (E_HOMEDIR);
} }

View file

@ -1,7 +1,8 @@
diff -up shadow-4.1.5.1/src/newgrp.c.grouplist shadow-4.1.5.1/src/newgrp.c Index: shadow-4.5/src/newgrp.c
--- shadow-4.1.5.1/src/newgrp.c.grouplist 2016-06-28 10:23:46.686334213 +0200 ===================================================================
+++ shadow-4.1.5.1/src/newgrp.c 2017-08-14 10:26:58.300757328 +0200 --- shadow-4.5.orig/src/newgrp.c
@@ -382,6 +382,7 @@ int main (int argc, char **argv) +++ shadow-4.5/src/newgrp.c
@@ -396,6 +396,7 @@ int main (int argc, char **argv)
{ {
bool initflag = false; bool initflag = false;
int i; int i;
@ -9,7 +10,7 @@ diff -up shadow-4.1.5.1/src/newgrp.c.grouplist shadow-4.1.5.1/src/newgrp.c
bool cflag = false; bool cflag = false;
int err = 0; int err = 0;
gid_t gid; gid_t gid;
@@ -631,22 +632,36 @@ int main (int argc, char **argv) @@ -645,22 +646,36 @@ int main (int argc, char **argv)
goto failure; goto failure;
} }
@ -57,7 +58,7 @@ diff -up shadow-4.1.5.1/src/newgrp.c.grouplist shadow-4.1.5.1/src/newgrp.c
} }
#ifdef SHADOWGRP #ifdef SHADOWGRP
sgrp = getsgnam (group); sgrp = getsgnam (group);
@@ -659,7 +674,9 @@ int main (int argc, char **argv) @@ -673,7 +688,9 @@ int main (int argc, char **argv)
/* /*
* Check if the user is allowed to access this group. * Check if the user is allowed to access this group.
*/ */

View file

@ -1,7 +1,8 @@
diff -up shadow-4.1.5.1/src/userdel.c.userdel shadow-4.1.5.1/src/userdel.c Index: shadow-4.5/src/userdel.c
--- shadow-4.1.5.1/src/userdel.c.userdel 2012-05-25 13:51:55.000000000 +0200 ===================================================================
+++ shadow-4.1.5.1/src/userdel.c 2014-02-12 11:40:30.707686132 +0100 --- shadow-4.5.orig/src/userdel.c
@@ -130,8 +130,9 @@ static void usage (int status) +++ shadow-4.5/src/userdel.c
@@ -143,8 +143,9 @@ static void usage (int status)
"\n" "\n"
"Options:\n"), "Options:\n"),
Prog); Prog);

View file

@ -1,6 +1,7 @@
diff -up shadow-4.2.1/libmisc/getdate.y.date-parsing shadow-4.2.1/libmisc/getdate.y Index: shadow-4.5/libmisc/getdate.y
--- shadow-4.2.1/libmisc/getdate.y.date-parsing 2014-03-01 18:50:05.000000000 +0100 ===================================================================
+++ shadow-4.2.1/libmisc/getdate.y 2014-11-26 14:58:21.208153924 +0100 --- shadow-4.5.orig/libmisc/getdate.y
+++ shadow-4.5/libmisc/getdate.y
@@ -152,6 +152,7 @@ static int yyHaveDay; @@ -152,6 +152,7 @@ static int yyHaveDay;
static int yyHaveRel; static int yyHaveRel;
static int yyHaveTime; static int yyHaveTime;

View file

@ -1,6 +1,7 @@
diff -up shadow-4.2.1/lib/commonio.c.no-lock-dos shadow-4.2.1/lib/commonio.c Index: shadow-4.5/lib/commonio.c
--- shadow-4.2.1/lib/commonio.c.no-lock-dos 2015-08-27 15:09:17.101537812 +0200 ===================================================================
+++ shadow-4.2.1/lib/commonio.c 2015-08-27 15:11:06.643011248 +0200 --- shadow-4.5.orig/lib/commonio.c
+++ shadow-4.5/lib/commonio.c
@@ -140,7 +140,10 @@ static int do_lock_file (const char *fil @@ -140,7 +140,10 @@ static int do_lock_file (const char *fil
int retval; int retval;
char buf[32]; char buf[32];

View file

@ -1,6 +1,7 @@
diff -up shadow-4.2.1/src/faillog.c.null-tm shadow-4.2.1/src/faillog.c Index: shadow-4.5/src/faillog.c
--- shadow-4.2.1/src/faillog.c.null-tm 2014-03-01 19:59:51.000000000 +0100 ===================================================================
+++ shadow-4.2.1/src/faillog.c 2016-06-14 11:30:00.066890251 +0200 --- shadow-4.5.orig/src/faillog.c
+++ shadow-4.5/src/faillog.c
@@ -163,10 +163,14 @@ static void print_one (/*@null@*/const s @@ -163,10 +163,14 @@ static void print_one (/*@null@*/const s
} }
@ -18,9 +19,10 @@ diff -up shadow-4.2.1/src/faillog.c.null-tm shadow-4.2.1/src/faillog.c
printf ("%-9s %5d %5d ", printf ("%-9s %5d %5d ",
pw->pw_name, fl.fail_cnt, fl.fail_max); pw->pw_name, fl.fail_cnt, fl.fail_max);
/* FIXME: cp is not defined ifndef HAVE_STRFTIME */ /* FIXME: cp is not defined ifndef HAVE_STRFTIME */
diff -up shadow-4.2.1/src/chage.c.null-tm shadow-4.2.1/src/chage.c Index: shadow-4.5/src/chage.c
--- shadow-4.2.1/src/chage.c.null-tm 2016-05-27 16:04:00.000000000 +0200 ===================================================================
+++ shadow-4.2.1/src/chage.c 2016-06-14 11:18:25.299366908 +0200 --- shadow-4.5.orig/src/chage.c
+++ shadow-4.5/src/chage.c
@@ -168,6 +168,10 @@ static void date_to_str (char *buf, size @@ -168,6 +168,10 @@ static void date_to_str (char *buf, size
struct tm *tp; struct tm *tp;
@ -32,9 +34,10 @@ diff -up shadow-4.2.1/src/chage.c.null-tm shadow-4.2.1/src/chage.c
#ifdef HAVE_STRFTIME #ifdef HAVE_STRFTIME
(void) strftime (buf, maxsize, "%Y-%m-%d", tp); (void) strftime (buf, maxsize, "%Y-%m-%d", tp);
#else #else
diff -up shadow-4.2.1/src/lastlog.c.null-tm shadow-4.2.1/src/lastlog.c Index: shadow-4.5/src/lastlog.c
--- shadow-4.2.1/src/lastlog.c.null-tm 2016-05-27 16:04:00.000000000 +0200 ===================================================================
+++ shadow-4.2.1/src/lastlog.c 2016-06-14 11:29:39.210423264 +0200 --- shadow-4.5.orig/src/lastlog.c
+++ shadow-4.5/src/lastlog.c
@@ -158,13 +158,17 @@ static void print_one (/*@null@*/const s @@ -158,13 +158,17 @@ static void print_one (/*@null@*/const s
ll_time = ll.ll_time; ll_time = ll.ll_time;
@ -57,9 +60,10 @@ diff -up shadow-4.2.1/src/lastlog.c.null-tm shadow-4.2.1/src/lastlog.c
if (ll.ll_time == (time_t) 0) { if (ll.ll_time == (time_t) 0) {
cp = _("**Never logged in**\0"); cp = _("**Never logged in**\0");
diff -up shadow-4.2.1/src/passwd.c.null-tm shadow-4.2.1/src/passwd.c Index: shadow-4.5/src/passwd.c
--- shadow-4.2.1/src/passwd.c.null-tm 2014-03-01 19:59:51.000000000 +0100 ===================================================================
+++ shadow-4.2.1/src/passwd.c 2016-06-14 11:23:21.028969028 +0200 --- shadow-4.5.orig/src/passwd.c
+++ shadow-4.5/src/passwd.c
@@ -455,6 +455,9 @@ static /*@observer@*/const char *date_to @@ -455,6 +455,9 @@ static /*@observer@*/const char *date_to
struct tm *tm; struct tm *tm;
@ -70,9 +74,10 @@ diff -up shadow-4.2.1/src/passwd.c.null-tm shadow-4.2.1/src/passwd.c
#ifdef HAVE_STRFTIME #ifdef HAVE_STRFTIME
(void) strftime (buf, sizeof buf, "%m/%d/%Y", tm); (void) strftime (buf, sizeof buf, "%m/%d/%Y", tm);
#else /* !HAVE_STRFTIME */ #else /* !HAVE_STRFTIME */
diff -up shadow-4.2.1/src/usermod.c.null-tm shadow-4.2.1/src/usermod.c Index: shadow-4.5/src/usermod.c
--- shadow-4.2.1/src/usermod.c.null-tm 2016-05-27 16:04:00.000000000 +0200 ===================================================================
+++ shadow-4.2.1/src/usermod.c 2016-06-14 11:24:50.974977059 +0200 --- shadow-4.5.orig/src/usermod.c
+++ shadow-4.5/src/usermod.c
@@ -210,6 +210,10 @@ static void date_to_str (/*@unique@*//*@ @@ -210,6 +210,10 @@ static void date_to_str (/*@unique@*//*@
} else { } else {
time_t t = (time_t) date; time_t t = (time_t) date;

View file

@ -1,6 +1,7 @@
diff -up shadow-4.3.1/libmisc/audit_help.c.audit-update shadow-4.3.1/libmisc/audit_help.c Index: shadow-4.5/libmisc/audit_help.c
--- shadow-4.3.1/libmisc/audit_help.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/libmisc/audit_help.c 2016-08-22 17:21:15.442291139 +0200 --- shadow-4.5.orig/libmisc/audit_help.c
+++ shadow-4.5/libmisc/audit_help.c
@@ -68,7 +68,7 @@ void audit_help_open (void) @@ -68,7 +68,7 @@ void audit_help_open (void)
* This function will log a message to the audit system using a predefined * This function will log a message to the audit system using a predefined
* message format. Parameter usage is as follows: * message format. Parameter usage is as follows:
@ -50,9 +51,10 @@ diff -up shadow-4.3.1/libmisc/audit_help.c.audit-update shadow-4.3.1/libmisc/aud
void audit_logger_message (const char *message, shadow_audit_result result) void audit_logger_message (const char *message, shadow_audit_result result)
{ {
if (audit_fd < 0) { if (audit_fd < 0) {
diff -up shadow-4.3.1/libmisc/cleanup_group.c.audit-update shadow-4.3.1/libmisc/cleanup_group.c Index: shadow-4.5/libmisc/cleanup_group.c
--- shadow-4.3.1/libmisc/cleanup_group.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/libmisc/cleanup_group.c 2016-08-22 17:21:15.443291142 +0200 --- shadow-4.5.orig/libmisc/cleanup_group.c
+++ shadow-4.5/libmisc/cleanup_group.c
@@ -83,7 +83,7 @@ void cleanup_report_mod_group (void *cle @@ -83,7 +83,7 @@ void cleanup_report_mod_group (void *cle
gr_dbname (), gr_dbname (),
info->action)); info->action));
@ -131,9 +133,10 @@ diff -up shadow-4.3.1/libmisc/cleanup_group.c.audit-update shadow-4.3.1/libmisc/
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
} }
diff -up shadow-4.3.1/libmisc/cleanup_user.c.audit-update shadow-4.3.1/libmisc/cleanup_user.c Index: shadow-4.5/libmisc/cleanup_user.c
--- shadow-4.3.1/libmisc/cleanup_user.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/libmisc/cleanup_user.c 2016-08-22 17:21:15.443291142 +0200 --- shadow-4.5.orig/libmisc/cleanup_user.c
+++ shadow-4.5/libmisc/cleanup_user.c
@@ -65,7 +65,7 @@ void cleanup_report_mod_passwd (void *cl @@ -65,7 +65,7 @@ void cleanup_report_mod_passwd (void *cl
pw_dbname (), pw_dbname (),
info->action)); info->action));
@ -181,10 +184,11 @@ diff -up shadow-4.3.1/libmisc/cleanup_user.c.audit-update shadow-4.3.1/libmisc/c
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
} }
diff -up shadow-4.3.1/lib/prototypes.h.audit-update shadow-4.3.1/lib/prototypes.h Index: shadow-4.5/lib/prototypes.h
--- shadow-4.3.1/lib/prototypes.h.audit-update 2016-08-22 17:21:15.406291044 +0200 ===================================================================
+++ shadow-4.3.1/lib/prototypes.h 2016-08-22 17:21:15.443291142 +0200 --- shadow-4.5.orig/lib/prototypes.h
@@ -208,12 +208,21 @@ extern int audit_fd; +++ shadow-4.5/lib/prototypes.h
@@ -211,12 +211,21 @@ extern int audit_fd;
extern void audit_help_open (void); extern void audit_help_open (void);
/* Use AUDIT_NO_ID when a name is provided to audit_logger instead of an ID */ /* Use AUDIT_NO_ID when a name is provided to audit_logger instead of an ID */
#define AUDIT_NO_ID ((unsigned int) -1) #define AUDIT_NO_ID ((unsigned int) -1)
@ -206,9 +210,10 @@ diff -up shadow-4.3.1/lib/prototypes.h.audit-update shadow-4.3.1/lib/prototypes.
void audit_logger_message (const char *message, shadow_audit_result result); void audit_logger_message (const char *message, shadow_audit_result result);
#endif #endif
diff -up shadow-4.3.1/src/gpasswd.c.audit-update shadow-4.3.1/src/gpasswd.c Index: shadow-4.5/src/gpasswd.c
--- shadow-4.3.1/src/gpasswd.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/gpasswd.c 2016-08-22 17:21:15.444291144 +0200 --- shadow-4.5.orig/src/gpasswd.c
+++ shadow-4.5/src/gpasswd.c
@@ -137,7 +137,7 @@ static void usage (int status) @@ -137,7 +137,7 @@ static void usage (int status)
(void) fputs (_(" -d, --delete USER remove USER from GROUP\n"), usageout); (void) fputs (_(" -d, --delete USER remove USER from GROUP\n"), usageout);
(void) fputs (_(" -h, --help display this help message and exit\n"), usageout); (void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
@ -472,9 +477,10 @@ diff -up shadow-4.3.1/src/gpasswd.c.audit-update shadow-4.3.1/src/gpasswd.c
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
} }
diff -up shadow-4.3.1/src/groupadd.c.audit-update shadow-4.3.1/src/groupadd.c Index: shadow-4.5/src/groupadd.c
--- shadow-4.3.1/src/groupadd.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/groupadd.c 2016-08-22 17:21:15.444291144 +0200 --- shadow-4.5.orig/src/groupadd.c
+++ shadow-4.5/src/groupadd.c
@@ -127,6 +127,15 @@ static /*@noreturn@*/void usage (int sta @@ -127,6 +127,15 @@ static /*@noreturn@*/void usage (int sta
exit (status); exit (status);
} }
@ -650,9 +656,10 @@ diff -up shadow-4.3.1/src/groupadd.c.audit-update shadow-4.3.1/src/groupadd.c
} }
} }
diff -up shadow-4.3.1/src/groupdel.c.audit-update shadow-4.3.1/src/groupdel.c Index: shadow-4.5/src/groupdel.c
--- shadow-4.3.1/src/groupdel.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/groupdel.c 2016-08-22 17:21:15.445291147 +0200 --- shadow-4.5.orig/src/groupdel.c
+++ shadow-4.5/src/groupdel.c
@@ -102,6 +102,15 @@ static /*@noreturn@*/void usage (int sta @@ -102,6 +102,15 @@ static /*@noreturn@*/void usage (int sta
exit (status); exit (status);
} }
@ -822,9 +829,10 @@ diff -up shadow-4.3.1/src/groupdel.c.audit-update shadow-4.3.1/src/groupdel.c
} }
#endif #endif
diff -up shadow-4.3.1/src/groupmod.c.audit-update shadow-4.3.1/src/groupmod.c Index: shadow-4.5/src/groupmod.c
--- shadow-4.3.1/src/groupmod.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/groupmod.c 2016-08-22 17:21:15.445291147 +0200 --- shadow-4.5.orig/src/groupmod.c
+++ shadow-4.5/src/groupmod.c
@@ -438,7 +438,7 @@ static void close_files (void) @@ -438,7 +438,7 @@ static void close_files (void)
exit (E_GRP_UPDATE); exit (E_GRP_UPDATE);
} }
@ -1018,9 +1026,10 @@ diff -up shadow-4.3.1/src/groupmod.c.audit-update shadow-4.3.1/src/groupmod.c
// FIXME: add a system cleanup // FIXME: add a system cleanup
add_cleanup (cleanup_report_mod_group, &info_group); add_cleanup (cleanup_report_mod_group, &info_group);
diff -up shadow-4.3.1/src/chage.c.audit-update shadow-4.3.1/src/chage.c Index: shadow-4.5/src/chage.c
--- shadow-4.3.1/src/chage.c.audit-update 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/chage.c 2016-08-22 17:21:15.446291149 +0200 --- shadow-4.5.orig/src/chage.c
+++ shadow-4.5/src/chage.c
@@ -126,9 +126,10 @@ static /*@noreturn@*/void fail_exit (int @@ -126,9 +126,10 @@ static /*@noreturn@*/void fail_exit (int
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
@ -1108,9 +1117,10 @@ diff -up shadow-4.3.1/src/chage.c.audit-update shadow-4.3.1/src/chage.c
user_name, (unsigned int) user_uid, 1); user_name, (unsigned int) user_uid, 1);
} }
#endif #endif
diff -up shadow-4.3.1/src/newgrp.c.audit-update shadow-4.3.1/src/newgrp.c Index: shadow-4.5/src/newgrp.c
--- shadow-4.3.1/src/newgrp.c.audit-update 2016-08-22 17:21:15.439291131 +0200 ===================================================================
+++ shadow-4.3.1/src/newgrp.c 2016-08-22 17:21:15.446291149 +0200 --- shadow-4.5.orig/src/newgrp.c
+++ shadow-4.5/src/newgrp.c
@@ -206,11 +206,12 @@ static void check_perms (const struct gr @@ -206,11 +206,12 @@ static void check_perms (const struct gr
strcmp (cpasswd, grp->gr_passwd) != 0) { strcmp (cpasswd, grp->gr_passwd) != 0) {
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
@ -1315,10 +1325,11 @@ diff -up shadow-4.3.1/src/newgrp.c.audit-update shadow-4.3.1/src/newgrp.c
} }
#endif #endif
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c Index: shadow-4.5/src/useradd.c
--- shadow-4.3.1/src/useradd.c.audit-update 2016-08-22 17:21:15.410291055 +0200 ===================================================================
+++ shadow-4.3.1/src/useradd.c 2016-08-22 17:21:15.447291152 +0200 --- shadow-4.5.orig/src/useradd.c
@@ -222,6 +222,8 @@ static void create_mail (void); +++ shadow-4.5/src/useradd.c
@@ -225,6 +225,8 @@ static void create_mail (void);
*/ */
static void fail_exit (int code) static void fail_exit (int code)
{ {
@ -1327,7 +1338,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
if (home_added) { if (home_added) {
if (rmdir (user_home) != 0) { if (rmdir (user_home) != 0) {
fprintf (stderr, fprintf (stderr,
@@ -235,12 +237,6 @@ static void fail_exit (int code) @@ -238,12 +240,6 @@ static void fail_exit (int code)
if (spw_unlock () == 0) { if (spw_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, spw_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, spw_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
@ -1340,7 +1351,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
/* continue */ /* continue */
} }
} }
@@ -248,12 +244,6 @@ static void fail_exit (int code) @@ -251,12 +247,6 @@ static void fail_exit (int code)
if (pw_unlock () == 0) { if (pw_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, pw_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, pw_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
@ -1353,7 +1364,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
/* continue */ /* continue */
} }
} }
@@ -261,12 +251,6 @@ static void fail_exit (int code) @@ -264,12 +254,6 @@ static void fail_exit (int code)
if (gr_unlock () == 0) { if (gr_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
@ -1366,7 +1377,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
/* continue */ /* continue */
} }
} }
@@ -275,12 +259,6 @@ static void fail_exit (int code) @@ -278,12 +262,6 @@ static void fail_exit (int code)
if (sgr_unlock () == 0) { if (sgr_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ()));
@ -1379,7 +1390,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
/* continue */ /* continue */
} }
} }
@@ -290,12 +268,6 @@ static void fail_exit (int code) @@ -293,12 +271,6 @@ static void fail_exit (int code)
if (sub_uid_unlock () == 0) { if (sub_uid_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_uid_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_uid_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ()));
@ -1392,7 +1403,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
/* continue */ /* continue */
} }
} }
@@ -303,20 +275,19 @@ static void fail_exit (int code) @@ -306,20 +278,19 @@ static void fail_exit (int code)
if (sub_gid_unlock () == 0) { if (sub_gid_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_gid_dbname ()); fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_gid_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ()));
@ -1420,7 +1431,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -623,7 +594,7 @@ static int set_defaults (void) @@ -626,7 +597,7 @@ static int set_defaults (void)
} }
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_USYS_CONFIG, Prog, audit_logger (AUDIT_USYS_CONFIG, Prog,
@ -1429,7 +1440,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
NULL, AUDIT_NO_ID, NULL, AUDIT_NO_ID,
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
@@ -893,12 +864,6 @@ static void grp_update (void) @@ -896,12 +867,6 @@ static void grp_update (void)
_("%s: Out of memory. Cannot update %s.\n"), _("%s: Out of memory. Cannot update %s.\n"),
Prog, gr_dbname ()); Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", gr_dbname (), user_name)); SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", gr_dbname (), user_name));
@ -1442,7 +1453,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_GRP_UPDATE); /* XXX */ fail_exit (E_GRP_UPDATE); /* XXX */
} }
@@ -912,18 +877,12 @@ static void grp_update (void) @@ -915,18 +880,12 @@ static void grp_update (void)
_("%s: failed to prepare the new %s entry '%s'\n"), _("%s: failed to prepare the new %s entry '%s'\n"),
Prog, gr_dbname (), ngrp->gr_name); Prog, gr_dbname (), ngrp->gr_name);
SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", gr_dbname (), user_name)); SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", gr_dbname (), user_name));
@ -1464,7 +1475,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
SYSLOG ((LOG_INFO, SYSLOG ((LOG_INFO,
@@ -968,12 +927,6 @@ static void grp_update (void) @@ -971,12 +930,6 @@ static void grp_update (void)
_("%s: Out of memory. Cannot update %s.\n"), _("%s: Out of memory. Cannot update %s.\n"),
Prog, sgr_dbname ()); Prog, sgr_dbname ());
SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", sgr_dbname (), user_name)); SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", sgr_dbname (), user_name));
@ -1477,7 +1488,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_GRP_UPDATE); /* XXX */ fail_exit (E_GRP_UPDATE); /* XXX */
} }
@@ -987,18 +940,13 @@ static void grp_update (void) @@ -990,18 +943,13 @@ static void grp_update (void)
_("%s: failed to prepare the new %s entry '%s'\n"), _("%s: failed to prepare the new %s entry '%s'\n"),
Prog, sgr_dbname (), nsgrp->sg_name); Prog, sgr_dbname (), nsgrp->sg_name);
SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", sgr_dbname (), user_name)); SYSLOG ((LOG_ERR, "failed to prepare the new %s entry '%s'", sgr_dbname (), user_name));
@ -1500,7 +1511,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
SYSLOG ((LOG_INFO, SYSLOG ((LOG_INFO,
@@ -1341,7 +1289,7 @@ static void process_flags (int argc, cha @@ -1344,7 +1292,7 @@ static void process_flags (int argc, cha
Prog, user_name); Prog, user_name);
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1509,7 +1520,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1444,7 +1392,7 @@ static void close_files (void) @@ -1447,7 +1395,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1518,7 +1529,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1457,7 +1405,7 @@ static void close_files (void) @@ -1460,7 +1408,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1527,7 +1538,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1469,7 +1417,7 @@ static void close_files (void) @@ -1472,7 +1420,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1536,7 +1547,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1483,7 +1431,7 @@ static void close_files (void) @@ -1486,7 +1434,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1545,7 +1556,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1499,7 +1447,7 @@ static void close_files (void) @@ -1502,7 +1450,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1554,7 +1565,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1513,7 +1461,7 @@ static void close_files (void) @@ -1516,7 +1464,7 @@ static void close_files (void)
SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ()));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1563,7 +1574,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, AUDIT_NO_ID, user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1705,7 +1653,7 @@ static void grp_add (void) @@ -1708,7 +1656,7 @@ static void grp_add (void)
Prog, gr_dbname (), grp.gr_name); Prog, gr_dbname (), grp.gr_name);
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_GROUP, Prog, audit_logger (AUDIT_ADD_GROUP, Prog,
@ -1572,7 +1583,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
grp.gr_name, AUDIT_NO_ID, grp.gr_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1721,7 +1669,7 @@ static void grp_add (void) @@ -1724,7 +1672,7 @@ static void grp_add (void)
Prog, sgr_dbname (), sgrp.sg_name); Prog, sgr_dbname (), sgrp.sg_name);
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_GROUP, Prog, audit_logger (AUDIT_ADD_GROUP, Prog,
@ -1581,7 +1592,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
grp.gr_name, AUDIT_NO_ID, grp.gr_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif #endif
@@ -1731,7 +1679,7 @@ static void grp_add (void) @@ -1734,7 +1682,7 @@ static void grp_add (void)
SYSLOG ((LOG_INFO, "new group: name=%s, GID=%u", user_name, user_gid)); SYSLOG ((LOG_INFO, "new group: name=%s, GID=%u", user_name, user_gid));
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_GROUP, Prog, audit_logger (AUDIT_ADD_GROUP, Prog,
@ -1590,7 +1601,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
grp.gr_name, AUDIT_NO_ID, grp.gr_name, AUDIT_NO_ID,
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
@@ -1846,12 +1794,6 @@ static void usr_update (void) @@ -1895,12 +1843,6 @@ static void usr_update (void)
fprintf (stderr, fprintf (stderr,
_("%s: failed to prepare the new %s entry '%s'\n"), _("%s: failed to prepare the new %s entry '%s'\n"),
Prog, spw_dbname (), spent.sp_namp); Prog, spw_dbname (), spent.sp_namp);
@ -1603,7 +1614,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_PW_UPDATE); fail_exit (E_PW_UPDATE);
} }
#ifdef ENABLE_SUBIDS #ifdef ENABLE_SUBIDS
@@ -1873,7 +1815,7 @@ static void usr_update (void) @@ -1922,7 +1864,7 @@ static void usr_update (void)
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,
@ -1612,7 +1623,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, (unsigned int) user_id, user_name, (unsigned int) user_id,
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
@@ -1908,12 +1850,6 @@ static void create_home (void) @@ -1957,12 +1899,6 @@ static void create_home (void)
fprintf (stderr, fprintf (stderr,
_("%s: cannot create directory %s\n"), _("%s: cannot create directory %s\n"),
Prog, user_home); Prog, user_home);
@ -1625,7 +1636,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_HOMEDIR); fail_exit (E_HOMEDIR);
} }
chown (user_home, user_id, user_gid); chown (user_home, user_id, user_gid);
@@ -1921,8 +1857,8 @@ static void create_home (void) @@ -1970,8 +1906,8 @@ static void create_home (void)
0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
home_added = true; home_added = true;
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
@ -1636,7 +1647,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
user_name, (unsigned int) user_id, user_name, (unsigned int) user_id,
SHADOW_AUDIT_SUCCESS); SHADOW_AUDIT_SUCCESS);
#endif #endif
@@ -2100,12 +2036,6 @@ int main (int argc, char **argv) @@ -2151,12 +2087,6 @@ int main (int argc, char **argv)
*/ */
if (getpwnam (user_name) != NULL) { /* local, no need for xgetpwnam */ if (getpwnam (user_name) != NULL) { /* local, no need for xgetpwnam */
fprintf (stderr, _("%s: user '%s' already exists\n"), Prog, user_name); fprintf (stderr, _("%s: user '%s' already exists\n"), Prog, user_name);
@ -1649,7 +1660,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_NAME_IN_USE); fail_exit (E_NAME_IN_USE);
} }
@@ -2121,12 +2051,6 @@ int main (int argc, char **argv) @@ -2172,12 +2102,6 @@ int main (int argc, char **argv)
fprintf (stderr, fprintf (stderr,
_("%s: group %s exists - if you want to add this user to that group, use -g.\n"), _("%s: group %s exists - if you want to add this user to that group, use -g.\n"),
Prog, user_name); Prog, user_name);
@ -1662,7 +1673,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_NAME_IN_USE); fail_exit (E_NAME_IN_USE);
} }
} }
@@ -2156,12 +2080,6 @@ int main (int argc, char **argv) @@ -2207,12 +2131,6 @@ int main (int argc, char **argv)
fprintf (stderr, fprintf (stderr,
_("%s: UID %lu is not unique\n"), _("%s: UID %lu is not unique\n"),
Prog, (unsigned long) user_id); Prog, (unsigned long) user_id);
@ -1675,7 +1686,7 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
fail_exit (E_UID_IN_USE); fail_exit (E_UID_IN_USE);
} }
} }
@@ -2225,9 +2143,10 @@ int main (int argc, char **argv) @@ -2285,9 +2203,10 @@ int main (int argc, char **argv)
_("%s: warning: the user name %s to %s SELinux user mapping failed.\n"), _("%s: warning: the user name %s to %s SELinux user mapping failed.\n"),
Prog, user_name, user_selinux); Prog, user_name, user_selinux);
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
@ -1689,9 +1700,10 @@ diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/src/useradd.c
#endif /* WITH_AUDIT */ #endif /* WITH_AUDIT */
rv = E_SE_UPDATE; rv = E_SE_UPDATE;
} }
diff -up shadow-4.3.1/src/userdel.c.audit-update shadow-4.3.1/src/userdel.c Index: shadow-4.5/src/userdel.c
--- shadow-4.3.1/src/userdel.c.audit-update 2016-08-22 17:21:15.418291076 +0200 ===================================================================
+++ shadow-4.3.1/src/userdel.c 2016-08-22 17:21:15.447291152 +0200 --- shadow-4.5.orig/src/userdel.c
+++ shadow-4.5/src/userdel.c
@@ -214,9 +214,9 @@ static void update_groups (void) @@ -214,9 +214,9 @@ static void update_groups (void)
* Update the DBM group file with the new entry as well. * Update the DBM group file with the new entry as well.
*/ */
@ -2019,9 +2031,10 @@ diff -up shadow-4.3.1/src/userdel.c.audit-update shadow-4.3.1/src/userdel.c
user_name, (unsigned int) user_id, user_name, (unsigned int) user_id,
SHADOW_AUDIT_FAILURE); SHADOW_AUDIT_FAILURE);
#endif /* WITH_AUDIT */ #endif /* WITH_AUDIT */
diff -up shadow-4.3.1/src/usermod.c.audit-update shadow-4.3.1/src/usermod.c Index: shadow-4.5/src/usermod.c
--- shadow-4.3.1/src/usermod.c.audit-update 2016-08-22 17:21:15.441291136 +0200 ===================================================================
+++ shadow-4.3.1/src/usermod.c 2016-08-22 17:21:15.448291155 +0200 --- shadow-4.5.orig/src/usermod.c
+++ shadow-4.5/src/usermod.c
@@ -447,8 +447,8 @@ static char *new_pw_passwd (char *pw_pas @@ -447,8 +447,8 @@ static char *new_pw_passwd (char *pw_pas
#ifdef WITH_AUDIT #ifdef WITH_AUDIT

View file

@ -1,6 +1,7 @@
diff -up shadow-4.3.1/man/groupmems.8.xml.manfix shadow-4.3.1/man/groupmems.8.xml Index: shadow-4.5/man/groupmems.8.xml
--- shadow-4.3.1/man/groupmems.8.xml.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/groupmems.8.xml 2016-08-22 17:08:48.486332066 +0200 --- shadow-4.5.orig/man/groupmems.8.xml
+++ shadow-4.5/man/groupmems.8.xml
@@ -179,20 +179,10 @@ @@ -179,20 +179,10 @@
<refsect1 id='setup'> <refsect1 id='setup'>
<title>SETUP</title> <title>SETUP</title>
@ -25,9 +26,10 @@ diff -up shadow-4.3.1/man/groupmems.8.xml.manfix shadow-4.3.1/man/groupmems.8.xm
</refsect1> </refsect1>
<refsect1 id='configuration'> <refsect1 id='configuration'>
diff -up shadow-4.3.1/man/chage.1.xml.manfix shadow-4.3.1/man/chage.1.xml Index: shadow-4.5/man/chage.1.xml
--- shadow-4.3.1/man/chage.1.xml.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/chage.1.xml 2016-08-22 17:08:48.486332066 +0200 --- shadow-4.5.orig/man/chage.1.xml
+++ shadow-4.5/man/chage.1.xml
@@ -102,6 +102,9 @@ @@ -102,6 +102,9 @@
Set the number of days since January 1st, 1970 when the password Set the number of days since January 1st, 1970 when the password
was last changed. The date may also be expressed in the format was last changed. The date may also be expressed in the format
@ -52,10 +54,11 @@ diff -up shadow-4.3.1/man/chage.1.xml.manfix shadow-4.3.1/man/chage.1.xml
Passing the number <emphasis remap='I'>-1</emphasis> as the Passing the number <emphasis remap='I'>-1</emphasis> as the
<replaceable>EXPIRE_DATE</replaceable> will remove an account <replaceable>EXPIRE_DATE</replaceable> will remove an account
expiration date. expiration date.
diff -up shadow-4.3.1/man/ja/man5/login.defs.5.manfix shadow-4.3.1/man/ja/man5/login.defs.5 Index: shadow-4.5/man/ja/man5/login.defs.5
--- shadow-4.3.1/man/ja/man5/login.defs.5.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/ja/man5/login.defs.5 2016-08-22 17:08:48.486332066 +0200 --- shadow-4.5.orig/man/ja/man5/login.defs.5
@@ -147,10 +147,6 @@ 以下の参照表は、 +++ shadow-4.5/man/ja/man5/login.defs.5
@@ -147,10 +147,6 @@ PASS_MAX_DAYS, PASS_MIN_DAYS, PASS_WARN_
shadow パスワード機能のどのプログラムが shadow パスワード機能のどのプログラムが
どのパラメータを使用するかを示したものである。 どのパラメータを使用するかを示したものである。
.na .na
@ -66,9 +69,10 @@ diff -up shadow-4.3.1/man/ja/man5/login.defs.5.manfix shadow-4.3.1/man/ja/man5/l
.IP groupadd 12 .IP groupadd 12
GID_MAX GID_MIN GID_MAX GID_MIN
.IP newusers 12 .IP newusers 12
diff -up shadow-4.3.1/man/login.defs.5.xml.manfix shadow-4.3.1/man/login.defs.5.xml Index: shadow-4.5/man/login.defs.5.xml
--- shadow-4.3.1/man/login.defs.5.xml.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/login.defs.5.xml 2016-08-22 17:08:48.487332069 +0200 --- shadow-4.5.orig/man/login.defs.5.xml
+++ shadow-4.5/man/login.defs.5.xml
@@ -162,6 +162,17 @@ @@ -162,6 +162,17 @@
long numeric parameters is machine-dependent. long numeric parameters is machine-dependent.
</para> </para>
@ -205,9 +209,10 @@ diff -up shadow-4.3.1/man/login.defs.5.xml.manfix shadow-4.3.1/man/login.defs.5.
<varlistentry> <varlistentry>
<term>useradd</term> <term>useradd</term>
<listitem> <listitem>
diff -up shadow-4.3.1/man/shadow.5.xml.manfix shadow-4.3.1/man/shadow.5.xml Index: shadow-4.5/man/shadow.5.xml
--- shadow-4.3.1/man/shadow.5.xml.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/shadow.5.xml 2016-08-22 17:08:48.487332069 +0200 --- shadow-4.5.orig/man/shadow.5.xml
+++ shadow-4.5/man/shadow.5.xml
@@ -208,8 +208,8 @@ @@ -208,8 +208,8 @@
</para> </para>
<para> <para>
@ -219,9 +224,10 @@ diff -up shadow-4.3.1/man/shadow.5.xml.manfix shadow-4.3.1/man/shadow.5.xml
</para> </para>
<para> <para>
An empty field means that there are no enforcement of an An empty field means that there are no enforcement of an
diff -up shadow-4.3.1/man/useradd.8.xml.manfix shadow-4.3.1/man/useradd.8.xml Index: shadow-4.5/man/useradd.8.xml
--- shadow-4.3.1/man/useradd.8.xml.manfix 2016-08-22 17:08:48.446331961 +0200 ===================================================================
+++ shadow-4.3.1/man/useradd.8.xml 2016-08-22 17:08:48.487332069 +0200 --- shadow-4.5.orig/man/useradd.8.xml
+++ shadow-4.5/man/useradd.8.xml
@@ -347,6 +347,11 @@ @@ -347,6 +347,11 @@
<option>CREATE_HOME</option> is not enabled, no home <option>CREATE_HOME</option> is not enabled, no home
directories are created. directories are created.
@ -234,9 +240,10 @@ diff -up shadow-4.3.1/man/useradd.8.xml.manfix shadow-4.3.1/man/useradd.8.xml
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
diff -up shadow-4.3.1/man/usermod.8.xml.manfix shadow-4.3.1/man/usermod.8.xml Index: shadow-4.5/man/usermod.8.xml
--- shadow-4.3.1/man/usermod.8.xml.manfix 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/man/usermod.8.xml 2016-08-22 17:08:48.487332069 +0200 --- shadow-4.5.orig/man/usermod.8.xml
+++ shadow-4.5/man/usermod.8.xml
@@ -132,7 +132,8 @@ @@ -132,7 +132,8 @@
If the <option>-m</option> If the <option>-m</option>
option is given, the contents of the current home directory will option is given, the contents of the current home directory will

View file

@ -1,6 +1,7 @@
diff -up shadow-4.3.1/src/chgpasswd.c.selinux-perms shadow-4.3.1/src/chgpasswd.c Index: shadow-4.5/src/chgpasswd.c
--- shadow-4.3.1/src/chgpasswd.c.selinux-perms 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/chgpasswd.c 2016-08-22 17:25:46.825011776 +0200 --- shadow-4.5.orig/src/chgpasswd.c
+++ shadow-4.5/src/chgpasswd.c
@@ -39,6 +39,13 @@ @@ -39,6 +39,13 @@
#include <pwd.h> #include <pwd.h>
#include <stdio.h> #include <stdio.h>
@ -147,9 +148,10 @@ diff -up shadow-4.3.1/src/chgpasswd.c.selinux-perms shadow-4.3.1/src/chgpasswd.c
/* /*
* The updated group file entry is then put back and will * The updated group file entry is then put back and will
* be written to the group file later, after all the * be written to the group file later, after all the
diff -up shadow-4.3.1/src/chpasswd.c.selinux-perms shadow-4.3.1/src/chpasswd.c Index: shadow-4.5/src/chpasswd.c
--- shadow-4.3.1/src/chpasswd.c.selinux-perms 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/chpasswd.c 2016-08-22 17:25:46.825011776 +0200 --- shadow-4.5.orig/src/chpasswd.c
+++ shadow-4.5/src/chpasswd.c
@@ -39,6 +39,13 @@ @@ -39,6 +39,13 @@
#include <pwd.h> #include <pwd.h>
#include <stdio.h> #include <stdio.h>
@ -257,9 +259,10 @@ diff -up shadow-4.3.1/src/chpasswd.c.selinux-perms shadow-4.3.1/src/chpasswd.c
/* /*
* The updated password file entry is then put back and will * The updated password file entry is then put back and will
* be written to the password file later, after all the * be written to the password file later, after all the
diff -up shadow-4.3.1/src/Makefile.am.selinux-perms shadow-4.3.1/src/Makefile.am Index: shadow-4.5/src/Makefile.am
--- shadow-4.3.1/src/Makefile.am.selinux-perms 2016-08-15 06:00:59.000000000 +0200 ===================================================================
+++ shadow-4.3.1/src/Makefile.am 2016-08-22 17:25:46.825011776 +0200 --- shadow-4.5.orig/src/Makefile.am
+++ shadow-4.5/src/Makefile.am
@@ -87,9 +87,9 @@ chage_LDADD = $(LDADD) $(LIBPAM_SUID) @@ -87,9 +87,9 @@ chage_LDADD = $(LDADD) $(LIBPAM_SUID)
newuidmap_LDADD = $(LDADD) $(LIBSELINUX) newuidmap_LDADD = $(LDADD) $(LIBSELINUX)
newgidmap_LDADD = $(LDADD) $(LIBSELINUX) newgidmap_LDADD = $(LDADD) $(LIBSELINUX)

41
shadow-4.5-crypt_h.patch Normal file
View file

@ -0,0 +1,41 @@
Index: shadow-4.5/configure.ac
===================================================================
--- shadow-4.5.orig/configure.ac
+++ shadow-4.5/configure.ac
@@ -32,9 +32,9 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_STDBOOL
-AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
- utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
- utime.h ulimit.h sys/resource.h gshadow.h lastlog.h \
+AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h \
+ utmp.h utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h \
+ paths.h utime.h ulimit.h sys/resource.h gshadow.h lastlog.h \
locale.h rpc/key_prot.h netdb.h acl/libacl.h attr/libattr.h \
attr/error_context.h)
Index: shadow-4.5/lib/defines.h
===================================================================
--- shadow-4.5.orig/lib/defines.h
+++ shadow-4.5/lib/defines.h
@@ -4,6 +4,8 @@
#ifndef _DEFINES_H_
#define _DEFINES_H_
+#include "config.h"
+
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
@@ -94,6 +96,10 @@ char *strchr (), *strrchr (), *strtok ()
# include <unistd.h>
#endif
+#if HAVE_CRYPT_H
+# include <crypt.h> /* crypt(3) may be defined in here */
+#endif
+
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>

View file

@ -1,6 +1,7 @@
diff -up shadow-4.5/libmisc/chkname.c.goodname shadow-4.5/libmisc/chkname.c Index: shadow-4.5/libmisc/chkname.c
--- shadow-4.5/libmisc/chkname.c.goodname 2014-09-01 16:36:40.000000000 +0200 ===================================================================
+++ shadow-4.5/libmisc/chkname.c 2017-09-15 17:06:29.917939977 +0200 --- shadow-4.5.orig/libmisc/chkname.c
+++ shadow-4.5/libmisc/chkname.c
@@ -47,27 +47,46 @@ @@ -47,27 +47,46 @@
#include "chkname.h" #include "chkname.h"
@ -59,9 +60,10 @@ diff -up shadow-4.5/libmisc/chkname.c.goodname shadow-4.5/libmisc/chkname.c
} }
bool is_valid_user_name (const char *name) bool is_valid_user_name (const char *name)
diff -up shadow-4.5/man/groupadd.8.xml.goodname shadow-4.5/man/groupadd.8.xml Index: shadow-4.5/man/groupadd.8.xml
--- shadow-4.5/man/groupadd.8.xml.goodname 2014-09-01 16:36:40.000000000 +0200 ===================================================================
+++ shadow-4.5/man/groupadd.8.xml 2017-08-14 10:27:24.657391521 +0200 --- shadow-4.5.orig/man/groupadd.8.xml
+++ shadow-4.5/man/groupadd.8.xml
@@ -256,12 +256,6 @@ @@ -256,12 +256,6 @@
<refsect1 id='caveats'> <refsect1 id='caveats'>
<title>CAVEATS</title> <title>CAVEATS</title>
@ -75,9 +77,10 @@ diff -up shadow-4.5/man/groupadd.8.xml.goodname shadow-4.5/man/groupadd.8.xml
Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
</para> </para>
<para> <para>
diff -up shadow-4.5/man/useradd.8.xml.goodname shadow-4.5/man/useradd.8.xml Index: shadow-4.5/man/useradd.8.xml
--- shadow-4.5/man/useradd.8.xml.goodname 2016-08-15 04:48:14.000000000 +0200 ===================================================================
+++ shadow-4.5/man/useradd.8.xml 2017-08-14 10:27:24.667391382 +0200 --- shadow-4.5.orig/man/useradd.8.xml
+++ shadow-4.5/man/useradd.8.xml
@@ -633,12 +633,6 @@ @@ -633,12 +633,6 @@
</para> </para>

View file

@ -1,6 +1,7 @@
diff -up shadow-4.5/lib/commonio.c.orig-context shadow-4.5/lib/commonio.c Index: shadow-4.5/lib/commonio.c
--- shadow-4.5/lib/commonio.c.orig-context 2017-05-17 21:19:44.000000000 +0200 ===================================================================
+++ shadow-4.5/lib/commonio.c 2017-07-20 16:47:41.102186239 +0200 --- shadow-4.5.orig/lib/commonio.c
+++ shadow-4.5/lib/commonio.c
@@ -941,7 +941,7 @@ int commonio_close (struct commonio_db * @@ -941,7 +941,7 @@ int commonio_close (struct commonio_db *
snprintf (buf, sizeof buf, "%s-", db->filename); snprintf (buf, sizeof buf, "%s-", db->filename);
@ -19,9 +20,10 @@ diff -up shadow-4.5/lib/commonio.c.orig-context shadow-4.5/lib/commonio.c
errors++; errors++;
} }
#endif #endif
diff -up shadow-4.5/libmisc/copydir.c.orig-context shadow-4.5/libmisc/copydir.c Index: shadow-4.5/libmisc/copydir.c
--- shadow-4.5/libmisc/copydir.c.orig-context 2014-09-01 16:36:40.000000000 +0200 ===================================================================
+++ shadow-4.5/libmisc/copydir.c 2017-07-20 16:47:41.102186239 +0200 --- shadow-4.5.orig/libmisc/copydir.c
+++ shadow-4.5/libmisc/copydir.c
@@ -484,7 +484,7 @@ static int copy_dir (const char *src, co @@ -484,7 +484,7 @@ static int copy_dir (const char *src, co
*/ */
@ -58,9 +60,10 @@ diff -up shadow-4.5/libmisc/copydir.c.orig-context shadow-4.5/libmisc/copydir.c
return -1; return -1;
} }
#endif /* WITH_SELINUX */ #endif /* WITH_SELINUX */
diff -up shadow-4.5/lib/prototypes.h.orig-context shadow-4.5/lib/prototypes.h Index: shadow-4.5/lib/prototypes.h
--- shadow-4.5/lib/prototypes.h.orig-context 2017-05-17 21:19:44.000000000 +0200 ===================================================================
+++ shadow-4.5/lib/prototypes.h 2017-07-20 16:47:41.102186239 +0200 --- shadow-4.5.orig/lib/prototypes.h
+++ shadow-4.5/lib/prototypes.h
@@ -311,7 +311,7 @@ extern /*@observer@*/const char *crypt_m @@ -311,7 +311,7 @@ extern /*@observer@*/const char *crypt_m
/* selinux.c */ /* selinux.c */
@ -70,9 +73,10 @@ diff -up shadow-4.5/lib/prototypes.h.orig-context shadow-4.5/lib/prototypes.h
extern int reset_selinux_file_context (void); extern int reset_selinux_file_context (void);
#endif #endif
diff -up shadow-4.5/lib/selinux.c.orig-context shadow-4.5/lib/selinux.c Index: shadow-4.5/lib/selinux.c
--- shadow-4.5/lib/selinux.c.orig-context 2014-09-01 16:36:40.000000000 +0200 ===================================================================
+++ shadow-4.5/lib/selinux.c 2017-07-20 16:47:41.102186239 +0200 --- shadow-4.5.orig/lib/selinux.c
+++ shadow-4.5/lib/selinux.c
@@ -50,7 +50,7 @@ static bool selinux_enabled; @@ -50,7 +50,7 @@ static bool selinux_enabled;
* Callers may have to Reset SELinux to create files with default * Callers may have to Reset SELinux to create files with default
* contexts with reset_selinux_file_context * contexts with reset_selinux_file_context
@ -114,9 +118,10 @@ diff -up shadow-4.5/lib/selinux.c.orig-context shadow-4.5/lib/selinux.c
} }
/* /*
diff -up shadow-4.5/src/useradd.c.orig-context shadow-4.5/src/useradd.c Index: shadow-4.5/src/useradd.c
--- shadow-4.5/src/useradd.c.orig-context 2017-07-20 16:47:41.102186239 +0200 ===================================================================
+++ shadow-4.5/src/useradd.c 2017-07-20 16:50:28.226198387 +0200 --- shadow-4.5.orig/src/useradd.c
+++ shadow-4.5/src/useradd.c
@@ -1945,7 +1945,7 @@ static void create_home (void) @@ -1945,7 +1945,7 @@ static void create_home (void)
{ {
if (access (user_home, F_OK) != 0) { if (access (user_home, F_OK) != 0) {

View file

@ -1,6 +1,7 @@
diff -up shadow-4.5/lib/semanage.c.selinux shadow-4.5/lib/semanage.c Index: shadow-4.5/lib/semanage.c
--- shadow-4.5/lib/semanage.c.selinux 2014-09-01 16:36:40.000000000 +0200 ===================================================================
+++ shadow-4.5/lib/semanage.c 2017-07-20 16:40:49.680297319 +0200 --- shadow-4.5.orig/lib/semanage.c
+++ shadow-4.5/lib/semanage.c
@@ -294,6 +294,9 @@ int set_seuser (const char *login_name, @@ -294,6 +294,9 @@ int set_seuser (const char *login_name,
ret = 0; ret = 0;
@ -22,9 +23,10 @@ diff -up shadow-4.5/lib/semanage.c.selinux shadow-4.5/lib/semanage.c
done: done:
semanage_handle_destroy (handle); semanage_handle_destroy (handle);
return ret; return ret;
diff -up shadow-4.5/src/useradd.c.selinux shadow-4.5/src/useradd.c Index: shadow-4.5/src/useradd.c
--- shadow-4.5/src/useradd.c.selinux 2017-07-20 16:40:49.677297246 +0200 ===================================================================
+++ shadow-4.5/src/useradd.c 2017-07-20 16:44:58.195275331 +0200 --- shadow-4.5.orig/src/useradd.c
+++ shadow-4.5/src/useradd.c
@@ -2042,6 +2042,7 @@ static void create_mail (void) @@ -2042,6 +2042,7 @@ static void create_mail (void)
*/ */
int main (int argc, char **argv) int main (int argc, char **argv)

View file

@ -1,6 +1,7 @@
diff -up shadow-4.5/lib/selinux.c.userdel-chroot shadow-4.5/lib/selinux.c Index: shadow-4.5/lib/selinux.c
--- shadow-4.5/lib/selinux.c.userdel-chroot 2017-11-06 13:40:41.396131526 +0100 ===================================================================
+++ shadow-4.5/lib/selinux.c 2017-11-06 13:40:41.418132035 +0100 --- shadow-4.5.orig/lib/selinux.c
+++ shadow-4.5/lib/selinux.c
@@ -75,7 +75,7 @@ int set_selinux_file_context (const char @@ -75,7 +75,7 @@ int set_selinux_file_context (const char
} }
return 0; return 0;
@ -19,9 +20,10 @@ diff -up shadow-4.5/lib/selinux.c.userdel-chroot shadow-4.5/lib/selinux.c
return 1; return 1;
} }
} }
diff -up shadow-4.5/src/userdel.c.userdel-chroot shadow-4.5/src/userdel.c Index: shadow-4.5/src/userdel.c
--- shadow-4.5/src/userdel.c.userdel-chroot 2017-11-06 13:40:41.410131850 +0100 ===================================================================
+++ shadow-4.5/src/userdel.c 2017-11-06 15:26:56.567954410 +0100 --- shadow-4.5.orig/src/userdel.c
+++ shadow-4.5/src/userdel.c
@@ -96,6 +96,7 @@ static char *user_home; @@ -96,6 +96,7 @@ static char *user_home;
static bool fflg = false; static bool fflg = false;
static bool rflg = false; static bool rflg = false;

View file

@ -1,6 +1,7 @@
diff -up shadow-4.5/src/usermod.c.unlock shadow-4.5/src/usermod.c Index: shadow-4.5/src/usermod.c
--- shadow-4.5/src/usermod.c.unlock 2017-07-20 16:52:23.641969174 +0200 ===================================================================
+++ shadow-4.5/src/usermod.c 2017-07-20 16:54:08.109477127 +0200 --- shadow-4.5.orig/src/usermod.c
+++ shadow-4.5/src/usermod.c
@@ -455,14 +455,17 @@ static char *new_pw_passwd (char *pw_pas @@ -455,14 +455,17 @@ static char *new_pw_passwd (char *pw_pas
strcat (buf, pw_pass); strcat (buf, pw_pass);
pw_pass = buf; pw_pass = buf;

View file

@ -1,7 +1,7 @@
Summary: Utilities for managing accounts and shadow password files Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils Name: shadow-utils
Version: 4.5 Version: 4.5
Release: 8%{?dist} Release: 9%{?dist}
Epoch: 2 Epoch: 2
URL: http://pkg-shadow.alioth.debian.org/ URL: http://pkg-shadow.alioth.debian.org/
Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz
@ -30,6 +30,7 @@ Patch28: shadow-4.3.1-selinux-perms.patch
Patch29: shadow-4.2.1-null-tm.patch Patch29: shadow-4.2.1-null-tm.patch
Patch30: shadow-4.1.5.1-newgrp-grouplist.patch Patch30: shadow-4.1.5.1-newgrp-grouplist.patch
Patch31: shadow-4.5-userdel-chroot.patch Patch31: shadow-4.5-userdel-chroot.patch
Patch32: shadow-4.5-crypt_h.patch
License: BSD and GPLv2+ License: BSD and GPLv2+
Group: System Environment/Base Group: System Environment/Base
@ -80,6 +81,7 @@ are used for managing group accounts.
%patch29 -p1 -b .null-tm %patch29 -p1 -b .null-tm
%patch30 -p1 -b .grouplist %patch30 -p1 -b .grouplist
%patch31 -p1 -b .userdel-chroot %patch31 -p1 -b .userdel-chroot
%patch32 -p1 -b .crypt_h
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO cp -f doc/HOWTO.utf8 doc/HOWTO
@ -107,11 +109,11 @@ autoreconf
--without-libpam \ --without-libpam \
--disable-shared \ --disable-shared \
--with-group-name-max-length=32 --with-group-name-max-length=32
make %make_build
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs %make_install gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/default install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/default
install -p -c -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/login.defs install -p -c -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/login.defs
install -p -c -m 0600 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/default/useradd install -p -c -m 0600 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/default/useradd
@ -235,6 +237,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/vigr.8* %{_mandir}/man8/vigr.8*
%changelog %changelog
* Tue Feb 06 2018 Björn Esser <besser82@fedoraproject.org> - 2:4.5-9
- Add patch to include crypt.h, if present
- Use %%make_{build,install} macros
- Refresh other patches for proper alignment
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 2:4.5-8 * Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 2:4.5-8
- Rebuilt for switch to libxcrypt - Rebuilt for switch to libxcrypt