[yast-devel] policy-editor module help
I'm currently working on the policy-editor module for YaST (to edit PolicyKit configuration), and I want some input on some of the design decisions: 1. I'm using python code for the loading and parsing of the policy description files (its XML, and DOM makes parsing XML a dream). The policy description files describes the actions, provides a (translateable) description, and sane defaults. That part I'm fine with, since I can use YCP to interact with and load the model from the python code. 2. The actual policies as defined by the system administrator is located in /etc/PolicyKit/PolicyKit.conf Now my question is, how should I go about generating this file? Should we use this file directly, or use sysconfig to generate the file dynamically, and potentially provide for a "local include" so that you can include custom policies not set via YaST? -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hi Justin! Dne Friday 12 of October 2007 19:35:24 Justin Haygood napsal(a):
I'm currently working on the policy-editor module for YaST (to edit PolicyKit configuration), and I want some input on some of the design decisions:
1. I'm using python code for the loading and parsing of the policy description files (its XML, and DOM makes parsing XML a dream). The policy description files describes the actions, provides a (translateable) description, and sane defaults.
That part I'm fine with, since I can use YCP to interact with and load the model from the python code.
2. The actual policies as defined by the system administrator is located in /etc/PolicyKit/PolicyKit.conf
Now my question is, how should I go about generating this file? Should we use this file directly, or use sysconfig to generate the file dynamically, and potentially provide for a "local include" so that you can include custom policies not set via YaST?
I don't think that generating this file from any other file (eg. sysconfig) is a good idea. If there is no strong reason (eg the file is hard to parse), it is always better to read and write it directly, especially because of users who edit it manually. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Fri, Oct 12, 2007 at 01:35:24PM -0400, Justin Haygood wrote:
2. The actual policies as defined by the system administrator is located in /etc/PolicyKit/PolicyKit.conf
Now my question is, how should I go about generating this file? Should we use this file directly, or use sysconfig to generate the file dynamically, and potentially provide for a "local include" so that you can include custom policies not set via YaST?
Well, this is a general question for any package - should we use sysconfig? http://en.opensuse.org/SUSE_Package_Conventions/Sysconfig says: "/etc/sysconfig/ is the central place for system configuration files for SUSE Linux. Generally, it includes setting that should be configurable but cannot be modified by native config files below /etc. It does not supply the native config files or duplicate information from such files." So I think that we should stick with the native config file. If it turns out to be too complex, then yes, I would separate it to a yast-managed part, which can have additional restrictions to make it manageable, and a human-jungle part, where the admin can exploit the full potential of the tool. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Jiri Srain
-
Justin Haygood
-
Martin Vidner