A regra do Polkit pkla não está funcionando em 18.04

5

Eu tenho problemas com infames prompts de política colord no Gnome 3.28.1. Com o desktop XFCE no mesmo sistema, não tenho esse problema.

Eu trabalho via xrdp e sempre obtenho este prompt e não consigo desativá-lo.

Sempre que eu alterar a política <action id="org.freedesktop.color-manager.create-device"> em /usr/share/polkit-1/actions/org.freedesktop.color.policy para <allow_any>yes</allow_any> , recebo o erro fatal do Gnome nos registros.

Registros

ATUALIZADOS após o aviso do WinEunuuchs2Unix:

gsd-media-keys[1099]: Unable to inhibit keypresses: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
gsd-sharing[1059]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-user-share-webdav.service not loaded.
gsd-sharing[1059]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
gsd-sharing[1059]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
gsd-sharing[1059]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit vino-server.service not loaded.
gnome-session-binary[877]: Entering running state
dbus-daemon[867]: [session uid=1000 pid=867] Successfully activated service 'org.gnome.evolution.dataserver.Calendar7'
systemd[847]: Started Evolution calendar service.
dbus-daemon[867]: [session uid=1000 pid=867] Activating service name='ca.desrt.dconf' requested by ':1.56' (uid=1000 pid=1176 comm="/usr/lib/evolution/evolution-calendar-factory-subp" label="unconfined")
dbus-daemon[867]: [session uid=1000 pid=867] Activating via systemd: service name='org.gnome.evolution.dataserver.AddressBook9' unit='evolution-addressbook-factory.service' requested by ':1.56' (uid=1000 pid=1176 comm="/usr/lib/evolution/evolution-calendar-factory-subp" label="unconfined")
systemd[847]: Starting Evolution address book service...
dbus-daemon[867]: [session uid=1000 pid=867] Successfully activated service 'ca.desrt.dconf'
dbus-daemon[867]: [session uid=1000 pid=867] Successfully activated service 'org.gnome.evolution.dataserver.AddressBook9'
systemd[847]: Started Evolution address book service.
gnome-shell[922]: Error looking up permission: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionStore was not provided by any .service files
kerneloops-appl[1152]: Failed to load module "canberra-gtk-module"
gsd-color[1088]: failed to get edid: unable to get EDID for output
colord[1140]: failed to get seat for session c1 [pid 1088]: No data available
gnome-shell[922]: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
gsd-color[1088]: unable to get EDID for xrandr-rdp0: unable to get EDID for output
kernel: [  213.817502] do_trap: 20 callbacks suppressed
kernel: [  213.817504] traps: gsd-color[1088] trap divide error ip:5592b1f5c94a sp:7fffbcc03a90 error:0 in gsd-color[5592b1f53000+12000]
gnome-shell[922]: Could not get current seat: No data available
gnome-shell[922]: GNOME Shell started at Mon May 21 2018 12:06:54 GMT+0300 (EEST)
gnome-session[877]: gnome-session-binary[877]: WARNING: Application 'org.gnome.SettingsDaemon.Color.desktop' killed by signal 8
gnome-session-binary[877]: WARNING: Application 'org.gnome.SettingsDaemon.Color.desktop' killed by signal 8
gsd-color[1240]: failed to get edid: unable to get EDID for output
colord[1140]: failed to get seat for session c1 [pid 1240]: No data available
gsd-color[1240]: unable to get EDID for xrandr-rdp0: unable to get EDID for output
kernel: [  220.142162] traps: gsd-color[1240] trap divide error ip:55c79912d94a sp:7ffcbd6a6020 error:0 in gsd-color[55c799124000+12000]
gnome-session[877]: gnome-session-binary[877]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' respawning too quickly
gnome-session-binary[877]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' respawning too quickly
gnome-session-binary[877]: Unrecoverable failure in required component org.gnome.SettingsDaemon.Color.desktop
gnome-session[877]: gnome-session-binary[877]: CRITICAL: We failed, but the fail whale is dead. Sorry....
gnome-session-binary[877]: CRITICAL: We failed, but the fail whale is dead. Sorry....
xrdp-sesman[846]: (846)(140561311482944)[CORE ] window manager (pid 859) did exit, cleaning up session
xrdp-sesman[846]: (846)(140561311482944)[INFO ] calling auth_stop_session and auth_end from pid 846
xrdp-sesman[846]: (846)(140561311482944)[DEBUG] cleanup_sockets:
xrdp-sesman[846]: (846)(140561311482944)[DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_out_socket_10
xrdp-sesman[846]: (846)(140561311482944)[DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_in_socket_10
xrdp-sesman[846]: (846)(140561311482944)[DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdpapi_10
xrdp-sesman[621]: (621)(140561311482944)[INFO ] ++ terminated session:  username xoob, display :10.0, session_pid 846, ip 192.168.1.100:7137 - socket: 12
xrdp[844]: (844)(140711347752192)[DEBUG] Closed socket 26 (AF_UNIX)
at-spi-bus-launcher[884]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":10.0"
at-spi-bus-launcher[884]:       after 23 requests (23 known processed) with 0 events remaining.
kernel: [  221.144168] gnome-shell[922]: segfault at 10 ip 00007fd88cb3712f sp 00007fff690fcac0 error 4 in libmutter-2.so.0.0.0[7fd88ca73000+156000]
gsd-power[1051]: gsd-power: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
gsd-xsettings[1069]: gsd-xsettings: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
gsd-wacom[1075]: gsd-wacom: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
gsd-clipboard[1084]: gsd-clipboard: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
gsd-media-keys[1099]: gsd-media-keys: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
gsd-keyboard[1093]: gsd-keyboard: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
kerneloops-applet.desktop[1152]: kerneloops-applet: Fatal IO error 11 (Resource temporarily unavailable) on X server :10.0.
conky.desktop[1150]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":10.0"
conky.desktop[1150]:       after 578 requests (578 known processed) with 0 events remaining.
xrdp[844]: (844)(140711347752192)[DEBUG] Closed socket 12 (AF_INET 192.168.1.201:7777)
xrdp[844]: (844)(140711347752192)[DEBUG] xrdp_mm_module_cleanup
xrdp[844]: (844)(140711347752192)[DEBUG] Closed socket 25 (AF_UNIX)

O mesmo acontece se eu simplesmente tentar entrar de forma interativa com o prompt de senha.

Eu tentei criar um arquivo pkla personalizado em /var/lib/polkit-1/localauthority/50-local.d :

<action id="org.freedesktop.color-manager.create-device">
  <description xml:lang="en">Create a color managed device</description>
  <message xml:lang="en">Authentication is required to create a color managed device</message>
  <defaults>
    <allow_any>yes</allow_inactive>
    <allow_inactive>yes</allow_inactive>
    <allow_active>yes</allow_active>
  </defaults>
</action>

Parece-me que o equivalente a mudar diretamente as ações é /usr/share/polkit-1/actions .

Eu também tentei criar uma regra global de permissão pkla de acordo com esta proposta :

[No password prompt]
Identity=unix-group:sudo
Action=*
ResultActive=yes

Eu também tenho uma regra global em /etc/polkit-1/rules.d

polkit.addRule(function(action, subject) {
if (subject.isInGroup("group")) {
      return polkit.Result.YES;
   }
});

Como consegui, se eu tiver o polkit < 0.106, as regras não são processadas e deve-se usar arquivos pkla. Corrija-me se eu estiver errado. Meu pkaction --version mostra 0.105 .

Nenhum dos itens acima funcionou. Quais etapas devo tentar e como depurar isso?

    
por Suncatcher 06.05.2018 / 11:36

2 respostas

0

O problema estava relacionado à passagem incorreta da entrada de gama de entrada única em vez de uma rampa de gama de entrada de 256. O bug foi corrigido na versão 0.2.6 do xorgxrdp.

    
por Suncatcher 01.06.2018 / 12:43
0

Em Stack Exchange que encontrei esta correção de bug que pode ser útil.

Mais especificamente, você precisa colocar um arquivo .rules em

/etc/polkit-1/rules.d/

(Selecione um nome de arquivo e dê a extensão .rules )

e dê as regras:

polkit.addRule(function(action, subject) {
   if ((action.id == "org.freedesktop.color-manager.create-device" ||
        action.id == "org.freedesktop.color-manager.create-profile" ||
        action.id == "org.freedesktop.color-manager.delete-device" ||
        action.id == "org.freedesktop.color-manager.delete-profile" ||
        action.id == "org.freedesktop.color-manager.modify-device" ||
        action.id == "org.freedesktop.color-manager.modify-profile") &&
       subject.isInGroup("ATTENTION")) {
      return polkit.Result.YES;
   }
});

Então você tem que substituir a palavra "ATENÇÃO" pelo grupo do usuário.

Volte ao link para mais informações e links adicionais para seguir.

postagem original abaixo

Seus registros do sistema estão mostrando erros no gnome-keyring. Resolver esses erros é provavelmente a chave para os problemas do kit de políticas, com base neste Q & A: Problema de login no gnome-keyring que faz referência a kits de políticas.

Pesquisando sua mensagem de erro específica:

couldn't access control socket: /run/user/1000/keyring/control: No such file or directory 

Retorna muitos resultados:

Entre esses três links, você deve encontrar informações suficientes para corrigir o erro do gnome-keyring. Este, por sua vez, deve ser o precursor para corrigir os problemas do kit de políticas.

    
por WinEunuuchs2Unix 20.05.2018 / 21:58