* [PATCH 0/3]fix confliction of attempted installing su binary among busybox, shadow and util-linux
@ 2013-07-26 12:09 Hongxu Jia
2013-07-26 12:09 ` [PATCH 1/3] util-linux: use u-a for su Hongxu Jia
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-07-26 12:09 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 67864ca79da08df752487a3a4e1a975546da123d:
systemd: Remove systemd_unitdir if systemd is not in distro features (2013-07-24 11:35:39 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-su
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-su
Hongxu Jia (3):
util-linux: use u-a for su
shadow: use u-a for su
move /bin/su to /usr/bin/su to match util-linux and shadow
.../busybox/busybox-1.21.1/su-usr-bin.patch | 26 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.21.1.bb | 1 +
meta/recipes-core/util-linux/util-linux.inc | 7 ++++++
meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 3 ++-
4 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] util-linux: use u-a for su
2013-07-26 12:09 [PATCH 0/3]fix confliction of attempted installing su binary among busybox, shadow and util-linux Hongxu Jia
@ 2013-07-26 12:09 ` Hongxu Jia
2013-07-26 12:09 ` [PATCH 2/3] shadow: " Hongxu Jia
2013-07-26 12:09 ` [PATCH 3/3] move /bin/su to /usr/bin/su to match util-linux and shadow Hongxu Jia
2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-07-26 12:09 UTC (permalink / raw)
To: openembedded-core
Use alternatives mechanism to prevent confliction of attempted
installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index d373cec..89bc4a8 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -218,3 +218,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
BBCLASSEXTEND = "native nativesdk"
+
+python do_package_prepend () {
+ if '--enable-su' in d.getVar('EXTRA_OECONF', True).split():
+ alt_name = "su"
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name))
+ d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
+}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] shadow: use u-a for su
2013-07-26 12:09 [PATCH 0/3]fix confliction of attempted installing su binary among busybox, shadow and util-linux Hongxu Jia
2013-07-26 12:09 ` [PATCH 1/3] util-linux: use u-a for su Hongxu Jia
@ 2013-07-26 12:09 ` Hongxu Jia
2013-07-26 12:09 ` [PATCH 3/3] move /bin/su to /usr/bin/su to match util-linux and shadow Hongxu Jia
2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-07-26 12:09 UTC (permalink / raw)
To: openembedded-core
Use alternatives mechanism to prevent confliction of attempted
installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
index caf24c0..173da3b 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -119,11 +119,12 @@ inherit update-alternatives
ALTERNATIVE_PRIORITY = "200"
-ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr"
+ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su"
ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
+ALTERNATIVE_LINK_NAME[su] = "${bindir}/su"
pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] move /bin/su to /usr/bin/su to match util-linux and shadow
2013-07-26 12:09 [PATCH 0/3]fix confliction of attempted installing su binary among busybox, shadow and util-linux Hongxu Jia
2013-07-26 12:09 ` [PATCH 1/3] util-linux: use u-a for su Hongxu Jia
2013-07-26 12:09 ` [PATCH 2/3] shadow: " Hongxu Jia
@ 2013-07-26 12:09 ` Hongxu Jia
2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-07-26 12:09 UTC (permalink / raw)
To: openembedded-core
Both of util-linux and shadow have su binary in /usr/bin, fix busybox
to use the same path so they can be properly tracked by alternatives.
[YOCTO #4926]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
.../busybox/busybox-1.21.1/su-usr-bin.patch | 26 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.21.1.bb | 1 +
2 files changed, 27 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch b/meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
new file mode 100644
index 0000000..0d5b558
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/su-usr-bin.patch
@@ -0,0 +1,26 @@
+busybox: move /bin/su to /usr/bin/su to match util-linux and shadow
+
+Both of util-linux and shadow have su binary in /usr/bin, fix busybox
+to use the same path so they can be properly tracked by alternatives.
+
+Upstream-Status: Inappropriate [embedded]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ include/applets.src.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/applets.src.h b/include/applets.src.h
+--- a/include/applets.src.h
++++ b/include/applets.src.h
+@@ -349,7 +349,7 @@ IF_STAT(APPLET(stat, BB_DIR_USR_BIN, BB_SUID_DROP))
+ IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
+ IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
+ /* Needs to be run by root or be suid root - needs to change uid and gid: */
+-IF_SU(APPLET(su, BB_DIR_BIN, BB_SUID_REQUIRE))
++IF_SU(APPLET(su, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
+ IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP))
+ IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
+ IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP))
+--
+1.8.1.2
+
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.21.1.bb
index d702f7e..fdb1974 100644
--- a/meta/recipes-core/busybox/busybox_1.21.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.21.1.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://umount.busybox \
file://defconfig \
file://stat-usr-bin.patch \
+ file://su-usr-bin.patch \
file://busybox-syslog.service.in \
file://busybox-klogd.service.in \
file://testsuite-du-du-k-works-fix-false-positive.patch \
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-26 12:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 12:09 [PATCH 0/3]fix confliction of attempted installing su binary among busybox, shadow and util-linux Hongxu Jia
2013-07-26 12:09 ` [PATCH 1/3] util-linux: use u-a for su Hongxu Jia
2013-07-26 12:09 ` [PATCH 2/3] shadow: " Hongxu Jia
2013-07-26 12:09 ` [PATCH 3/3] move /bin/su to /usr/bin/su to match util-linux and shadow Hongxu Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox