Patchwork [06/10] screen: add pam support

login
register
mail settings
Submitter Kang Kai
Date July 21, 2011, 8 a.m.
Message ID <ebaad8dec0cc4643d164c8091a1d0dbd580c7219.1311234759.git.kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/8187/
State New, archived
Headers show

Comments

Kang Kai - July 21, 2011, 8 a.m.
From: Kang Kai <kai.kang@windriver.com>

According to DISTRO_FEATURES then add screen pam support or not.
Press "Ctrl+a x" will lock the screen terminal, then unlock it will
use pam.
Add pam related configure file sceen.pamd from Fedora.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 .../screen/screen-4.0.3/screen.pamd                |    2 ++
 meta/recipes-extended/screen/screen_4.0.3.bb       |   14 ++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-extended/screen/screen-4.0.3/screen.pamd

Patch

diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen.pamd b/meta/recipes-extended/screen/screen-4.0.3/screen.pamd
new file mode 100644
index 0000000..ff657fa
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/screen.pamd
@@ -0,0 +1,2 @@ 
+#%PAM-1.0
+auth       include      common-auth
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index dac2893..c5bdf78 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -10,12 +10,14 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \
                     file://screen.h;endline=23;md5=9a7ae69a2aafed891bf7c38ddf9f6b7d"
 
 SECTION = "console/utils"
-DEPENDS = "ncurses"
-PR = "r0"
+DEPENDS = "ncurses \
+		${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+PR = "r1"
 
 SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \
            ${DEBIAN_MIRROR}/main/s/screen/screen_4.0.3-11+lenny1.diff.gz;name=patch \
-           file://configure.patch"
+           file://configure.patch \
+		   file://screen.pamd"
 
 SRC_URI[tarball.md5sum] = "8506fd205028a96c741e4037de6e3c42"
 SRC_URI[tarball.sha256sum] = "78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77"
@@ -25,5 +27,9 @@  SRC_URI[patch.sha256sum] = "19130d097e9ed897c84a2c640634dd36ee3233c17b0bf5d18549
 
 inherit autotools
 
-EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5"
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+                       ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
 
+do_install_append () {
+	install -D -m 644 ${WORKDIR}/screen.pamd ${D}/${sysconfdir}/pam.d/screen
+}