nuageinit: fix shell injection in power_state_change delay and add test
This commit is contained in:
@@ -748,7 +748,7 @@ local function power_state_change(obj)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Build shutdown command
|
-- Build shutdown command
|
||||||
local cmd = "shutdown -" .. flag .. " " .. delay
|
local cmd = "shutdown -" .. flag .. " " .. nuage.shell_escape(delay)
|
||||||
if message then
|
if message then
|
||||||
cmd = cmd .. " " .. nuage.shell_escape(message)
|
cmd = cmd .. " " .. nuage.shell_escape(message)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1332,7 +1332,7 @@ power_state:
|
|||||||
timeout: 30
|
timeout: 30
|
||||||
condition: true
|
condition: true
|
||||||
EOF
|
EOF
|
||||||
atf_check -o inline:"shutdown -r +5 'Rebooting after configuration is complete'\n" \
|
atf_check -o inline:"shutdown -r '+5' 'Rebooting after configuration is complete'\n" \
|
||||||
/usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
|
/usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user