[oe-commits] Phil Blundell : shadow: add patch for useradd lossage

git version control git at git.openembedded.org
Fri Sep 9 17:46:02 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: 8fce8180c802ad187c4df44c17207bfb026ce6c7
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8fce8180c802ad187c4df44c17207bfb026ce6c7

Author: Phil Blundell <philb at gnu.org>
Date:   Wed Sep  7 13:02:10 2011 +0100

shadow: add patch for useradd lossage

This fixes (or, at least, papers over) a failure in do_install for recipes which
inherit useradd.bbclass.  Rewinding optind in this way is not entirely portable
but in practice it seems to work on GNU-ish build hosts at least.

Signed-off-by: Phil Blundell <philb at gnu.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-extended/shadow/files/useradd.patch   |   17 +++++++++++++++++
 .../shadow/shadow-native_4.1.4.3.bb                |    5 +++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch
new file mode 100644
index 0000000..ff5016c
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/useradd.patch
@@ -0,0 +1,17 @@
+Work around a bug introduced with the --root option which was causing
+all other arguments to be ignored.
+
+Upstream-Status: inappropriate
+Signed-off-by: Phil Blundell <philb at gnu.org>
+
+--- a/src/useradd.c~	2011-09-01 15:36:40.398234861 +0100
++++ b/src/useradd.c	2011-09-01 17:29:00.782004133 +0100
+@@ -1957,6 +1957,8 @@
+ 
+ 	get_defaults ();
+ 
++	optind = 1;
++
+ 	process_flags (argc, argv);
+ 
+ #ifdef ACCT_TOOLS_SETUID
diff --git a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
index 485495e..c29e4c1 100644
--- a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
@@ -7,13 +7,14 @@ LICENSE = "BSD | Artistic"
 LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
                     file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
            file://shadow.automake-1.11.patch \
            file://shadow-4.1.3-dots-in-usernames.patch \
            file://shadow-4.1.4.2-env-reset-keep-locale.patch \
-           file://add_root_cmd_options.patch"
+           file://add_root_cmd_options.patch \
+	   file://useradd.patch"
 
 SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
 SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" 





More information about the Openembedded-commits mailing list