1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00
Files
poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
Peter Seebach 070ea45b6c acl.inc, run-ptest: improve ptest functionality on limited rootfs
ACL's ptest has a handful of failure modes which can be triggered by
a restrictive or small system. First, the ptest requires that daemon
be in the bin group, which run-ptest attempts to do using gpasswd,
but gpasswd is part of shadow, and oe-core removes shadow when it
doesn't think shadow will be needed. Even if, say, a package has
RDEPENDS on it. Whoops. So we manually sed the group file. This
will probably work.

Second, the filesystem used for the test has to support ACLs,
so we create a dummy ext3 filesystem and use that.

Third, the root/permissions test relies on the assumption that
"mkdir d" produces a directory which non-root users can access,
but in a secure product which defaults to umask 077, this doesn't
work. (That fix has been separately reported to upstream acl
through their bug report form.)

(This may prevent the test from running without mkfs.ext3, but it
allows the test to run on targets where root doesn't have ACL
support. Tradeoffs, tradeoffs everywhere.)

(From OE-Core rev: 0f1054e7db74bb4a196e00773915d7997b55bdf2)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:55 +01:00

25 lines
827 B
Diff

commit c45bae84817a70fef6c2b661a07a492a0d23ae85
Author: Peter Seebach <peter.seebach@windriver.com>
Date: Wed May 11 15:16:06 2016 -0500
Fix permissions on temporary directory
The temporary directory's permissions have to allow other users to
view the directory. A default umask of 022 is common, but not mandatory,
and secure systems may have more restrictive defaults.
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
diff --git a/test/root/permissions.test b/test/root/permissions.test
index 42615f5..098b52a 100644
--- a/test/root/permissions.test
+++ b/test/root/permissions.test
@@ -16,6 +16,7 @@ Cry immediately if we are not running as root.
First, set up a temporary directory and create a regular file with
defined permissions.
+ $ umask 022
$ mkdir d
$ cd d
$ umask 027