diff options
Diffstat (limited to 'test/data/etc/polkit-1/rules.d/10-testing.rules')
-rw-r--r-- | test/data/etc/polkit-1/rules.d/10-testing.rules | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/data/etc/polkit-1/rules.d/10-testing.rules b/test/data/etc/polkit-1/rules.d/10-testing.rules index 4a35e48..1dba38a 100644 --- a/test/data/etc/polkit-1/rules.d/10-testing.rules +++ b/test/data/etc/polkit-1/rules.d/10-testing.rules @@ -134,3 +134,19 @@ polkit.addRule(function(action, subject, details) { } } }); + +polkit.addRule(function(action, subject, details) { + if (action == "net.company.run_away_script") { + try { + // The following code will never terminate so the runaway + // script killer will step in after 15 seconds and throw + // an exception... + while (true) + ; + } catch (error) { + if (error == "Terminating runaway script") + return "yes" + return "no"; + } + } +}); |