Comment 2 for bug 1221348

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Hello Amarnath Chitumalla,

from how hp-config_usb_printer behaves I already thought that it is probably meant
only as an internal tool for HPLIP.

But at least in hplip-3.13.8 (I am currently working on the upgrade to hplip-3.13.9)
"hp-config_usb_printer -h" shows:
====================================================================
Detects HP printers connected using USB and installs HPLIP printers and faxes
in the CUPS spooler. Tries to automatically determine the correct PPD file to use.
====================================================================

Nothing in "hp-config_usb_printer -h" tells about that it is "for internal use but not
public tool for administrative tasks".

Because I am a "good admin" I had read "hp-config_usb_printer -h" carefully
before I did run it ;-)

I.e. the first issue is that it is not properly documented.

The second (more severe) issue is that hp-config_usb_printer
is executable by any user as /usr/bin/hp-config_usb_printer
(which is a link that points to ../share/hplip/config_usb_printer.py).

The Filesystem Hierarchy Standard (FHS) tells about /usr/bin/
http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRBINMOSTUSERCOMMANDS
====================================================================
/usr/bin : Most user commands
Purpose
This is the primary directory of executable commands on the system.
====================================================================

Accordingly /usr/bin/hp-config_usb_printer is meant to be a command
that can be called by any user.

If hp-config_usb_printer would be meant to be a command only for admins
it should be /usr/sbin/hp-config_usb_printer according to FHS
http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRSBINNONESSENTIALSTANDARDSYSTEMBI
====================================================================
/usr/sbin : Non-essential standard system binaries
Purpose
This directory contains any non-essential binaries used exclusively
by the system administrator.
System administration programs that are required for system repair,
system recovery, mounting /usr, or other essential functions must
be placed in /sbin instead.
====================================================================

But when hp-config_usb_printer is an internal executable for HPLIP
it should be not at all in a standard "bin" directory (i.e. a directory
that is usually in $PATH).