testsuite: Add sysctl test for directory checks
Adds a test to try to write a sysctl parameter above /proc and passes if it gives an error message. References: commit f25d462166f80b844d33dad3e4c06088c809a426
This commit is contained in:
parent
2a7c909a1b
commit
4706f225c9
@ -27,3 +27,7 @@ if {[file exists ${hostname_file}]} {
|
|||||||
} else {
|
} else {
|
||||||
unsupported "sysctl write: hostname file doe not exist"
|
unsupported "sysctl write: hostname file doe not exist"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set test "sysctl write above /proc"
|
||||||
|
spawn $sysctl /../../../etc=1
|
||||||
|
expect_pass "$test" "sysctl: Path is not under /proc/sys/: /proc/sys//../../../etc"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user