aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2011-05-30 19:27:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-01 18:32:29 +0100
commit16bbeb2d866a07abd5379d1de30f2b747e1693fe (patch)
treefef78ddc1750735f78d7534f215a787ac9791ed1 /meta/recipes-extended
parent00c3c065aebe688abf5dbc3cda43840ff002a9e0 (diff)
downloadopenembedded-core-16bbeb2d866a07abd5379d1de30f2b747e1693fe.tar.gz
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. Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/sudo/sudo.inc12
1 files changed, 12 insertions, 0 deletions
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