Writable mandatory key



Hello,

I'm currently developping an applet for gnome and I wanted to have some settings that only root could change.

In my rpm install spec a wrote :

export GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.mandatory"
/usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/nta-mandatory.schemas > /dev/null

The schema file is the following :
<gconfschemafile>
<schemalist>
<schema>
<key>
/schemas/apps/network_toolbox/allow_firewall_change
</key>
<applyto>/apps/network_toolbox/allow_firewall_change</applyto>
<owner>nta</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short/>
<long/>
</locale>
</schema>
</schemalist>
</gconfschemafile>

After I installed my package I obtained the following %gconf.xml file in the /etc/gconf/gconf.xml.mandatory/apps/network-toolbox directory :

<gconf>
<entry name="allow_firewall_change" mtime="1259747546" schema="/schemas/apps/network_toolbox/allow_firewall_change" type="bool" value="false">
        </entry>
</gconf>

When I checked for bugs, I tried to modify the key using the gconf-editor (when logged as a user). The selection of the key in the editor prints that it is a read only key but when I try and modify the key, it works and then the key is no longer in a read-only mode.
Then I tried to check the key when being root, the key was unchanged and marked read only but when trying to change the key it was no longer in read only mode.
So I looked again at the user version of the gconf-editor and the key was still modified.

I thought that being a mandatory key made it readonly for the user and that any change of the key as a user did not work (still it work for my applet...).

I would like to know if this is a normal behavior, if I did something wrong or if there is a known problem with the gconf-editor program?

Thank you for your help,
--
Lise FAVRE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]