Bug 1299051 - lpinfo -U doesn't work
Summary: lpinfo -U doesn't work
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 22
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-15 19:51 UTC by Veteran
Modified: 2016-06-16 06:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 06:02:09 UTC
Type: Bug


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

Description Veteran 2016-01-15 19:51:18 UTC
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 13:22:50 UTC
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 10:48:12 UTC
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 11:28:42 UTC
Created attachment 1162784 [details]
Proposed patch

Comment 5 Veteran 2016-05-31 18:21:41 UTC
I do not need the functionality. It works for me as is.

Comment 6 Zdenek Dohnal 2016-06-16 06:02:09 UTC
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.