Files
Programming-Contests/files/lockdown/10-acpc-no-network-changes.rules
T
2026-10-15 20:44:05 -03:00

10 lines
416 B
Plaintext

// ACPC 2026: the teams may not change the network (Wi-Fi, phone hotspot,
// modem, VPN, ...). Only the administrators (sudo group) keep these actions.
polkit.addRule(function(action, subject) {
if ((action.id.indexOf("org.freedesktop.NetworkManager.") == 0 ||
action.id.indexOf("org.freedesktop.ModemManager1.") == 0) &&
!subject.isInGroup("sudo")) {
return polkit.Result.NO;
}
});