aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/shadow
diff options
context:
space:
mode:
authorVladimir Sorokin <sorokin@altell.ru>2010-05-04 12:46:14 +0400
committerRoman I Khimov <khimov@altell.ru>2010-08-06 09:44:18 +0400
commit7310a600f8a22b47b921082c2d2bbc23a1d1dcdf (patch)
tree988d055fe79268ef88c3976a787f6f9dab40e25e /recipes/shadow
parentd8592c44e4e1ff9f5ea4c3550e571fe5bd1673e3 (diff)
downloadopenembedded-7310a600f8a22b47b921082c2d2bbc23a1d1dcdf.tar.gz
shadow: added new package shadow-group. Fix for build with uclibc.
shadow-group contains utilities (sg, newgrp, gpasswd, groups) for group manipulation, useful when you only need things not provided by busybox. Signed-off-by: Vladimir Sorokin <sorokin@altell.ru> Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/shadow')
-rw-r--r--recipes/shadow/shadow.inc30
1 files changed, 27 insertions, 3 deletions
diff --git a/recipes/shadow/shadow.inc b/recipes/shadow/shadow.inc
index 0b850d182b..3da1da8eca 100644
--- a/recipes/shadow/shadow.inc
+++ b/recipes/shadow/shadow.inc
@@ -13,7 +13,7 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
PACKAGE_ARCH_pn-${PN} = "${MACHINE_ARCH}"
-INC_PR = "r16"
+INC_PR = "r17"
# Additional Policy files for PAM
PAM_SRC_URI = " \
@@ -42,8 +42,23 @@ EXTRA_OECONF += "\
${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \
"
+EXTRA_OECONF_libc-uclibc += "\
+ --disable-account-tools-setuid \
+ --disable-shadowgrp \
+ --without-audit \
+ --without-selinux \
+ --without-libcrack \
+ --without-nscd \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \
+"
+
CFLAGS += "-I../include"
+PACKAGES =+ "${PN}-group"
+RDEPENDS_${PN} += "${PN}-group"
+
+FILES_${PN}-group = "${bindir}/gpasswd ${bindir}/newgrp.shadow ${bindir}/sg ${bindir}/groups"
+
do_configure_prepend () {
export CONFIG_SITE="${CONFIG_SITE} ${B}/cachedpaths"
cat <<END >${B}/cachedpaths
@@ -110,7 +125,6 @@ pkg_postinst_${PN} () {
update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 200
update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 200
update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200
- update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200
update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200
update-alternatives --install ${base_bindir}/login login login.${PN} 200
update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 200
@@ -123,7 +137,17 @@ pkg_postinst_${PN} () {
}
pkg_prerm_${PN} () {
- for i in passwd chpasswd chfn newgrp chsh login vipw vigr ; do
+ for i in passwd chpasswd chfn chsh login vipw vigr ; do
update-alternatives --remove $i $i.${PN}
done
}
+
+pkg_postinst_${PN}-group () {
+ touch /etc/login.defs
+ update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200
+}
+
+pkg_prerm_${PN}-group () {
+ update-alternatives --remove newgrp newgrp.${PN}
+}
+