Patchwork [1/1] Fix libpam's chmod

login
register
mail settings
Submitter Robert Yang
Date March 2, 2012, 7:02 a.m.
Message ID <faf86eef0c803de04cb1a23041cce959a34ecee5.1330670625.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/22567/
State New
Headers show

Comments

Robert Yang - March 2, 2012, 7:02 a.m.
The libpam's has an error when generating the rootfs:

chmod: cannot access `/usr/sbin/unix_chkpwd': No such file or directory

This is because the following code in libpam_1.1.5.bb:

pkg_postinst_pam-plugin-unix () {
    # below is necessary to allow unix_chkpwd get user info from shadow file
    # on lsb images
    chmod 4755 ${sbindir}/unix_chkpwd
}

This is to set the setuid permission for unix_chkpwd (the lsb test
requires this), but it lacks a "${D}", and we can do this in the install
stage.

[YOCTO #2049]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-extended/pam/libpam_1.1.5.bb |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
Koen Kooi - March 2, 2012, 8:42 a.m.
Op 2 mrt. 2012, om 08:02 heeft Robert Yang het volgende geschreven:

> The libpam's has an error when generating the rootfs:
> 
> chmod: cannot access `/usr/sbin/unix_chkpwd': No such file or directory
> 
> This is because the following code in libpam_1.1.5.bb:
> 
> pkg_postinst_pam-plugin-unix () {
>    # below is necessary to allow unix_chkpwd get user info from shadow file
>    # on lsb images
>    chmod 4755 ${sbindir}/unix_chkpwd
> }
> 
> This is to set the setuid permission for unix_chkpwd (the lsb test
> requires this), but it lacks a "${D}", and we can do this in the install
> stage.
> 
> [YOCTO #2049]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/recipes-extended/pam/libpam_1.1.5.bb |    7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-extended/pam/libpam_1.1.5.bb b/meta/recipes-extended/pam/libpam_1.1.5.bb
> index 283f477..8cddca9 100644
> --- a/meta/recipes-extended/pam/libpam_1.1.5.bb
> +++ b/meta/recipes-extended/pam/libpam_1.1.5.bb
> @@ -85,10 +85,7 @@ do_install() {
> 
> 	install -d ${D}${sysconfdir}/pam.d/     
> 	install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
> -}
> 
> -pkg_postinst_pam-plugin-unix () {
> -    # below is necessary to allow unix_chkpwd get user info from shadow file
> -    # on lsb images
> -    chmod 4755 ${sbindir}/unix_chkpwd
> +    # The lsb requires unix_chkpwd has setuid permission
> +    chmod 4755 ${D}${sbindir}/unix_chkpwd

MIssing PR bump

regards,

Koen

Patch

diff --git a/meta/recipes-extended/pam/libpam_1.1.5.bb b/meta/recipes-extended/pam/libpam_1.1.5.bb
index 283f477..8cddca9 100644
--- a/meta/recipes-extended/pam/libpam_1.1.5.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.5.bb
@@ -85,10 +85,7 @@  do_install() {
 
 	install -d ${D}${sysconfdir}/pam.d/     
 	install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
-}
 
-pkg_postinst_pam-plugin-unix () {
-    # below is necessary to allow unix_chkpwd get user info from shadow file
-    # on lsb images
-    chmod 4755 ${sbindir}/unix_chkpwd
+    # The lsb requires unix_chkpwd has setuid permission
+    chmod 4755 ${D}${sbindir}/unix_chkpwd
 }