hp-plugin generates libsane udev rules missing a LABEL

Bug #1847477 reported by Christian Kastner
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Fedora
Unknown
Unknown
hplip (Ubuntu)
New
Undecided
Unassigned

Bug Description

The utility hp-plugin generated a file S99-2000S1.rules in /etc/udev/rules.d/, which I've attached. This sets up permissions for my HP LaserJet Pro MFP 176n.

Note that in line 26, there's a GOTO="libsane_rules_end", but there is no matching LABEL= for that.

Compare this to libsane's /lib/udev/rules.d/60-libsane.rules, which has a similar structure, but has such a matching LABEL.

(Side note: The file is also created with mode the executable bits set.)

Tags: patch
Revision history for this message
Christian Kastner (ckk) wrote :
Revision history for this message
Christian Kastner (ckk) wrote :

Addendum: I forgot to add that this was observed on a Debian machine, but the Debian package maintainer stated that this file was not generated by the packaging, and suggested that I report the bug here.

Revision history for this message
Chris White (whitecf) wrote :

It should be GOTO="libsane_usb_rules_end"

Revision history for this message
zdohnal (zdohnal) wrote :

I have the same problem in Fedora https://bugzilla.redhat.com/show_bug.cgi?id=1987141 - additionally now hp-plugin installs another file - /etc/udev/rules.d/40-libsane.rules , which has the same problem.

And both files has other two issues:
1) have bad permissions - the bad permissions are set in installer/pluginhandler.py:

405 if not os.path.exists(trg):
406 log.error("Target file %s does not exist. File copy failed." % trg)
407 continue
408 else:
409 os.chmod(trg, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)

The last line sets the perms to 755, which is not ok for configuration files.

2) sets the device for 'scanner' group, which doesn't exist on my Fedora installation at least.

I'll post the patch for perms here, but the bad labels and bad group (the plugin should work on all OS, so IMO OS-specific groups aren't allowed) in rule files should be fixed by plugin provider - HP.

I will work it around in Fedora for now.

Revision history for this message
zdohnal (zdohnal) wrote :
Revision history for this message
zdohnal (zdohnal) wrote :

The issue is present in Ubuntu too.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Proposed patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.