diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-07-22 10:32:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 21:59:14 +0100 |
commit | 0270b0e1c599ea56c3ba1479d5231b9fbaf877ce (patch) | |
tree | 0605fc3bc8566f9847efbc56bae92a61912a44a4 /meta/recipes-extended/shadow | |
parent | cfa23a21d4f97136af56066d5d438c4a612eac11 (diff) | |
download | poky-0270b0e1c599ea56c3ba1479d5231b9fbaf877ce.tar.gz |
shadow: fix the behavior of su
In systems where bash is not installed and /bin/sh is provided by
busybox. Commands like `su -l -c '/home/root/test' xuser' would fail
complaining the the 'su' applet could not be found.
This patch references the old version of shadow to keep the behaviour
the way it was in old version so that we would avoid the problem mentioned
above.
(From OE-Core rev: ab0115d1b8a0cb0b25bdb14fd2a3e6c6bb9a44f8)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r-- | meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch | 25 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow.inc | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch new file mode 100644 index 0000000000..31337de362 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Subject: su.c: fix to exec command correctly | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/su.c | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/src/su.c b/src/su.c | ||
11 | index 3704217..bc4f2ac 100644 | ||
12 | --- a/src/su.c | ||
13 | +++ b/src/su.c | ||
14 | @@ -1156,7 +1156,7 @@ int main (int argc, char **argv) | ||
15 | * Use the shell and create an argv | ||
16 | * with the rest of the command line included. | ||
17 | */ | ||
18 | - argv[-1] = cp; | ||
19 | + argv[-1] = shellstr; | ||
20 | execve_shell (shellstr, &argv[-1], environ); | ||
21 | err = errno; | ||
22 | (void) fprintf (stderr, | ||
23 | -- | ||
24 | 1.7.9.5 | ||
25 | |||
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 66541f4cce..84d1f864b7 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
@@ -14,6 +14,7 @@ SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ | |||
14 | file://shadow-4.1.3-dots-in-usernames.patch \ | 14 | file://shadow-4.1.3-dots-in-usernames.patch \ |
15 | file://usermod-fix-compilation-failure-with-subids-disabled.patch \ | 15 | file://usermod-fix-compilation-failure-with-subids-disabled.patch \ |
16 | file://fix-installation-failure-with-subids-disabled.patch \ | 16 | file://fix-installation-failure-with-subids-disabled.patch \ |
17 | file://0001-su.c-fix-to-exec-command-correctly.patch \ | ||
17 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ | 18 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ |
18 | " | 19 | " |
19 | 20 | ||