forked from pool/shadow
Fix option parsing, broken by accident
OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=60
This commit is contained in:
parent
981192bf42
commit
93bc90d0de
@ -1,4 +1,4 @@
|
||||
commit c0dea3bb7f548b93244c5da6eae805444485429f
|
||||
commit 52ea836ffbfa4d6797cf89d6ada58f76bee9cf6b
|
||||
Author: Adam Majer <amajer@suse.de>
|
||||
Date: Wed Jan 23 16:17:05 2019 +0100
|
||||
|
||||
@ -7,7 +7,7 @@ Date: Wed Jan 23 16:17:05 2019 +0100
|
||||
Feature is enabled by default, if headers are available. It can be
|
||||
turned off explictly.
|
||||
|
||||
commit 3ce4a86acec3b96e85cbff291035d24cdcd4b5db
|
||||
commit 81ead2042afcdb8d423da855cf1528618a4e0c01
|
||||
Author: Adam Majer <amajer@suse.de>
|
||||
Date: Mon Jan 21 09:32:36 2019 +0100
|
||||
|
||||
@ -27,10 +27,9 @@ Date: Mon Jan 21 09:32:36 2019 +0100
|
||||
is a subvolume and issue an error messages instead of copying it. Moving
|
||||
user's home (as subvolume) on same btrfs works transparently.
|
||||
|
||||
Index: shadow-4.6/configure.ac
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/configure.ac
|
||||
+++ shadow-4.6/configure.ac
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -256,6 +256,9 @@ AC_ARG_WITH(audit,
|
||||
AC_ARG_WITH(libpam,
|
||||
[AC_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])],
|
||||
@ -70,10 +69,8 @@ Index: shadow-4.6/configure.ac
|
||||
echo " ACL support: $with_acl"
|
||||
echo " Extended Attributes support: $with_attr"
|
||||
echo " tcb support (incomplete): $with_tcb"
|
||||
Index: shadow-4.6/lib/prototypes.h
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/lib/prototypes.h
|
||||
+++ shadow-4.6/lib/prototypes.h
|
||||
--- a/lib/prototypes.h
|
||||
+++ b/lib/prototypes.h
|
||||
@@ -72,6 +72,14 @@ extern int expire (const struct passwd *
|
||||
/* isexpired.c */
|
||||
extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *);
|
||||
@ -89,10 +86,8 @@ Index: shadow-4.6/lib/prototypes.h
|
||||
/* basename() renamed to Basename() to avoid libc name space confusion */
|
||||
/* basename.c */
|
||||
extern /*@observer@*/const char *Basename (const char *str);
|
||||
Index: shadow-4.6/libmisc/Makefile.am
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/libmisc/Makefile.am
|
||||
+++ shadow-4.6/libmisc/Makefile.am
|
||||
--- a/libmisc/Makefile.am
|
||||
+++ b/libmisc/Makefile.am
|
||||
@@ -72,3 +72,8 @@ libmisc_a_SOURCES = \
|
||||
xgetspnam.c \
|
||||
xmalloc.c \
|
||||
@ -102,10 +97,8 @@ Index: shadow-4.6/libmisc/Makefile.am
|
||||
+libmisc_a_SOURCES += btrfs.c
|
||||
+endif
|
||||
+
|
||||
Index: shadow-4.6/libmisc/btrfs.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ shadow-4.6/libmisc/btrfs.c
|
||||
+++ b/libmisc/btrfs.c
|
||||
@@ -0,0 +1,94 @@
|
||||
+#include <linux/btrfs_tree.h>
|
||||
+#include <linux/magic.h>
|
||||
@ -201,10 +194,8 @@ Index: shadow-4.6/libmisc/btrfs.c
|
||||
+ return sfs.f_type == BTRFS_SUPER_MAGIC;
|
||||
+}
|
||||
+
|
||||
Index: shadow-4.6/src/useradd.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/useradd.c
|
||||
+++ shadow-4.6/src/useradd.c
|
||||
--- a/src/useradd.c
|
||||
+++ b/src/useradd.c
|
||||
@@ -164,6 +164,7 @@ static bool
|
||||
oflg = false, /* permit non-unique user ID to be specified with -u */
|
||||
rflg = false, /* create a system account */
|
||||
@ -233,26 +224,7 @@ Index: shadow-4.6/src/useradd.c
|
||||
{"comment", required_argument, NULL, 'c'},
|
||||
{"home-dir", required_argument, NULL, 'd'},
|
||||
{"defaults", no_argument, NULL, 'D'},
|
||||
@@ -1113,11 +1120,15 @@ static void process_flags (int argc, cha
|
||||
{NULL, 0, NULL, '\0'}
|
||||
};
|
||||
while ((c = getopt_long (argc, argv,
|
||||
+ "b:"
|
||||
+#ifdef WITH_BTRFS
|
||||
+ ":"
|
||||
+#endif
|
||||
+ "c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U"
|
||||
#ifdef WITH_SELINUX
|
||||
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:",
|
||||
-#else /* !WITH_SELINUX */
|
||||
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U",
|
||||
+ "Z:"
|
||||
#endif /* !WITH_SELINUX */
|
||||
+ ,
|
||||
long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'b':
|
||||
@@ -1131,6 +1142,9 @@ static void process_flags (int argc, cha
|
||||
@@ -1131,6 +1138,9 @@ static void process_flags (int argc, cha
|
||||
def_home = optarg;
|
||||
bflg = true;
|
||||
break;
|
||||
@ -262,7 +234,7 @@ Index: shadow-4.6/src/useradd.c
|
||||
case 'c':
|
||||
if (!VALID (optarg)) {
|
||||
fprintf (stderr,
|
||||
@@ -2049,6 +2063,37 @@ static void create_home (void)
|
||||
@@ -2049,6 +2059,37 @@ static void create_home (void)
|
||||
strcat (path, "/");
|
||||
strcat (path, cp);
|
||||
if (access (path, F_OK) != 0) {
|
||||
@ -300,10 +272,8 @@ Index: shadow-4.6/src/useradd.c
|
||||
if (mkdir (path, 0) != 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: cannot create directory %s\n"),
|
||||
Index: shadow-4.6/src/userdel.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/userdel.c
|
||||
+++ shadow-4.6/src/userdel.c
|
||||
--- a/src/userdel.c
|
||||
+++ b/src/userdel.c
|
||||
@@ -1273,6 +1273,23 @@ int main (int argc, char **argv)
|
||||
#endif /* EXTRA_CHECK_HOME_DIR */
|
||||
|
||||
@ -328,10 +298,8 @@ Index: shadow-4.6/src/userdel.c
|
||||
if (remove_tree (user_home, true) != 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: error removing directory %s\n"),
|
||||
Index: shadow-4.6/src/usermod.c
|
||||
===================================================================
|
||||
--- shadow-4.6.orig/src/usermod.c
|
||||
+++ shadow-4.6/src/usermod.c
|
||||
--- a/src/usermod.c
|
||||
+++ b/src/usermod.c
|
||||
@@ -1818,6 +1818,15 @@ static void move_home (void)
|
||||
return;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user