]> code.ossystems Code Review - openembedded-core.git/commitdiff
sudo.inc: Add do_install_prepend () to sudo.inc
authorXiaofeng Yan <xiaofeng.yan@windriver.com>
Mon, 30 May 2011 11:27:45 +0000 (19:27 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 1 Jun 2011 17:32:29 +0000 (18:32 +0100)
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.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
meta/recipes-extended/sudo/sudo.inc

index 6a04a9c0b09bc3854da0fa26a1a9851daee58ede..fd680574a3d9fa3e49e14033057fb4ed1fc65cc7 100644 (file)
@@ -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