2014-04-07 11:28:27 +02: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 1/2] 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(-)
|
|
|
|
|
2017-09-25 11:02:36 +02:00
|
|
|
Index: acl-2.2.52/test/root/permissions.test
|
|
|
|
===================================================================
|
|
|
|
--- acl-2.2.52.orig/test/root/permissions.test
|
|
|
|
+++ acl-2.2.52/test/root/permissions.test
|
|
|
|
@@ -19,7 +19,7 @@ defined permissions.
|
2014-04-07 11:28:27 +02:00
|
|
|
$ 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
|
|
|
|
|
|
|
|
|
2017-09-25 11:02:36 +02:00
|
|
|
@@ -39,7 +39,7 @@ Now, change the ownership of the file to
|
2014-04-07 11:28:27 +02:00
|
|
|
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
|
2017-09-25 11:02:36 +02:00
|
|
|
@@ -256,12 +256,12 @@ directories if the file has an ACL and o
|
2014-04-07 11:28:27 +02:00
|
|
|
$ 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'.)
|
|
|
|
|
2017-09-25 11:02:36 +02:00
|
|
|
Index: acl-2.2.52/test/root/restore.test
|
|
|
|
===================================================================
|
|
|
|
--- acl-2.2.52.orig/test/root/restore.test
|
|
|
|
+++ acl-2.2.52/test/root/restore.test
|
|
|
|
@@ -21,7 +21,7 @@ Cry immediately if we are not running as
|
2014-04-07 11:28:27 +02:00
|
|
|
$ 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
|
2017-09-25 11:02:36 +02:00
|
|
|
Index: acl-2.2.52/test/root/setfacl.test
|
|
|
|
===================================================================
|
|
|
|
--- acl-2.2.52.orig/test/root/setfacl.test
|
|
|
|
+++ acl-2.2.52/test/root/setfacl.test
|
|
|
|
@@ -12,7 +12,7 @@ Cry immediately if we are not running as
|
2014-04-07 11:28:27 +02:00
|
|
|
$ 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
|
2017-09-25 11:02:36 +02:00
|
|
|
Index: acl-2.2.52/test/run
|
|
|
|
===================================================================
|
|
|
|
--- acl-2.2.52.orig/test/run
|
|
|
|
+++ acl-2.2.52/test/run
|
|
|
|
@@ -92,7 +92,7 @@ for (;;) {
|
|
|
|
if (defined $line) {
|
|
|
|
# Substitute %VAR and %{VAR} with environment variables.
|
|
|
|
$line =~ s[%(\w+)][$ENV{$1}]eg;
|
|
|
|
- $line =~ s[%{(\w+)}][$ENV{$1}]eg;
|
|
|
|
+ $line =~ s[%\{(\w+)}][$ENV{$1}]eg;
|
|
|
|
}
|
|
|
|
if (defined $line) {
|
|
|
|
if ($line =~ s/^\s*< ?//) {
|