1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
diff -Nur a/Makefile b/Makefile
--- a/Makefile 2012-10-04 09:59:14.000000000 +0200
+++ b/Makefile 2012-12-19 23:31:28.269943187 +0100
@@ -116,7 +116,7 @@
.PHONY : test
test: $(TARGET)
- (cd test; ./test)
+ (cd test; ./test $(WITH_ACL))
install:
[ -d $(PREFIX)$(BINDIR) ] || mkdir -p $(PREFIX)$(BINDIR)
diff -Nur a/test/test b/test/test
--- a/test/test 2012-10-04 09:59:14.000000000 +0200
+++ b/test/test 2012-12-19 23:46:19.449938180 +0100
@@ -4,6 +4,14 @@
M="-m ./mailer"
S=-"s state"
RLR="$LOGROTATE $M $S"
+TEST_ACL="$1"
+
+# Check if setfacl command works
+ACL_TEST_FILE="test-`date +%Y-%m-%d-%H-%M-%S`"
+touch ${ACL_TEST_FILE}
+setfacl -m u:nobody:rwx ${ACL_TEST_FILE} > /dev/null 2>&1
+ACL_OK="$?"
+rm ${ACL_TEST_FILE}
cleanup() {
rm -f test*.log* anothertest*.log* state test-config. scriptout mail-out compress-args
@@ -686,6 +694,8 @@
test.log.1 0 zero
EOF
+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then
+
cleanup 32
# ------------------------------- Test 32 ------------------------------------
@@ -713,6 +723,13 @@
test.log.1 0 zero
EOF
+else
+ echo "Skipping test 32"
+
+fi
+
+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then
+
cleanup 33
# ------------------------------- Test 33 ------------------------------------
@@ -740,6 +757,11 @@
test.log.1 0 zero
EOF
+else
+ echo "Skipping test 33"
+
+fi
+
cleanup 34
# ------------------------------- Test 34 ------------------------------------
@@ -759,6 +781,8 @@
test.log 0 zero
EOF
+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then
+
cleanup 35
# ------------------------------- Test 35 ------------------------------------
@@ -786,4 +810,9 @@
test.log.1 0 zero
EOF
+else
+ echo "Skipping test 35"
+
+fi
+
cleanup
|