Page 1 of 1
etc-update: zusätzliche Verzeichnisse
Posted: Thu May 05, 2016 12:33 pm
by tazinblack
Hallo zusammen,
da ich KDE von Hand starte verwende ich eine angepasste polkit Konfiguration.
Leider zerlegt mir jedes Update meine Einstellungen und stellt alles auf den Standard zurück.
Gibt es eine Möglichkeit, dass ich die Konfig unter /usr/share/polkit-1/actions als Konfirurationsordner hinzufüge und damit Änderungen mit etc-update mergen kann?
Mir geht das langsam echt auf den Keks.
Posted: Thu May 05, 2016 2:01 pm
by mrsteven
man make.conf wrote:CONFIG_PROTECT = [space delimited list of files and/or directories]
All files and/or directories that are defined here will have "config file protection" enabled for
them. See the CONFIGURATION FILES section of emerge(1) for more information.
Das dürfte das sein, was du suchst, also in deinem Fall:
Code: Select all
#...
CONFIG_PROTECT="${CONFIG_PROTECT} /usr/share/polkit-1/actions"
Posted: Thu May 05, 2016 4:08 pm
by py-ro
Ganz richtig wäre die eigenen Änderungen dahin zu packen wo Sie hingehören:
Bye
Py
Posted: Thu May 05, 2016 5:37 pm
by tazinblack
Danke für die schnellen Antworten!
py-ro wrote:Ganz richtig wäre die eigenen Änderungen dahin zu packen wo Sie hingehören:
Bye
Py
Wie würde das dann aussehen?
Ich habe z.B. bei den actions sowas:
Code: Select all
<action id="org.freedesktop.udisks2.filesystem-mount">
<description>Mount a filesystem</description>
<description xml:lang="de">Ein Dateisystem einhängen</description>
<message>Authentication is required to mount the filesystem</message>
<message xml:lang="de">Legitimation ist zum Einhängen eines Dateisystems erforderlich</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
Damit ich z.B. was mounten kann, habe ich <allow_inactive></allow_inactive> gleich wie <allow_active></allow_active> gesetzt.
Wie würde das als Regel aussehen?
Etwa so:
Code: Select all
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount" &&
subject.user == "meinUser") {
return "yes";
}
});
Und wieso wird meine KDE Session als "inactive" erkannt. Hat das damit zu tun, dass ich keinen Loginmanager verwende?
Sind die rules dann auch automatisch config protected?
Posted: Thu May 05, 2016 9:18 pm
by Josef.95
tazinblack wrote:Sind die rules dann auch automatisch config protected?
Ja, per default ist /etc komplett geschützt (mit wenigen Ausnahmen).
Schau dazu zb via
Code: Select all
portageq envvar CONFIG_PROTECT CONFIG_PROTECT_MASK
(oder in der emerge --info)