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