summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r--meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch25
-rw-r--r--meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch12
-rw-r--r--meta/recipes-extended/shadow/files/securetty4
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb2
-rw-r--r--meta/recipes-extended/shadow/shadow.inc24
5 files changed, 33 insertions, 34 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
deleted file mode 100644
index 31337de362..0000000000
--- a/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
index 60f2ed548a..185590cabd 100644
--- a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
+++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
@@ -19,9 +19,9 @@ index 1a3f841..4a4d6d0 100644
--- a/configure.in
+++ b/configure.in
@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
- dnl
- dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
- dnl
+ dnl
+ dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
+ dnl
- AC_RUN_IFELSE([AC_LANG_SOURCE([
-#include <sys/types.h>
-int main(void) {
@@ -36,6 +36,6 @@ index 1a3f841..4a4d6d0 100644
+ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
+
+ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
- AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
- enable_subids="yes"
- else
+ AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
+ enable_subids="yes"
+ else
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
index ecc246f799..2be341a216 100644
--- a/meta/recipes-extended/shadow/files/securetty
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -45,6 +45,10 @@ ttyO1
ttyO2
ttyO3
+# Xilinx Zynq SoC
+ttyPS0
+ttyPS1
+
# USB dongles
ttyUSB0
ttyUSB1
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
index 0e0410043b..c78f888cf4 100644
--- a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
@@ -9,6 +9,8 @@ PR = "r3"
SRC_URI = "file://securetty"
+S = "${WORKDIR}"
+
# Since SERIAL_CONSOLES is likely to be set from the machine configuration
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index bb3a927c17..419fe94b51 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -14,7 +14,6 @@ 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 \
file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
@@ -107,6 +106,10 @@ do_install() {
# Disable checking emails.
sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+ # Comment out SU_NAME to work correctly with busybox
+ # See Bug#5359 and Bug#7173
+ sed -i 's:^SU_NAME:#SU_NAME:g' ${D}${sysconfdir}/login.defs
+
# Use proper encryption for passwords
sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
@@ -149,15 +152,30 @@ do_install_append() {
ln -sf newgrp.${BPN} ${D}${bindir}/sg
}
+PACKAGES =+ "${PN}-base"
+FILES_${PN}-base = "\
+ ${base_bindir}/login.shadow \
+ ${base_bindir}/su.shadow \
+ ${bindir}/sg \
+ ${bindir}/newgrp.shadow \
+ ${bindir}/groups.shadow \
+ ${sysconfdir}/pam.d/login \
+ ${sysconfdir}/pam.d/su \
+ ${sysconfdir}/login.defs \
+"
+RDEPENDS_${PN} += "${PN}-base"
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "200"
-ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su"
+ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr"
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_${PN}-base = "newgrp groups login su"
+ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3"