/
0104-munged-security-pidfile.t
executable file
·51 lines (44 loc) · 1.27 KB
/
0104-munged-security-pidfile.t
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
#!/bin/sh
test_description='Check munged security of pidfile'
. "$(dirname "$0")/sharness.sh"
# Setup the environment for checking the pidfile.
##
test_expect_success 'setup' '
munged_setup_env &&
munged_create_key
'
##
# FIXME
# munged.c:write_pidfile
# Is an absolute path required?
##
# pidfile with absolute path
# pidfile with relative path failure
# pidfile dir owned by root
# pidfile dir owned by euid
# pidfile dir owned by other failure
# pidfile dir owned by other override
# pidfile dir writable by trusted group
# pidfile dir writable by untrusted group failure
# pidfile dir writable by group failure
# pidfile dir writable by group override
# pidfile dir writable by group with sticky bit
# pidfile dir writable by other failure
# pidfile dir writable by other override
# pidfile dir writable by other with sticky bit
# pidfile removal of previous file
# pidfile contains munged pid (grep pid from logfile)
# pidfile failure to open
# pidfile failure to write
# pidfile 0644 perms (without trusted group) (test w/ 0 umask)
# pidfile 0664 perms with trusted group (test w/ 0 umask)
##
test_expect_failure 'finish writing tests' '
false
'
# Clean up after a munged process that may not have terminated.
##
test_expect_success 'cleanup' '
munged_cleanup
'
test_done