forked from pool/shadow
This commit is contained in:
parent
f87c80c5df
commit
e9204025f7
@ -4,11 +4,11 @@ Date: Mon Jan 21 09:32:36 2019 +0100
|
||||
|
||||
{WIP}
|
||||
|
||||
diff --git a/lib/prototypes.h b/lib/prototypes.h
|
||||
index d9e7f6f4..9e4f73cd 100644
|
||||
--- a/lib/prototypes.h
|
||||
+++ b/lib/prototypes.h
|
||||
@@ -72,6 +72,12 @@ extern int expire (const struct passwd *, /*@null@*/const struct spwd *);
|
||||
Index: shadow-4.6/lib/prototypes.h
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/lib/prototypes.h
|
||||
+++ shadow-4.6/lib/prototypes.h
|
||||
@@ -72,6 +72,12 @@ extern int expire (const struct passwd *
|
||||
/* isexpired.c */
|
||||
extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *);
|
||||
|
||||
@ -21,10 +21,10 @@ index d9e7f6f4..9e4f73cd 100644
|
||||
/* basename() renamed to Basename() to avoid libc name space confusion */
|
||||
/* basename.c */
|
||||
extern /*@observer@*/const char *Basename (const char *str);
|
||||
diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
|
||||
index eb44a569..a95392ea 100644
|
||||
--- a/libmisc/Makefile.am
|
||||
+++ b/libmisc/Makefile.am
|
||||
Index: shadow-4.6/libmisc/Makefile.am
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/libmisc/Makefile.am
|
||||
+++ shadow-4.6/libmisc/Makefile.am
|
||||
@@ -10,6 +10,7 @@ libmisc_a_SOURCES = \
|
||||
age.c \
|
||||
audit_help.c \
|
||||
@ -33,11 +33,10 @@ index eb44a569..a95392ea 100644
|
||||
chkname.c \
|
||||
chkname.h \
|
||||
chowndir.c \
|
||||
diff --git a/libmisc/btrfs.c b/libmisc/btrfs.c
|
||||
new file mode 100644
|
||||
index 00000000..7236454a
|
||||
Index: shadow-4.6/libmisc/btrfs.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/libmisc/btrfs.c
|
||||
+++ shadow-4.6/libmisc/btrfs.c
|
||||
@@ -0,0 +1,94 @@
|
||||
+#include <linux/btrfs_tree.h>
|
||||
+#include <linux/magic.h>
|
||||
@ -133,11 +132,11 @@ index 00000000..7236454a
|
||||
+ return sfs.f_type == BTRFS_SUPER_MAGIC;
|
||||
+}
|
||||
+
|
||||
diff --git a/src/useradd.c b/src/useradd.c
|
||||
index 41e2ace4..db6d6998 100644
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -68,6 +68,7 @@
|
||||
Index: shadow-4.6/src/useradd.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/useradd.c
|
||||
+++ shadow-4.6/src/useradd.c
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "sgroupio.h"
|
||||
#endif
|
||||
#include "shadowio.h"
|
||||
@ -145,7 +144,7 @@ index 41e2ace4..db6d6998 100644
|
||||
#ifdef ENABLE_SUBIDS
|
||||
#include "subordinateio.h"
|
||||
#endif /* ENABLE_SUBIDS */
|
||||
@@ -165,6 +166,7 @@ static bool
|
||||
@@ -164,6 +165,7 @@ static bool
|
||||
oflg = false, /* permit non-unique user ID to be specified with -u */
|
||||
rflg = false, /* create a system account */
|
||||
sflg = false, /* shell program for new account */
|
||||
@ -153,7 +152,7 @@ index 41e2ace4..db6d6998 100644
|
||||
uflg = false, /* specify user ID for new account */
|
||||
Uflg = false; /* create a group having the same name as the user */
|
||||
|
||||
@@ -822,6 +824,7 @@ static void usage (int status)
|
||||
@@ -805,6 +807,7 @@ static void usage (int status)
|
||||
Prog, Prog, Prog);
|
||||
(void) fputs (_(" -b, --base-dir BASE_DIR base directory for the home directory of the\n"
|
||||
" new account\n"), usageout);
|
||||
@ -161,7 +160,7 @@ index 41e2ace4..db6d6998 100644
|
||||
(void) fputs (_(" -c, --comment COMMENT GECOS field of the new account\n"), usageout);
|
||||
(void) fputs (_(" -d, --home-dir HOME_DIR home directory of the new account\n"), usageout);
|
||||
(void) fputs (_(" -D, --defaults print or change default useradd configuration\n"), usageout);
|
||||
@@ -1102,6 +1105,7 @@ static void process_flags (int argc, char **argv)
|
||||
@@ -1085,6 +1088,7 @@ static void process_flags (int argc, cha
|
||||
int c;
|
||||
static struct option long_options[] = {
|
||||
{"base-dir", required_argument, NULL, 'b'},
|
||||
@ -169,7 +168,7 @@ index 41e2ace4..db6d6998 100644
|
||||
{"comment", required_argument, NULL, 'c'},
|
||||
{"home-dir", required_argument, NULL, 'd'},
|
||||
{"defaults", no_argument, NULL, 'D'},
|
||||
@@ -1131,9 +1135,9 @@ static void process_flags (int argc, char **argv)
|
||||
@@ -1114,9 +1118,9 @@ static void process_flags (int argc, cha
|
||||
};
|
||||
while ((c = getopt_long (argc, argv,
|
||||
#ifdef WITH_SELINUX
|
||||
@ -181,7 +180,7 @@ index 41e2ace4..db6d6998 100644
|
||||
#endif /* !WITH_SELINUX */
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
@@ -1148,6 +1152,9 @@ static void process_flags (int argc, char **argv)
|
||||
@@ -1131,6 +1135,9 @@ static void process_flags (int argc, cha
|
||||
def_home = optarg;
|
||||
bflg = true;
|
||||
break;
|
||||
@ -191,7 +190,7 @@ index 41e2ace4..db6d6998 100644
|
||||
case 'c':
|
||||
if (!VALID (optarg)) {
|
||||
fprintf (stderr,
|
||||
@@ -2073,7 +2080,35 @@ static void create_home (void)
|
||||
@@ -2049,7 +2056,35 @@ static void create_home (void)
|
||||
strcat (path, "/");
|
||||
strcat (path, cp);
|
||||
if (access (path, F_OK) != 0) {
|
||||
@ -226,13 +225,13 @@ index 41e2ace4..db6d6998 100644
|
||||
+ }
|
||||
+ else if (mkdir (path, 0) != 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: cannot create directory %s\n"),
|
||||
Prog, path);
|
||||
diff --git a/src/userdel.c b/src/userdel.c
|
||||
index 0715e4fe..00369133 100644
|
||||
--- a/src/userdel.c
|
||||
+++ b/src/userdel.c
|
||||
@@ -1272,7 +1272,21 @@ int main (int argc, char **argv)
|
||||
_("%s: cannot create directory %s\n"),
|
||||
Prog, path);
|
||||
Index: shadow-4.6/src/userdel.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/userdel.c
|
||||
+++ shadow-4.6/src/userdel.c
|
||||
@@ -1273,7 +1273,21 @@ int main (int argc, char **argv)
|
||||
#endif /* EXTRA_CHECK_HOME_DIR */
|
||||
|
||||
if (rflg) {
|
||||
@ -255,11 +254,11 @@ index 0715e4fe..00369133 100644
|
||||
fprintf (stderr,
|
||||
_("%s: error removing directory %s\n"),
|
||||
Prog, user_home);
|
||||
diff --git a/src/usermod.c b/src/usermod.c
|
||||
index 72eeb8b2..427bb718 100644
|
||||
--- a/src/usermod.c
|
||||
+++ b/src/usermod.c
|
||||
@@ -1819,6 +1819,13 @@ static void move_home (void)
|
||||
Index: shadow-4.6/src/usermod.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/usermod.c
|
||||
+++ shadow-4.6/src/usermod.c
|
||||
@@ -1818,6 +1818,13 @@ static void move_home (void)
|
||||
return;
|
||||
} else {
|
||||
if (EXDEV == errno) {
|
||||
|
@ -47,10 +47,13 @@ Patch12: shadow-4.6.0-fix-usermod-prefix-crash.patch
|
||||
Patch20: disable_new_audit_function.patch
|
||||
Patch21: btrfs-subvolumes.patch
|
||||
BuildRequires: audit-devel > 2.3
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsemanage-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: xz
|
||||
Requires(pre): group(root)
|
||||
@ -90,6 +93,7 @@ mv -v doc/HOWTO.utf8 doc/HOWTO
|
||||
export CFLAGS="%{optflags} -fpie"
|
||||
export LDFLAGS="-pie"
|
||||
|
||||
autoreconf -fvi
|
||||
%configure \
|
||||
--disable-shadowgrp \
|
||||
--enable-account-tools-setuid \
|
||||
|
Loading…
Reference in New Issue
Block a user