aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid-John Willis <John.Willis@Distant-earth.com>2010-03-22 01:06:52 +0000
committerMarcin Juszkiewicz <marcin@buglabs.net>2010-03-23 10:57:33 +0100
commit1adeed57193361d69d8a105a9334b7a8b3b7bc86 (patch)
tree376873811083443ddd9789141be982743007bedf
parent2cc21d4daacafacb9fd992614561b9c616da09fc (diff)
downloadopenembedded-1adeed57193361d69d8a105a9334b7a8b3b7bc86.tar.gz
shadow.inc: Correctly install /etc/securetty and add back support for creating /etc/skel as part of the recipe.
Signed-off-by: Chris Larson <clarson@mvista.com> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Philip Balister <philip@balister.org>
-rw-r--r--recipes/shadow/shadow.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/recipes/shadow/shadow.inc b/recipes/shadow/shadow.inc
index 83d06c36a4..4a401518e2 100644
--- a/recipes/shadow/shadow.inc
+++ b/recipes/shadow/shadow.inc
@@ -11,7 +11,7 @@ LICENSE = "BSD"
SECTION = "base"
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-INC_PR = "r6"
+INC_PR = "r7"
# Additional Policy files for PAM
PAM_SRC_URI = " \
@@ -23,6 +23,7 @@ PAM_SRC_URI = " \
file://pam.d/passwd \
file://pam.d/su \
"
+
SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \
file://login_defs_pam.sed \
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
@@ -53,6 +54,10 @@ END
}
do_install_append() {
+ # Ensure that /etc/skel is created so any default files that we want copied into new users home
+ # dirs can be put in there later (ideal for .xinitrc for example).
+ install -d ${D}${sysconfdir}/skel/
+
# Ensure that the image has as /var/spool/mail dir so shadow can put mailboxes there if the user
# reconfigures Shadow to default (see sed below).
install -d ${D}${SHADOW_MAILDIR}
@@ -77,7 +82,8 @@ do_install_append() {
mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN}
mv ${D}${bindir}/passwd ${D}${bindir}/chpasswd.${PN}
- install -m 0644 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
+ # Ensure we add a suitable securetty file to the package that has most common embedded TTYs defined.
+ install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
}
pkg_postinst_${PN} () {