[Pkg-lxde-maintainers] Bug#894746: lxpolkit: Wrong exit code when login is cancelled
Michael Lange
klappnase at web.de
Tue Apr 3 20:03:17 UTC 2018
Package: lxpolkit
Version: 0.5.3-2
Severity: normal
Dear Maintainer,
when lxpolkit is used for root login and the user hits the "Cancel" button, it
exits with code 127.
According to the pkexec man page, the exit code in such a situation should
rather be 126.
The exit code 127 is used by the pkexec command if no polkit user-agent is
running and thus root-login is not possible (if called with the --disable-
internal-agent option). This could be used by an application to present the
user an informative error message, like "Login not possible, please make sure a
polkit user-agent is running".
However with lxpolkit using the same exit code when login is cancelled, there
is no way of telling if no user agent is there or the user just hit "Cancel",
which makes a similar error message seem at least a bit awkward.
I checked with other user-agents (all on Stretch); the mate- and gnome
counterparts actually exit with 126 if login is cancelled, as one might expect
from man pkexec. lxqt-policykit and polkit-kde-agent-1 seem to also use 127
however.
Still I believe this is a bug (admittedly a small one) and should be changed if
possible.
Best regards
Michael
-- System Information:
Debian Release: 9.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lxpolkit depends on:
ii libatk1.0-0 2.22.0-1
ii libc6 2.24-11+deb9u3
ii libcairo2 1.14.8-1
ii libfontconfig1 2.11.0-6.7+b1
ii libfreetype6 2.6.3-3.2
ii libgdk-pixbuf2.0-0 2.36.5-2+deb9u2
ii libglib2.0-0 2.50.3-2
ii libgtk2.0-0 2.24.31-2
ii libpango-1.0-0 1.40.5-1
ii libpangocairo-1.0-0 1.40.5-1
ii libpangoft2-1.0-0 1.40.5-1
ii libpolkit-agent-1-0 0.105-18
ii libpolkit-gobject-1-0 0.105-18
ii libunique-1.0-0 1.1.6-5
ii libx11-6 2:1.6.4-3
ii lxsession-data 0.5.3-2
ii policykit-1 0.105-18
lxpolkit recommends no packages.
lxpolkit suggests no packages.
-- no debconf information
More information about the Pkg-lxde-maintainers
mailing list