From 505ee4b0a7443c185b101aaa6460d3a566a91fce Mon Sep 17 00:00:00 2001 From: Xiaofeng Yan Date: Mon, 30 May 2011 19:27:45 +0800 Subject: sudo.inc: Add do_install_prepend () to sudo.inc Fix bug [YOCTO #1092] Own a directory "/var/lib" before do_install() because if there isn't this directory during installing, \ then script "mkinstalldirs" from "sudo package" will create directory "/var/lib/sudo" by recursion with mode "0700" \ which will cause bug [YOCTO #1092]. So I add do_install_prepend() to create a "/var/lib" which can be accessed \ by common user before installing files. (From OE-Core rev: 16bbeb2d866a07abd5379d1de30f2b747e1693fe) Signed-off-by: Xiaofeng Yan Signed-off-by: Richard Purdie --- meta/recipes-extended/sudo/sudo.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'meta/recipes-extended/sudo') diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc index 6a04a9c0b0..fd680574a3 100644 --- a/meta/recipes-extended/sudo/sudo.inc +++ b/meta/recipes-extended/sudo/sudo.inc @@ -23,6 +23,18 @@ do_configure_prepend () { fi } +# The script "mkinstalldirs" from package "sudo" will create directory +# "/var/lib/sudo" by recursion with mode "0700" during installing files. +# That is to say, "var", "var/lib" and "var/lib/sudo" will possess access authority +# with mode "0700". It cause that directory "var" and "var/lib" +# can't be accessed by common user. Creating directory "/var/lib" before +# installing files can resolve this problem. + +do_install_prepend (){ + mkdir -p ${D}/${localstatedir}/lib +} + + pkg_postinst_${PN} () { if [ "x$D" != "x" ]; then exit 1 -- cgit v1.2.3-54-g00ecf