<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 2011年05月22日 02:48, Wolfgang Denk wrote:
<blockquote cite="mid:20110521184855.1248D1499BF2@gemini.denx.de"
type="cite">
<pre wrap="">Dear Xiaofeng Yan,
In message <a class="moz-txt-link-rfc2396E" href="mailto:d448b57c57fec346230d40fadc08625bd8c83224.1305972143.git.xiaofeng.yan@windriver.com"><d448b57c57fec346230d40fadc08625bd8c83224.1305972143.git.xiaofeng.yan@windriver.com></a> you wrote:
</pre>
<blockquote type="cite">
<pre wrap="">From: Xiaofeng Yan <a class="moz-txt-link-rfc2396E" href="mailto:xiaofeng.yan@windriver.com"><xiaofeng.yan@windriver.com></a>
[YOCTO #1092]
Solve access permission for directory "/var/lib".
Makefile from package sudo change the ownership incorrectly.
Signed-off-by: Xiaofeng Yan <a class="moz-txt-link-rfc2396E" href="mailto:xiaofeng.yan@windriver.com"><xiaofeng.yan@windriver.com></a>
---
meta/recipes-extended/sudo/sudo.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 6a04a9c..5ea089c 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -30,4 +30,5 @@ pkg_postinst_${PN} () {
chmod 4111 /usr/bin/sudo
chmod 0440 /etc/sudoers
+ chmod 0755 /var/lib
</pre>
</blockquote>
<pre wrap="">
Sorry, but this commit message is misleading. You don't change the
ownership here, but the file permissions.
</pre>
</blockquote>
Hi Wolfgang Denk,<br>
Thanks for your reply. I am make lsb test to pass LSB certification.
LSB Test suite check /vat/lib, but failed with the following
information.<br>
<table class="problem_table">
<tbody>
<tr id="tr_core.journal.125" class="ptl_red" title="Click here!">
<td>/tset/LSB.fhs/var/lib/lib-tc <span style="color: rgb(0,
0, 128);">1</span></td>
<td class="fw1">failed</td>
<td class="fw2" id="td2_core.journal.125"><br>
</td>
</tr>
<tr>
<td colspan="3" class="pdu">
<div class="ptd_red" id="core.journal.125" style="">
<h4>Message from the test:</h4>
<pre style="overflow: auto;">Reference 5.8-1(A)
The /var/lib directory exists and is searchable
Unexpected output written to stdout, as shown below:
stdout:lsb_test_dir: expected be able to search directory /var/lib, got an error
stdout:ls: cannot open directory /var/lib: Permission denied
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<br>
<br>
emenlow$ls /var/lib -l<br>
drwx------ 10 root root 4096 May 20 19:21 lib<br>
<br>
For general machine, the ownership of this directory is as follow:<br>
ubuntu$ls /var/lib -l<br>
drwxr-xr-x 67 root root 4096 2010-12-15 23:30 lib<br>
<br>
In fact, many packages make a operation to directory "/var/lib". I
find the Makefile from package "sudo" change the ownership. Please
review the following patch.<br>
<br>
--- Makefile.orj 2011-05-21 16:32:35.392833427 +0800<br>
+++ Makefile 2011-05-21 16:36:47.979380106 +0800<br>
@@ -482,7 +482,7 @@<br>
$(DESTDIR)$(visudodir) $(DESTDIR)$(noexecdir) \<br>
$(DESTDIR)$(sudoersdir) $(DESTDIR)$(docdir) \<br>
$(DESTDIR)$(mandirsu) $(DESTDIR)$(mandirform)<br>
<font color="#ff0000">- $(SHELL) $(srcdir)/mkinstalldirs -m 0700
$(DESTDIR)$(timedir)</font><br>
+ $(SHELL) $(srcdir)/mkinstalldirs -m 0755 $(DESTDIR)$(timedir)<br>
<br>
install-binaries: install-dirs $(PROGS)<br>
$(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 04111
sudo<br>
$(DESTDIR)$(sudodir)/sudo<br>
<br>
So "0700" make this directory without access permission. Perhaps it
could not be right method, I think you have a better method to solve
this problem. If you have, Please share with me. <br>
Thanks for your suggestion again.<br>
<br>
Thanks<br>
Yan <br>
<blockquote cite="mid:20110521184855.1248D1499BF2@gemini.denx.de"
type="cite">
<pre wrap="">Best regards,
Wolfgang Denk
</pre>
</blockquote>
<br>
</body>
</html>