summaryrefslogtreecommitdiff
path: root/recipes/shadow/shadow_4.1.4.2.bb
diff options
context:
space:
mode:
authorDavid-John Willis <John.Willis@Distant-earth.com>2009-11-09 07:54:07 +0000
committerKoen Kooi <koen@openembedded.org>2009-11-24 11:08:36 +0100
commit4677a67913c5ec376eb016e6aac21f9a7ad5e9c4 (patch)
tree849b9c0009b745de489b1f13f0fd7dbb68863500 /recipes/shadow/shadow_4.1.4.2.bb
parent7ed998436c39ff922f285fd73d87f0336973218f (diff)
shadow: Add version 4.1.4.2 and checksum.
* This version now has Linux-PAM support enabled in OE so will need some testing and maybe a little tweaking. * Add pam.d config files for common shadow utils in addition to the default ones. * Cleanup shadow defaults and make shadow 'play nice' with PAM. * Update pam.d service files to suggested upstream Linux-PAM layout. * TODO: Some Shadow default session files still use the older layout (incluse system-auth for everything). These will need newer files to be added to the pam.d folder in the recipe as they are found.
Diffstat (limited to 'recipes/shadow/shadow_4.1.4.2.bb')
-rw-r--r--recipes/shadow/shadow_4.1.4.2.bb52
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes/shadow/shadow_4.1.4.2.bb b/recipes/shadow/shadow_4.1.4.2.bb
new file mode 100644
index 0000000000..04887a01d1
--- /dev/null
+++ b/recipes/shadow/shadow_4.1.4.2.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "login/password and account utilities"
+LICENSE = "GPL"
+
+DEPEND = "libpam"
+RDEPEND = "${DEPEND}"
+
+PR = "r5"
+
+EXTRA_OECONF += " --enable-shared --enable-static --with-libpam --without-libcrack"
+
+inherit autotools
+
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org/"
+SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \
+ file://login_defs_pam.sed \
+"
+
+# Additional Policy files for PAM
+SRC_URI_append = " \
+ file://pam.d/chfn \
+ file://pam.d/chpasswd \
+ file://pam.d/chsh \
+ file://pam.d/login \
+ file://pam.d/newusers \
+ file://pam.d/passwd \
+ file://pam.d/su \
+"
+
+S = "${WORKDIR}/shadow-${PV}"
+
+CFLAGS_append = " -I../include"
+
+do_install_append() {
+ # 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}${localstatedir}/spool/mail/
+
+ install -d ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+
+ # Remove defaults that are not used when supporting PAM
+ sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
+
+ # Enable CREATE_HOME by default.
+ sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
+
+ # As we are on an embedded system ensure the users mailbox is in ~/ not
+ # /var/spool/mail by default as who knows where or how big /var is.
+ # The system MDA will set this later anyway.
+ sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
+ sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
+}