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:
Craig Small 2021-07-20 22:45:17 +10:00
parent f25d462166
commit db4455cfc9

View File

@ -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"