summaryrefslogtreecommitdiffstats
path: root/debian/patches/542_useradd-O_option
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:50:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 12:50:01 +0000
commitdf4dbd3378e13e9f43c727c36339f078fe3093fe (patch)
tree9edf4a31373538bd239af5be10e00f5a449d3d0e /debian/patches/542_useradd-O_option
parentAdding upstream version 1:4.8.1. (diff)
downloadshadow-debian.tar.xz
shadow-debian.zip
Adding debian version 1:4.8.1-1.debian/1%4.8.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/542_useradd-O_option')
-rw-r--r--debian/patches/542_useradd-O_option43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/542_useradd-O_option b/debian/patches/542_useradd-O_option
new file mode 100644
index 0000000..f9ea5a0
--- /dev/null
+++ b/debian/patches/542_useradd-O_option
@@ -0,0 +1,43 @@
+Goal: accepts the -O flag for backward compatibility. (was used by adduser?)
+
+Note: useradd.8 needs to be regenerated.
+
+Status wrt upstream: not included as this is just specific
+ backward compatibility for Debian
+
+--- a/man/useradd.8.xml
++++ b/man/useradd.8.xml
+@@ -341,6 +341,11 @@
+ databases are reset to avoid reusing the entry from a previously
+ deleted user.
+ </para>
++ <para>
++ For the compatibility with previous Debian's
++ <command>useradd</command>, the <option>-O</option> option is
++ also supported.
++ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1143,9 +1143,9 @@
+ };
+ while ((c = getopt_long (argc, argv,
+ #ifdef WITH_SELINUX
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:",
++ "b:c:d:De:f:g:G:hk:O: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",
++ "b:c:d:De:f:g:G:hk:O:K:lmMNop:rR:P:s:u:U",
+ #endif /* !WITH_SELINUX */
+ long_options, NULL)) != -1) {
+ switch (c) {
+@@ -1274,6 +1274,7 @@
+ kflg = true;
+ break;
+ case 'K':
++ case 'O': /* compatibility with previous Debian useradd */
+ /*
+ * override login.defs defaults (-K name=value)
+ * example: -K UID_MIN=100 -K UID_MAX=499