When opening draksec the window does not show the current setting - all the dropdown menu are blank. Moreover, changing the settings in any field does not affect anything; the files under /usr/share/polkit-1/actions are never modified (and they should be) Theme name: oxygen-gtk RPM: drakxtools-15.68-1.mga4 Kernel version = 3.12.0-desktop-0.rc5.1.mga4 Distribution=Mageia release 4 (Cauldron) for x86_64 CPU=Intel(R) Core(TM) i3 CPU M 350 @ 2.27GHz
Hardware: x86_64 => AllAssignee: bugsquad => mageia
Implementation notes: draksec will ship a new file: /usr/share/polkit-1/rules.d/org.mageia.draksec.rules containing: polkit.addRule(function(action, subject) { if (typeof draksecAuth != "function" || action.id.indexOf("org.mageia.") != 0) return polkit.Result.NOT_HANDLED; var tool = action.id.split(".")[2]; var rv = draksecAuth(tool); if (rv != polkit.Result.NOT_HANDLED) polkit.log("draksec security policy for '" + tool + "' is overriden to '" + rv + "'"); return rv; }); The GUI will then change to read/write a file called /etc/polkit-1/rules.d/51-mageia-draksec.rules. This file will contain e.g.: var draksecAuth = function(tool) { switch (tool) { case 'drakconf': return polkit.Result.YES; case 'drakrpm': return polkit.Result.AUTH_SELF_KEEP; } return polkit.Result.NOT_HANDLED; }; essentially for each tool that is overridden from the default, it will contain a case+return pair. This should be fairly easy to parse using regex in perl. If the file does not exist, then default policy is applied. The only tricky bit in the UI would be knowing what "default" means, (as it would require parsing all the action policy files) but this could be left out. Ultimately the tool will likely become a lot simpler. If someone wants to play at learning perl etc. then this is quite a simple task to implement.
Keywords: (none) => Junior_jobCC: (none) => thierry.vignaud
CC: (none) => olav
CC: (none) => vince.7145
This should now be implemented in git, namely this commit: http://gitweb.mageia.org/software/drakx/commit/?id=3b641cb27c28bdf42865ee15f7ccd2b6c9e9d3d1 (although there were a few other small tidyups).
Completed as per above comment.
Status: NEW => RESOLVEDResolution: (none) => FIXED