forked from konstruktoid/hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystemdconf.bats
43 lines (34 loc) · 1.07 KB
/
systemdconf.bats
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
#!/usr/bin/env bats
load test_helper
@test "Verify DumpCore in $SYSTEMCONF" {
run bash -c "grep '^DumpCore=no$' $SYSTEMCONF"
[ "$status" -eq 0 ]
}
@test "Verify CrashShell in $SYSTEMCONF" {
run bash -c "grep '^CrashShell=no$' $SYSTEMCONF"
[ "$status" -eq 0 ]
}
@test "Verify system DefaultLimitCORE in $SYSTEMCONF" {
run bash -c "grep '^DefaultLimitCORE=0$' $SYSTEMCONF"
[ "$status" -eq 0 ]
}
@test "Verify system DefaultLimitNOFILE in $SYSTEMCONF" {
run bash -c "grep '^DefaultLimitNOFILE=1024$' $SYSTEMCONF"
[ "$status" -eq 0 ]
}
@test "Verify system DefaultLimitNPROC in $SYSTEMCONF" {
run bash -c "grep '^DefaultLimitNPROC=1024$' $SYSTEMCONF"
[ "$status" -eq 0 ]
}
@test "Verify user DefaultLimitCORE in $USERCONF" {
run bash -c "grep '^DefaultLimitCORE=0$' $USERCONF"
[ "$status" -eq 0 ]
}
@test "Verify user DefaultLimitNOFILE in $USERCONF" {
run bash -c "grep '^DefaultLimitNOFILE=1024$' $USERCONF"
[ "$status" -eq 0 ]
}
@test "Verify user DefaultLimitNPROC in $USERCONF" {
run bash -c "grep '^DefaultLimitNPROC=1024$' $USERCONF"
[ "$status" -eq 0 ]
}