debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #04018
[Bug 1926014] Re: simple-scan is trying to start disabled avahi-daemon.service
Just to clarify... Steps to reproduce and diagnose the problem:
1. libsane-hpaio installed
2. avahi-daemon uninstalled or disabled
3. Then, run:
export SANE_DEBUG_DLL=255
scanimage -L
The SANE debug output stops after the following lines:
[09:55:30.981866] [dll] init: initializing backend `hpaio'
[09:55:30.982461] [dll] init: backend `hpaio' is version 1.0.0
At this point, polkit displays a window asking the user to enter a
password, stating: "Authentication is required to manage system services
or other units." This happens because hpaio is trying to activate the
avahi-daemon service.
If the pop-up window is cancelled, the process continues, and no other
backend in the system causes further issues. The only error will be the
failure to activate the service, as we can check:
# journalctl -b -t scanimage
Jul 15 09:56:26 PC29552 scanimage[11391]: protocol/discovery/avahiDiscovery.c 472: Failed to create client object: Daemon not running
The file protocol/discovery/avahiDiscovery.c is part of hplip and first
appeared in version 3.20.9; previously, protocol/discovery/mdns.c was
used.
I have tested with three hplip versions:
* 3.20.3 → The issue does not occur
* 3.21.12 → The issue occurs
* 3.22.10 → The issue occurs
These are the relevant lines of code for the failure:
445 static void avahi_setup(const int iCommandType, const char* iHostName)
...
457 if (!(client = avahi_client_new(avahi_simple_poll_get(aSimplePoll), AVAHI_CLIENT_IGNORE_USER_CONFIG, client_callback, NULL, &error)))
458 {
459 //if Daemon connection failed or daemon not running,
460 //call systemctl for authorization once it authorized start the service
461 if ( ( ( error == AVAHI_ERR_NO_DAEMON ) || (error == AVAHI_ERR_DISCONNECTED) )
462 && checkAuthorizationForAvahiService() && systemdStartAvahiService() )
463 {
464 if (!(client = avahi_client_new(avahi_simple_poll_get(aSimplePoll), AVAHI_CLIENT_IGNORE_USER_CONFIG, client_callback, NULL, &error)))
465 {
466 BUG( "Failed to create client object: %s\n", avahi_strerror(error));
467 goto fail;
468 }
469 }
470 else
471 {
472 BUG( "Failed to create client object: %s\n", avahi_strerror(error));
473 goto fail;
474 }
475 }
The resulting behavior is sometimes confusing or even undesirable. We have been struggling with this issue for some time now. We manage nearly 3,000 Linux workstations centrally and in a controlled manner, not allowing automatic device installation and certainly not granting end users administrative privileges. So far, sadly, the most common workaround we've found and applied is just to uninstall libsane-hpaio. We would like to know or have a better solution.
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to policykit-1 in Ubuntu.
https://bugs.launchpad.net/bugs/1926014
Title:
simple-scan is trying to start disabled avahi-daemon.service
Status in policykit-1 package in Ubuntu:
Confirmed
Bug description:
Hi,
I have a fresh installation of Ubuntu desktop 21.04.
I stop and disable avahi-daemon.service + avahi-daemon.socket
(I don't use these services on my desktop)
Then I start "simple-scan" program.
After that I see a pop-up window for admin password!
It's wrong, no such thing should be there.
In previouse release (20.10) it was OK.
Thanks.
Antonin
ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: policykit-1 0.105-30
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sat Apr 24 15:17:52 2021
InstallationDate: Installed on 2021-04-22 (1 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=cs_CZ.UTF-8
SHELL=/bin/bash
SourcePackage: policykit-1
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1926014/+subscriptions