2013-05-20 11:52:12 +00:00
|
|
|
From cfd9ba83811189d9e12c86d32b06b5fd15b5f358 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
|
Date: Mon, 20 May 2013 13:49:34 +0200
|
|
|
|
Subject: [PATCH] make the tests ready for SELinux
|
|
|
|
|
|
|
|
---
|
|
|
|
test/root/permissions.test | 8 ++++----
|
|
|
|
test/root/restore.test | 2 +-
|
|
|
|
test/root/setfacl.test | 2 +-
|
|
|
|
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
|
2010-03-10 14:10:14 +00:00
|
|
|
diff --git a/test/root/permissions.test b/test/root/permissions.test
|
|
|
|
index afaf5f0..4880bd2 100644
|
|
|
|
--- a/test/root/permissions.test
|
|
|
|
+++ b/test/root/permissions.test
|
|
|
|
@@ -20,7 +20,7 @@ defined permissions.
|
|
|
|
$ cd d
|
|
|
|
$ umask 027
|
|
|
|
$ touch f
|
|
|
|
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
|
|
|
|
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
|
|
|
|
> -rw-r----- root root
|
|
|
|
|
|
|
|
|
|
|
|
@@ -40,7 +40,7 @@ Now, change the ownership of the file to bin:bin and verify that this
|
|
|
|
gives user bin write access.
|
|
|
|
|
|
|
|
$ chown bin:bin f
|
|
|
|
- $ ls -l f | awk -- '{ print $1, $3, $4 }'
|
|
|
|
+ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
|
|
|
|
> -rw-r----- bin bin
|
|
|
|
$ su bin
|
|
|
|
$ echo bin >> f
|
|
|
|
@@ -257,12 +257,12 @@ directories if the file has an ACL and only CAP_FOWNER would grant them.
|
|
|
|
$ mkdir -m 600 x
|
|
|
|
$ chown daemon:daemon x
|
|
|
|
$ echo j > x/j
|
|
|
|
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
|
|
|
|
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
|
|
|
|
> -rw-r----- root root
|
|
|
|
|
|
|
|
$ setfacl -m u:daemon:r x
|
|
|
|
|
|
|
|
- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
|
|
|
|
+ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/---\\./---/'
|
|
|
|
> -rw-r----- root root
|
|
|
|
(With the bug this gives: `ls: x/j: Permission denied'.)
|
|
|
|
|
|
|
|
diff --git a/test/root/restore.test b/test/root/restore.test
|
|
|
|
index 6003cd4..5dbf73c 100644
|
|
|
|
--- a/test/root/restore.test
|
|
|
|
+++ b/test/root/restore.test
|
|
|
|
@@ -17,7 +17,7 @@ Ensure setuid bit is restored when the owner changes
|
|
|
|
$ chown bin passwd
|
|
|
|
$ chmod u+s passwd
|
|
|
|
$ setfacl --restore passwd.acl
|
|
|
|
- $ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
|
|
|
|
+ $ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\. root/ root/'
|
|
|
|
> -rwsr-xr-x root root
|
|
|
|
|
|
|
|
$ rm passwd passwd.acl
|
|
|
|
diff --git a/test/root/setfacl.test b/test/root/setfacl.test
|
|
|
|
index 630e9fb..dd7fe08 100644
|
|
|
|
--- a/test/root/setfacl.test
|
|
|
|
+++ b/test/root/setfacl.test
|
|
|
|
@@ -8,7 +8,7 @@ Setfacl utility tests. Run these tests on a filesystem with ACL support.
|
|
|
|
$ sg bin
|
|
|
|
$ umask 027
|
|
|
|
$ touch g
|
|
|
|
- $ ls -dl g | awk '{print $1}'
|
|
|
|
+ $ ls -dl g | awk '{print $1}' | sed 's/\\.$//'
|
|
|
|
> -rw-r-----
|
|
|
|
|
|
|
|
$ setfacl -m m:- g
|
2013-05-20 11:52:12 +00:00
|
|
|
--
|
|
|
|
1.7.1
|
|
|
|
|