testsuite: Add test for previous sysctl change
Add a check for path traversal to sysctl.
References:
commit f25d462166
Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
parent
f25d462166
commit
db4455cfc9
@ -23,3 +23,7 @@ expect_pass "$test" "${hostname}"
|
|||||||
set test "sysctl reading a variable suppress value"
|
set test "sysctl reading a variable suppress value"
|
||||||
spawn $sysctl -N kernel.hostname
|
spawn $sysctl -N kernel.hostname
|
||||||
expect_pass "$test" "kernel.hostname"
|
expect_pass "$test" "kernel.hostname"
|
||||||
|
|
||||||
|
set test "sysctl reading using a path traversal"
|
||||||
|
spawn $sysctl /../../etc/passwd
|
||||||
|
expect_pass "$test" "sysctl: Path is not under /proc/sys/: /proc/sys//../../etc/passwd"
|
||||||
|
Loading…
Reference in New Issue
Block a user