3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 13:59:47 +01:00

compiler_vm: add polkit rule to require admin password for all actions

This commit is contained in:
Pragmatic Software 2022-01-29 17:29:55 -08:00
parent 4d0e06e111
commit 575d82dd0e
2 changed files with 9 additions and 0 deletions

View File

@ -1,8 +1,12 @@
cp guest/bin/* /usr/local/bin cp guest/bin/* /usr/local/bin
mkdir /usr/local/share/pbot-vm/ mkdir /usr/local/share/pbot-vm/
cp -r guest/lib/Languages/ /usr/local/share/pbot-vm/ cp -r guest/lib/Languages/ /usr/local/share/pbot-vm/
cp guest/include/prelude.h /usr/include cp guest/include/prelude.h /usr/include
cp guest/polkit/* /etc/polkit-1/rules.d/
echo unset DEBUGINFOD_URLS >> /root/.bashrc echo unset DEBUGINFOD_URLS >> /root/.bashrc
echo export ASAN_OPTIONS=detect_leaks=0 >> /root/.bashrc echo export ASAN_OPTIONS=detect_leaks=0 >> /root/.bashrc

View File

@ -0,0 +1,5 @@
// require admin login for all polkit actions
// e.g. NetworkManager, shutdown, reboot, etc now require root password
polkit.addRule(function(action, subject) {
return polkit.Result.AUTH_ADMIN;
});