diff --git a/shadow-4.1.5-2ndskip.patch b/shadow-4.1.5-2ndskip.patch
index 8a9cf68..5a8e444 100644
--- a/shadow-4.1.5-2ndskip.patch
+++ b/shadow-4.1.5-2ndskip.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.1.5/src/grpconv.c.2ndskip shadow-4.1.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
+Index: shadow-4.5/src/grpconv.c
+===================================================================
+--- shadow-4.5.orig/src/grpconv.c
++++ shadow-4.5/src/grpconv.c
@@ -143,6 +143,7 @@ int main (int argc, char **argv)
struct group grent;
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
---- 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
+Index: shadow-4.5/src/pwconv.c
+===================================================================
+--- shadow-4.5.orig/src/pwconv.c
++++ shadow-4.5/src/pwconv.c
@@ -173,6 +173,7 @@ int main (int argc, char **argv)
struct passwd pwent;
const struct spwd *sp;
diff --git a/shadow-4.1.5-redhat.patch b/shadow-4.1.5-redhat.patch
index a785b29..ef26cbd 100644
--- a/shadow-4.1.5-redhat.patch
+++ b/shadow-4.1.5-redhat.patch
@@ -1,8 +1,8 @@
-diff -up shadow-4.1.5/man/useradd.8.redhat shadow-4.1.5/man/useradd.8
-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.1.5/src/useradd.c 2012-03-19 09:50:05.227588669 +0100
-@@ -93,7 +93,7 @@ const char *Prog;
+Index: shadow-4.5/src/useradd.c
+===================================================================
+--- shadow-4.5.orig/src/useradd.c
++++ shadow-4.5/src/useradd.c
+@@ -98,7 +98,7 @@ const char *Prog;
static gid_t def_group = 100;
static const char *def_gname = "other";
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_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))
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 gid_t user_gid;
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,
#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 */
long_options, NULL)) != -1) {
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':
Mflg = true;
break;
diff --git a/shadow-4.1.5.1-default-range.patch b/shadow-4.1.5.1-default-range.patch
index 45c677a..2a9d640 100644
--- a/shadow-4.1.5.1-default-range.patch
+++ b/shadow-4.1.5.1-default-range.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.1.5.1/lib/semanage.c.default-range shadow-4.1.5.1/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
+Index: shadow-4.5/lib/semanage.c
+===================================================================
+--- shadow-4.5.orig/lib/semanage.c
++++ shadow-4.5/lib/semanage.c
@@ -143,6 +143,7 @@ static int semanage_user_mod (semanage_h
goto done;
}
diff --git a/shadow-4.1.5.1-info-parent-dir.patch b/shadow-4.1.5.1-info-parent-dir.patch
index b05e5bb..b3a525b 100644
--- a/shadow-4.1.5.1-info-parent-dir.patch
+++ b/shadow-4.1.5.1-info-parent-dir.patch
@@ -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
---- 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
-@@ -216,7 +216,15 @@
+Index: shadow-4.5/man/newusers.8.xml
+===================================================================
+--- shadow-4.5.orig/man/newusers.8.xml
++++ shadow-4.5/man/newusers.8.xml
+@@ -218,7 +218,15 @@
If this field does not specify an existing directory, the
specified directory is created, with ownership set to the
diff --git a/shadow-4.1.5.1-ingroup.patch b/shadow-4.1.5.1-ingroup.patch
index e440431..1c30198 100644
--- a/shadow-4.1.5.1-ingroup.patch
+++ b/shadow-4.1.5.1-ingroup.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.1.5.1/src/newgrp.c.ingroup shadow-4.1.5.1/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
+Index: shadow-4.5/src/newgrp.c
+===================================================================
+--- shadow-4.5.orig/src/newgrp.c
++++ shadow-4.5/src/newgrp.c
@@ -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 ();
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
* membership of the current user.
*/
diff --git a/shadow-4.1.5.1-logmsg.patch b/shadow-4.1.5.1-logmsg.patch
index 7d5cbc8..ca7e57b 100644
--- a/shadow-4.1.5.1-logmsg.patch
+++ b/shadow-4.1.5.1-logmsg.patch
@@ -1,7 +1,8 @@
-diff -up shadow-4.1.5.1/src/useradd.c.logmsg shadow-4.1.5.1/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
-@@ -275,7 +275,7 @@ static void fail_exit (int code)
+Index: shadow-4.5/src/useradd.c
+===================================================================
+--- shadow-4.5.orig/src/useradd.c
++++ shadow-4.5/src/useradd.c
+@@ -323,7 +323,7 @@ static void fail_exit (int code)
user_name, AUDIT_NO_ID,
SHADOW_AUDIT_FAILURE);
#endif
diff --git a/shadow-4.1.5.1-move-home.patch b/shadow-4.1.5.1-move-home.patch
index c87e232..f1790e2 100644
--- a/shadow-4.1.5.1-move-home.patch
+++ b/shadow-4.1.5.1-move-home.patch
@@ -1,7 +1,8 @@
-diff -up shadow-4.1.5.1/src/usermod.c.move-home shadow-4.1.5.1/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
-@@ -1571,6 +1571,11 @@ static void move_home (void)
+Index: shadow-4.5/src/usermod.c
+===================================================================
+--- shadow-4.5.orig/src/usermod.c
++++ shadow-4.5/src/usermod.c
+@@ -1814,6 +1814,11 @@ static void move_home (void)
Prog, user_home, user_newhome);
fail_exit (E_HOMEDIR);
}
diff --git a/shadow-4.1.5.1-newgrp-grouplist.patch b/shadow-4.1.5.1-newgrp-grouplist.patch
index 8fcfd97..47eb6f6 100644
--- a/shadow-4.1.5.1-newgrp-grouplist.patch
+++ b/shadow-4.1.5.1-newgrp-grouplist.patch
@@ -1,7 +1,8 @@
-diff -up shadow-4.1.5.1/src/newgrp.c.grouplist shadow-4.1.5.1/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
-@@ -382,6 +382,7 @@ int main (int argc, char **argv)
+Index: shadow-4.5/src/newgrp.c
+===================================================================
+--- shadow-4.5.orig/src/newgrp.c
++++ shadow-4.5/src/newgrp.c
+@@ -396,6 +396,7 @@ int main (int argc, char **argv)
{
bool initflag = false;
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;
int err = 0;
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;
}
@@ -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
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.
*/
diff --git a/shadow-4.1.5.1-userdel-helpfix.patch b/shadow-4.1.5.1-userdel-helpfix.patch
index b79baee..075f482 100644
--- a/shadow-4.1.5.1-userdel-helpfix.patch
+++ b/shadow-4.1.5.1-userdel-helpfix.patch
@@ -1,7 +1,8 @@
-diff -up shadow-4.1.5.1/src/userdel.c.userdel shadow-4.1.5.1/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
-@@ -130,8 +130,9 @@ static void usage (int status)
+Index: shadow-4.5/src/userdel.c
+===================================================================
+--- shadow-4.5.orig/src/userdel.c
++++ shadow-4.5/src/userdel.c
+@@ -143,8 +143,9 @@ static void usage (int status)
"\n"
"Options:\n"),
Prog);
diff --git a/shadow-4.2.1-date-parsing.patch b/shadow-4.2.1-date-parsing.patch
index 91a85ac..2a798d0 100644
--- a/shadow-4.2.1-date-parsing.patch
+++ b/shadow-4.2.1-date-parsing.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.2.1/libmisc/getdate.y.date-parsing shadow-4.2.1/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
+Index: shadow-4.5/libmisc/getdate.y
+===================================================================
+--- shadow-4.5.orig/libmisc/getdate.y
++++ shadow-4.5/libmisc/getdate.y
@@ -152,6 +152,7 @@ static int yyHaveDay;
static int yyHaveRel;
static int yyHaveTime;
diff --git a/shadow-4.2.1-no-lock-dos.patch b/shadow-4.2.1-no-lock-dos.patch
index 58fd605..c6873e9 100644
--- a/shadow-4.2.1-no-lock-dos.patch
+++ b/shadow-4.2.1-no-lock-dos.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.2.1/lib/commonio.c.no-lock-dos shadow-4.2.1/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
+Index: shadow-4.5/lib/commonio.c
+===================================================================
+--- 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
int retval;
char buf[32];
diff --git a/shadow-4.2.1-null-tm.patch b/shadow-4.2.1-null-tm.patch
index 15b7720..b1dd1c4 100644
--- a/shadow-4.2.1-null-tm.patch
+++ b/shadow-4.2.1-null-tm.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.2.1/src/faillog.c.null-tm shadow-4.2.1/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
+Index: shadow-4.5/src/faillog.c
+===================================================================
+--- shadow-4.5.orig/src/faillog.c
++++ shadow-4.5/src/faillog.c
@@ -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 ",
pw->pw_name, fl.fail_cnt, fl.fail_max);
/* 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
---- 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
+Index: shadow-4.5/src/chage.c
+===================================================================
+--- 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
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
(void) strftime (buf, maxsize, "%Y-%m-%d", tp);
#else
-diff -up shadow-4.2.1/src/lastlog.c.null-tm shadow-4.2.1/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
+Index: shadow-4.5/src/lastlog.c
+===================================================================
+--- shadow-4.5.orig/src/lastlog.c
++++ shadow-4.5/src/lastlog.c
@@ -158,13 +158,17 @@ static void print_one (/*@null@*/const s
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) {
cp = _("**Never logged in**\0");
-diff -up shadow-4.2.1/src/passwd.c.null-tm shadow-4.2.1/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
+Index: shadow-4.5/src/passwd.c
+===================================================================
+--- shadow-4.5.orig/src/passwd.c
++++ shadow-4.5/src/passwd.c
@@ -455,6 +455,9 @@ static /*@observer@*/const char *date_to
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
(void) strftime (buf, sizeof buf, "%m/%d/%Y", tm);
#else /* !HAVE_STRFTIME */
-diff -up shadow-4.2.1/src/usermod.c.null-tm shadow-4.2.1/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
+Index: shadow-4.5/src/usermod.c
+===================================================================
+--- shadow-4.5.orig/src/usermod.c
++++ shadow-4.5/src/usermod.c
@@ -210,6 +210,10 @@ static void date_to_str (/*@unique@*//*@
} else {
time_t t = (time_t) date;
diff --git a/shadow-4.3.1-audit-update.patch b/shadow-4.3.1-audit-update.patch
index e708f75..8c72cf3 100644
--- a/shadow-4.3.1-audit-update.patch
+++ b/shadow-4.3.1-audit-update.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.3.1/libmisc/audit_help.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/libmisc/audit_help.c
+===================================================================
+--- shadow-4.5.orig/libmisc/audit_help.c
++++ shadow-4.5/libmisc/audit_help.c
@@ -68,7 +68,7 @@ void audit_help_open (void)
* This function will log a message to the audit system using a predefined
* 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)
{
if (audit_fd < 0) {
-diff -up shadow-4.3.1/libmisc/cleanup_group.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/libmisc/cleanup_group.c
+===================================================================
+--- 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
gr_dbname (),
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);
#endif
}
-diff -up shadow-4.3.1/libmisc/cleanup_user.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/libmisc/cleanup_user.c
+===================================================================
+--- 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
pw_dbname (),
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);
#endif
}
-diff -up shadow-4.3.1/lib/prototypes.h.audit-update shadow-4.3.1/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
-@@ -208,12 +208,21 @@ extern int audit_fd;
+Index: shadow-4.5/lib/prototypes.h
+===================================================================
+--- shadow-4.5.orig/lib/prototypes.h
++++ shadow-4.5/lib/prototypes.h
+@@ -211,12 +211,21 @@ extern int audit_fd;
extern void audit_help_open (void);
/* Use AUDIT_NO_ID when a name is provided to audit_logger instead of an ID */
#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);
#endif
-diff -up shadow-4.3.1/src/gpasswd.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/gpasswd.c
+===================================================================
+--- shadow-4.5.orig/src/gpasswd.c
++++ shadow-4.5/src/gpasswd.c
@@ -137,7 +137,7 @@ static void usage (int status)
(void) fputs (_(" -d, --delete USER remove USER from GROUP\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);
#endif
}
-diff -up shadow-4.3.1/src/groupadd.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/groupadd.c
+===================================================================
+--- shadow-4.5.orig/src/groupadd.c
++++ shadow-4.5/src/groupadd.c
@@ -127,6 +127,15 @@ static /*@noreturn@*/void usage (int sta
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
---- 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
+Index: shadow-4.5/src/groupdel.c
+===================================================================
+--- shadow-4.5.orig/src/groupdel.c
++++ shadow-4.5/src/groupdel.c
@@ -102,6 +102,15 @@ static /*@noreturn@*/void usage (int sta
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
-diff -up shadow-4.3.1/src/groupmod.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/groupmod.c
+===================================================================
+--- shadow-4.5.orig/src/groupmod.c
++++ shadow-4.5/src/groupmod.c
@@ -438,7 +438,7 @@ static void close_files (void)
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
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
---- 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
+Index: shadow-4.5/src/chage.c
+===================================================================
+--- shadow-4.5.orig/src/chage.c
++++ shadow-4.5/src/chage.c
@@ -126,9 +126,10 @@ static /*@noreturn@*/void fail_exit (int
#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);
}
#endif
-diff -up shadow-4.3.1/src/newgrp.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/newgrp.c
+===================================================================
+--- shadow-4.5.orig/src/newgrp.c
++++ shadow-4.5/src/newgrp.c
@@ -206,11 +206,12 @@ static void check_perms (const struct gr
strcmp (cpasswd, grp->gr_passwd) != 0) {
#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
exit (EXIT_FAILURE);
-diff -up shadow-4.3.1/src/useradd.c.audit-update shadow-4.3.1/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
-@@ -222,6 +222,8 @@ static void create_mail (void);
+Index: shadow-4.5/src/useradd.c
+===================================================================
+--- shadow-4.5.orig/src/useradd.c
++++ shadow-4.5/src/useradd.c
+@@ -225,6 +225,8 @@ static void create_mail (void);
*/
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 (rmdir (user_home) != 0) {
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) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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 */
}
}
-@@ -248,12 +244,6 @@ static void fail_exit (int code)
+@@ -251,12 +247,6 @@ static void fail_exit (int code)
if (pw_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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 */
}
}
-@@ -261,12 +251,6 @@ static void fail_exit (int code)
+@@ -264,12 +254,6 @@ static void fail_exit (int code)
if (gr_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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 */
}
}
-@@ -275,12 +259,6 @@ static void fail_exit (int code)
+@@ -278,12 +262,6 @@ static void fail_exit (int code)
if (sgr_unlock () == 0) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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 */
}
}
-@@ -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) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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 */
}
}
-@@ -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) {
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, 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,
SHADOW_AUDIT_FAILURE);
#endif
-@@ -623,7 +594,7 @@ static int set_defaults (void)
+@@ -626,7 +597,7 @@ static int set_defaults (void)
}
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_SUCCESS);
#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"),
Prog, gr_dbname ());
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 */
}
-@@ -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"),
Prog, gr_dbname (), ngrp->gr_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);
#endif
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"),
Prog, sgr_dbname ());
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 */
}
-@@ -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"),
Prog, sgr_dbname (), nsgrp->sg_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);
#endif
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);
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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 ()));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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);
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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);
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_FAILURE);
#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));
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_SUCCESS);
#endif
-@@ -1846,12 +1794,6 @@ static void usr_update (void)
+@@ -1895,12 +1843,6 @@ static void usr_update (void)
fprintf (stderr,
_("%s: failed to prepare the new %s entry '%s'\n"),
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);
}
#ifdef ENABLE_SUBIDS
-@@ -1873,7 +1815,7 @@ static void usr_update (void)
+@@ -1922,7 +1864,7 @@ static void usr_update (void)
#ifdef WITH_AUDIT
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,
SHADOW_AUDIT_SUCCESS);
#endif
-@@ -1908,12 +1850,6 @@ static void create_home (void)
+@@ -1957,12 +1899,6 @@ static void create_home (void)
fprintf (stderr,
_("%s: cannot create directory %s\n"),
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);
}
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));
home_added = true;
#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,
SHADOW_AUDIT_SUCCESS);
#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 */
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);
}
-@@ -2121,12 +2051,6 @@ int main (int argc, char **argv)
+@@ -2172,12 +2102,6 @@ int main (int argc, char **argv)
fprintf (stderr,
_("%s: group %s exists - if you want to add this user to that group, use -g.\n"),
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);
}
}
-@@ -2156,12 +2080,6 @@ int main (int argc, char **argv)
+@@ -2207,12 +2131,6 @@ int main (int argc, char **argv)
fprintf (stderr,
_("%s: UID %lu is not unique\n"),
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);
}
}
-@@ -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"),
Prog, user_name, user_selinux);
#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 */
rv = E_SE_UPDATE;
}
-diff -up shadow-4.3.1/src/userdel.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/userdel.c
+===================================================================
+--- shadow-4.5.orig/src/userdel.c
++++ shadow-4.5/src/userdel.c
@@ -214,9 +214,9 @@ static void update_groups (void)
* 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,
SHADOW_AUDIT_FAILURE);
#endif /* WITH_AUDIT */
-diff -up shadow-4.3.1/src/usermod.c.audit-update shadow-4.3.1/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
+Index: shadow-4.5/src/usermod.c
+===================================================================
+--- 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
#ifdef WITH_AUDIT
diff --git a/shadow-4.3.1-manfix.patch b/shadow-4.3.1-manfix.patch
index 4ca6054..cc62a86 100644
--- a/shadow-4.3.1-manfix.patch
+++ b/shadow-4.3.1-manfix.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.3.1/man/groupmems.8.xml.manfix shadow-4.3.1/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
+Index: shadow-4.5/man/groupmems.8.xml
+===================================================================
+--- shadow-4.5.orig/man/groupmems.8.xml
++++ shadow-4.5/man/groupmems.8.xml
@@ -179,20 +179,10 @@
SETUP
@@ -25,9 +26,10 @@ diff -up shadow-4.3.1/man/groupmems.8.xml.manfix shadow-4.3.1/man/groupmems.8.xm
-diff -up shadow-4.3.1/man/chage.1.xml.manfix shadow-4.3.1/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
+Index: shadow-4.5/man/chage.1.xml
+===================================================================
+--- shadow-4.5.orig/man/chage.1.xml
++++ shadow-4.5/man/chage.1.xml
@@ -102,6 +102,9 @@
Set the number of days since January 1st, 1970 when the password
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 -1 as the
EXPIRE_DATE will remove an account
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
---- 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
-@@ -147,10 +147,6 @@ 以下の参照表は、
+Index: shadow-4.5/man/ja/man5/login.defs.5
+===================================================================
+--- shadow-4.5.orig/man/ja/man5/login.defs.5
++++ shadow-4.5/man/ja/man5/login.defs.5
+@@ -147,10 +147,6 @@ PASS_MAX_DAYS, PASS_MIN_DAYS, PASS_WARN_
shadow パスワード機能のどのプログラムが
どのパラメータを使用するかを示したものである。
.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
GID_MAX GID_MIN
.IP newusers 12
-diff -up shadow-4.3.1/man/login.defs.5.xml.manfix shadow-4.3.1/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
+Index: shadow-4.5/man/login.defs.5.xml
+===================================================================
+--- shadow-4.5.orig/man/login.defs.5.xml
++++ shadow-4.5/man/login.defs.5.xml
@@ -162,6 +162,17 @@
long numeric parameters is machine-dependent.
@@ -205,9 +209,10 @@ diff -up shadow-4.3.1/man/login.defs.5.xml.manfix shadow-4.3.1/man/login.defs.5.
useradd
-diff -up shadow-4.3.1/man/shadow.5.xml.manfix shadow-4.3.1/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
+Index: shadow-4.5/man/shadow.5.xml
+===================================================================
+--- shadow-4.5.orig/man/shadow.5.xml
++++ shadow-4.5/man/shadow.5.xml
@@ -208,8 +208,8 @@
@@ -219,9 +224,10 @@ diff -up shadow-4.3.1/man/shadow.5.xml.manfix shadow-4.3.1/man/shadow.5.xml
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
---- 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
+Index: shadow-4.5/man/useradd.8.xml
+===================================================================
+--- shadow-4.5.orig/man/useradd.8.xml
++++ shadow-4.5/man/useradd.8.xml
@@ -347,6 +347,11 @@
is not enabled, no home
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
-diff -up shadow-4.3.1/man/usermod.8.xml.manfix shadow-4.3.1/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
+Index: shadow-4.5/man/usermod.8.xml
+===================================================================
+--- shadow-4.5.orig/man/usermod.8.xml
++++ shadow-4.5/man/usermod.8.xml
@@ -132,7 +132,8 @@
If the
option is given, the contents of the current home directory will
diff --git a/shadow-4.3.1-selinux-perms.patch b/shadow-4.3.1-selinux-perms.patch
index 9469a7e..8550150 100644
--- a/shadow-4.3.1-selinux-perms.patch
+++ b/shadow-4.3.1-selinux-perms.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.3.1/src/chgpasswd.c.selinux-perms shadow-4.3.1/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
+Index: shadow-4.5/src/chgpasswd.c
+===================================================================
+--- shadow-4.5.orig/src/chgpasswd.c
++++ shadow-4.5/src/chgpasswd.c
@@ -39,6 +39,13 @@
#include
#include
@@ -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
* 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
---- 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
+Index: shadow-4.5/src/chpasswd.c
+===================================================================
+--- shadow-4.5.orig/src/chpasswd.c
++++ shadow-4.5/src/chpasswd.c
@@ -39,6 +39,13 @@
#include
#include
@@ -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
* 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
---- 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
+Index: shadow-4.5/src/Makefile.am
+===================================================================
+--- shadow-4.5.orig/src/Makefile.am
++++ shadow-4.5/src/Makefile.am
@@ -87,9 +87,9 @@ chage_LDADD = $(LDADD) $(LIBPAM_SUID)
newuidmap_LDADD = $(LDADD) $(LIBSELINUX)
newgidmap_LDADD = $(LDADD) $(LIBSELINUX)
diff --git a/shadow-4.5-crypt_h.patch b/shadow-4.5-crypt_h.patch
new file mode 100644
index 0000000..c8d19e4
--- /dev/null
+++ b/shadow-4.5-crypt_h.patch
@@ -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
+ #else
+@@ -94,6 +96,10 @@ char *strchr (), *strrchr (), *strtok ()
+ # include
+ #endif
+
++#if HAVE_CRYPT_H
++# include /* crypt(3) may be defined in here */
++#endif
++
+ #if TIME_WITH_SYS_TIME
+ # include
+ # include
diff --git a/shadow-4.5-goodname.patch b/shadow-4.5-goodname.patch
index bf02257..215f658 100644
--- a/shadow-4.5-goodname.patch
+++ b/shadow-4.5-goodname.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.5/libmisc/chkname.c.goodname 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
+Index: shadow-4.5/libmisc/chkname.c
+===================================================================
+--- shadow-4.5.orig/libmisc/chkname.c
++++ shadow-4.5/libmisc/chkname.c
@@ -47,27 +47,46 @@
#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)
-diff -up shadow-4.5/man/groupadd.8.xml.goodname 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
+Index: shadow-4.5/man/groupadd.8.xml
+===================================================================
+--- shadow-4.5.orig/man/groupadd.8.xml
++++ shadow-4.5/man/groupadd.8.xml
@@ -256,12 +256,6 @@
CAVEATS
@@ -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.
-diff -up shadow-4.5/man/useradd.8.xml.goodname 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
+Index: shadow-4.5/man/useradd.8.xml
+===================================================================
+--- shadow-4.5.orig/man/useradd.8.xml
++++ shadow-4.5/man/useradd.8.xml
@@ -633,12 +633,6 @@
diff --git a/shadow-4.5-orig-context.patch b/shadow-4.5-orig-context.patch
index c935658..a1c2235 100644
--- a/shadow-4.5-orig-context.patch
+++ b/shadow-4.5-orig-context.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.5/lib/commonio.c.orig-context 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
+Index: shadow-4.5/lib/commonio.c
+===================================================================
+--- shadow-4.5.orig/lib/commonio.c
++++ shadow-4.5/lib/commonio.c
@@ -941,7 +941,7 @@ int commonio_close (struct commonio_db *
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++;
}
#endif
-diff -up shadow-4.5/libmisc/copydir.c.orig-context 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
+Index: shadow-4.5/libmisc/copydir.c
+===================================================================
+--- 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
*/
@@ -58,9 +60,10 @@ diff -up shadow-4.5/libmisc/copydir.c.orig-context shadow-4.5/libmisc/copydir.c
return -1;
}
#endif /* WITH_SELINUX */
-diff -up shadow-4.5/lib/prototypes.h.orig-context 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
+Index: shadow-4.5/lib/prototypes.h
+===================================================================
+--- shadow-4.5.orig/lib/prototypes.h
++++ shadow-4.5/lib/prototypes.h
@@ -311,7 +311,7 @@ extern /*@observer@*/const char *crypt_m
/* 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);
#endif
-diff -up shadow-4.5/lib/selinux.c.orig-context 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
+Index: shadow-4.5/lib/selinux.c
+===================================================================
+--- shadow-4.5.orig/lib/selinux.c
++++ shadow-4.5/lib/selinux.c
@@ -50,7 +50,7 @@ static bool selinux_enabled;
* Callers may have to Reset SELinux to create files with default
* 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
---- 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
+Index: shadow-4.5/src/useradd.c
+===================================================================
+--- shadow-4.5.orig/src/useradd.c
++++ shadow-4.5/src/useradd.c
@@ -1945,7 +1945,7 @@ static void create_home (void)
{
if (access (user_home, F_OK) != 0) {
diff --git a/shadow-4.5-selinux.patch b/shadow-4.5-selinux.patch
index cd190cc..cd1a3b4 100644
--- a/shadow-4.5-selinux.patch
+++ b/shadow-4.5-selinux.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.5/lib/semanage.c.selinux 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
+Index: shadow-4.5/lib/semanage.c
+===================================================================
+--- shadow-4.5.orig/lib/semanage.c
++++ shadow-4.5/lib/semanage.c
@@ -294,6 +294,9 @@ int set_seuser (const char *login_name,
ret = 0;
@@ -22,9 +23,10 @@ diff -up shadow-4.5/lib/semanage.c.selinux shadow-4.5/lib/semanage.c
done:
semanage_handle_destroy (handle);
return ret;
-diff -up shadow-4.5/src/useradd.c.selinux 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
+Index: shadow-4.5/src/useradd.c
+===================================================================
+--- shadow-4.5.orig/src/useradd.c
++++ shadow-4.5/src/useradd.c
@@ -2042,6 +2042,7 @@ static void create_mail (void)
*/
int main (int argc, char **argv)
diff --git a/shadow-4.5-userdel-chroot.patch b/shadow-4.5-userdel-chroot.patch
index 37700c3..7d170fa 100644
--- a/shadow-4.5-userdel-chroot.patch
+++ b/shadow-4.5-userdel-chroot.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.5/lib/selinux.c.userdel-chroot 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
+Index: shadow-4.5/lib/selinux.c
+===================================================================
+--- shadow-4.5.orig/lib/selinux.c
++++ shadow-4.5/lib/selinux.c
@@ -75,7 +75,7 @@ int set_selinux_file_context (const char
}
return 0;
@@ -19,9 +20,10 @@ diff -up shadow-4.5/lib/selinux.c.userdel-chroot shadow-4.5/lib/selinux.c
return 1;
}
}
-diff -up shadow-4.5/src/userdel.c.userdel-chroot 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
+Index: shadow-4.5/src/userdel.c
+===================================================================
+--- shadow-4.5.orig/src/userdel.c
++++ shadow-4.5/src/userdel.c
@@ -96,6 +96,7 @@ static char *user_home;
static bool fflg = false;
static bool rflg = false;
diff --git a/shadow-4.5-usermod-unlock.patch b/shadow-4.5-usermod-unlock.patch
index d37b4aa..e2d70b5 100644
--- a/shadow-4.5-usermod-unlock.patch
+++ b/shadow-4.5-usermod-unlock.patch
@@ -1,6 +1,7 @@
-diff -up shadow-4.5/src/usermod.c.unlock 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
+Index: shadow-4.5/src/usermod.c
+===================================================================
+--- 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
strcat (buf, pw_pass);
pw_pass = buf;
diff --git a/shadow-utils.spec b/shadow-utils.spec
index 25ccdb1..4d8e3f7 100644
--- a/shadow-utils.spec
+++ b/shadow-utils.spec
@@ -1,7 +1,7 @@
Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils
Version: 4.5
-Release: 8%{?dist}
+Release: 9%{?dist}
Epoch: 2
URL: http://pkg-shadow.alioth.debian.org/
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
Patch30: shadow-4.1.5.1-newgrp-grouplist.patch
Patch31: shadow-4.5-userdel-chroot.patch
+Patch32: shadow-4.5-crypt_h.patch
License: BSD and GPLv2+
Group: System Environment/Base
@@ -80,6 +81,7 @@ are used for managing group accounts.
%patch29 -p1 -b .null-tm
%patch30 -p1 -b .grouplist
%patch31 -p1 -b .userdel-chroot
+%patch32 -p1 -b .crypt_h
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO
@@ -107,11 +109,11 @@ autoreconf
--without-libpam \
--disable-shared \
--with-group-name-max-length=32
-make
+%make_build
%install
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 -p -c -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/login.defs
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*
%changelog
+* Tue Feb 06 2018 Björn Esser - 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 - 2:4.5-8
- Rebuilt for switch to libxcrypt