Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 414215 - =net-print/hplip-3.12.4 - potential permission problem
Summary: =net-print/hplip-3.12.4 - potential permission problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-01 09:10 UTC by Fab
Modified: 2012-05-05 15:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2012-05-01 09:10:12 UTC
This version installs the following directory :
> # ls -l /var/log/ | grep hp
> drwxrwxr-- 2 root         lp             4096  1 mai   10:11 hp

But, according to bug #358841, the user may not be in the lp group (or if it
is required, this should appear clearly in the hplip ebuild).

Thanks.

Reproducible: Always
Comment 1 Daniel Pielmeier gentoo-dev 2012-05-02 18:05:03 UTC
From the hplip ebuild:

    elog "For more information on setting up your printer please take"
    elog "a look at the hplip section of the gentoo printing guide:"
    elog "http://www.gentoo.org/doc/en/printing-howto.xml"

The hplip section from the printing guide states that any user which needs to print must be in the lp group.

I am not going to put the complete hplip documentation into the elog messsage. I think a link to the guide is enough. It is not my problem if nobody reads the documentation.


Regarding cups. If it is really the the case that cups users do not need to be in the lp group then we can debate if this requirement can be dropped from hplip as well by changing the permissions of the log directory. The lp* utilities are indeed executable by any user. However the cups configuration files can only be changed by users who are member of the lp group. It seems everybody is allowed to print but only root and members of the lp group can make configuration changes.
Comment 2 Daniel Pielmeier gentoo-dev 2012-05-02 18:40:21 UTC
When looking at the hplip sources it looks like the user needs to be in the lp group. The log directory however is the only directory installed with group lp permissions. Maybe the lp group requirement is there for backwards compatibility with older versions of cups which had the lp group requirement for any user who needs to access the printer. I would say as long as hplip requires it will leave it this way and don't patch it out.
Comment 3 Fab 2012-05-02 23:21:42 UTC
(In reply to comment #1)
> From the hplip ebuild:
> 
>     elog "For more information on setting up your printer please take"
>     elog "a look at the hplip section of the gentoo printing guide:"
>     elog "http://www.gentoo.org/doc/en/printing-howto.xml"
> 
> The hplip section from the printing guide states that any user which needs
> to print must be in the lp group.
> 
> I am not going to put the complete hplip documentation into the elog
> messsage. I think a link to the guide is enough. It is not my problem if
> nobody reads the documentation.

Sorry, I read it approximately five years ago, when I installed this system and this printer. I don't ask you to include the complete hplip documentation into the ebuild, but, if the documentation will be modified accordingly to bug #358841, then I suggest to highlight the following sentence in the hplip section of the documentation :
> All users who need to access the printer have to be a member of the lp group.

This was obvious to me to open this bug, simply because I opened bug #358841.
I was surprised that hplip requires users to be in lp group, unlike cups that doesn't.

btw, have you ever installed a game on gentoo ? each time you do it, you have a warning :
> ewarn "Remember, in order to play games, you have to"
> ewarn "be in the 'game' group."

When you install virtualbox, you have :
> elog "You must be in the vboxusers group to use VirtualBox."

This is small reminders for the root user. People will not read the entire Printing Guide each time they update hplip. They read it when they install a printer. However, I think that informations like group membership have their place into portage logs.
Comment 4 Daniel Pielmeier gentoo-dev 2012-05-05 15:51:39 UTC
I have added an elog message reminding about the lp group.