Bug 1299051 - lpinfo -U doesn't work
lpinfo -U doesn't work
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
22
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Zdenek Dohnal
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-15 14:51 EST by Veteran
Modified: 2016-06-16 02:02 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-16 02:02:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (798 bytes, patch)
2016-05-30 07:28 EDT, Zdenek Dohnal
no flags Details | Diff

  None (edit)
Description Veteran 2016-01-15 14:51:18 EST
Description of problem:
man lpinfo says that lpinfo -U <username> is used to specify an alternate user name to connect to cups server. When I try to use lpinfo -U I get the error

lpinfo: Unknown option "U"



Version-Release number of selected component (if applicable): cups-2.0.3-1.fc22.i686


How reproducible:


Steps to Reproduce:
1. type lpinfo -U <username> -v to list printers
2.
3.

Actual results:
lpinfo: Unknown option "U"


Expected results:
expect a password prompt to connect to print server

Additional info:
Also doesn't work in Ubuntu, possibly broken upstream.
Comment 1 Zdenek Dohnal 2016-05-13 09:22:50 EDT
After looking into source code I found out that argument -U isn't implemented in lpinfo.c at all (the last commit in lpinfo.c is six years old, even in upstream). I asked upstream (via mailing lists and github pull request) about this matter (I asked if they mention option -U as same future feature, which is not implemented right now, or I misinterpreted something and this functionality is somewhere in the code), but with no response. So I think this bug results in feature request, but it will need to write all client-server authentication for concrete user (option -v uses basic authentication), so it can be time consuming. 
Veteran, do you need this option working for purpose, which is important to you? Because if this functionality is not critical to you, I propose a patch, which removes option -U from manual pages.
Comment 3 Zdenek Dohnal 2016-05-26 06:48:12 EDT
Upstream sent following email on cups-devel mailing list. It contains information about option -U <username> in lpmove tool, but I think it is applicable even in lpinfo case: 

"Currently lpmove does not support the -U option, despite what the man page says."

And upstream presented possible workaround:

CUPS_USER=foo lpmove ...

https://www.cups.org/pipermail/cups-devel/2016-May/016829.html
Comment 4 Zdenek Dohnal 2016-05-30 07:28 EDT
Created attachment 1162784 [details]
Proposed patch
Comment 5 Veteran 2016-05-31 14:21:41 EDT
I do not need the functionality. It works for me as is.
Comment 6 Zdenek Dohnal 2016-06-16 02:02:09 EDT
Upstream accepted my patch and merged it into its github project. They marked it as RFE.

Note You need to log in before you can comment on or make changes to this bug.