* [PATCH 0/1] shadow: fix the behavior of su @ 2014-07-22 2:32 Chen Qi 2014-07-22 2:32 ` [PATCH 1/1] " Chen Qi 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2014-07-22 2:32 UTC (permalink / raw) To: openembedded-core The following changes since commit 6bc3696d8451a23d743daf03ee98c4ba54ce4551: wget: Remove unneeded DEPENDS line (2014-07-21 19:10:30 +0100) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib ChenQi/shadow-su http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/shadow-su Chen Qi (1): shadow: fix the behavior of su .../0001-su.c-fix-to-exec-command-correctly.patch | 25 ++++++++++++++++++++ meta/recipes-extended/shadow/shadow.inc | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch -- 1.7.9.5 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] shadow: fix the behavior of su 2014-07-22 2:32 [PATCH 0/1] shadow: fix the behavior of su Chen Qi @ 2014-07-22 2:32 ` Chen Qi 2014-07-22 12:05 ` Gary Thomas 0 siblings, 1 reply; 3+ messages in thread From: Chen Qi @ 2014-07-22 2:32 UTC (permalink / raw) To: openembedded-core 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. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- .../0001-su.c-fix-to-exec-command-correctly.patch | 25 ++++++++++++++++++++ meta/recipes-extended/shadow/shadow.inc | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch 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 0000000..31337de --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch @@ -0,0 +1,25 @@ +Upstream-Status: Pending + +Subject: su.c: fix to exec command correctly + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/su.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/su.c b/src/su.c +index 3704217..bc4f2ac 100644 +--- a/src/su.c ++++ b/src/su.c +@@ -1156,7 +1156,7 @@ int main (int argc, char **argv) + * Use the shell and create an argv + * with the rest of the command line included. + */ +- argv[-1] = cp; ++ argv[-1] = shellstr; + execve_shell (shellstr, &argv[-1], environ); + err = errno; + (void) fprintf (stderr, +-- +1.7.9.5 + diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 66541f4..84d1f86 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 \ file://shadow-4.1.3-dots-in-usernames.patch \ file://usermod-fix-compilation-failure-with-subids-disabled.patch \ file://fix-installation-failure-with-subids-disabled.patch \ + file://0001-su.c-fix-to-exec-command-correctly.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ " -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] shadow: fix the behavior of su 2014-07-22 2:32 ` [PATCH 1/1] " Chen Qi @ 2014-07-22 12:05 ` Gary Thomas 0 siblings, 0 replies; 3+ messages in thread From: Gary Thomas @ 2014-07-22 12:05 UTC (permalink / raw) To: openembedded-core On 2014-07-21 20:32, Chen Qi wrote: > 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. > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Acked-by: Gary Thomas <gary@mlbassoc.com> > --- > .../0001-su.c-fix-to-exec-command-correctly.patch | 25 ++++++++++++++++++++ > meta/recipes-extended/shadow/shadow.inc | 1 + > 2 files changed, 26 insertions(+) > create mode 100644 meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch > > 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 0000000..31337de > --- /dev/null > +++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch > @@ -0,0 +1,25 @@ > +Upstream-Status: Pending > + > +Subject: su.c: fix to exec command correctly > + > +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > +--- > + src/su.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/src/su.c b/src/su.c > +index 3704217..bc4f2ac 100644 > +--- a/src/su.c > ++++ b/src/su.c > +@@ -1156,7 +1156,7 @@ int main (int argc, char **argv) > + * Use the shell and create an argv > + * with the rest of the command line included. > + */ > +- argv[-1] = cp; > ++ argv[-1] = shellstr; > + execve_shell (shellstr, &argv[-1], environ); > + err = errno; > + (void) fprintf (stderr, > +-- > +1.7.9.5 > + > diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc > index 66541f4..84d1f86 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 \ > file://shadow-4.1.3-dots-in-usernames.patch \ > file://usermod-fix-compilation-failure-with-subids-disabled.patch \ > file://fix-installation-failure-with-subids-disabled.patch \ > + file://0001-su.c-fix-to-exec-command-correctly.patch \ > ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ > " > > -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-22 12:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-22 2:32 [PATCH 0/1] shadow: fix the behavior of su Chen Qi 2014-07-22 2:32 ` [PATCH 1/1] " Chen Qi 2014-07-22 12:05 ` Gary Thomas
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox