Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1430882 - The -h option is overridden by _cupsSetDefaults settings when the IPP port is not given
The -h option is overridden by _cupsSetDefaults settings when the IPP port is...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups (Show other bugs)
7.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Zdenek Dohnal
Petr Sklenar
: Patch
Depends On:
Blocks: 1420851 1465887 1465928
  Show dependency treegraph
 
Reported: 2017-03-09 13:52 EST by Bryan Mason
Modified: 2018-04-10 09:42 EDT (History)
3 users (show)

See Also:
Fixed In Version: cups-1.6.3-31.el7
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 09:41:08 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)
Possible patch adapted from upstream (1.77 KB, patch)
2017-03-09 13:52 EST, Bryan Mason
no flags Details | Diff
Proposed patch (954 bytes, patch)
2017-09-22 08:42 EDT, Zdenek Dohnal
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 4675 None None None 2017-03-09 13:52 EST
Red Hat Product Errata RHBA-2018:0782 None None None 2018-04-10 09:42 EDT

  None (edit)
Description Bryan Mason 2017-03-09 13:52:23 EST
Created attachment 1261676 [details]
Possible patch adapted from upstream

Description of problem:

  The "-h" option to "lp*" commands (like lpstat) is ignored if
  ServerName is set in client.conf and the port isn't specified in the
  argument to the "-h" option.


Version-Release number of selected component (if applicable):

  cups-1.6.3-26

How reproducible:

  100%

Steps to Reproduce:

  1. Set "ServerName <some-host>" in /etc/cups/client.conf
  2. run "lpstat -h <another-host> -p"

Actual results:

  The printer list from <another-host>.

Expected results:

  The printer list from <some-host>.

Additional info:

  # cat /etc/cups/client.conf 
  # Empty

  # lpstat -a
  lpstat: No destinations added.

  # lpstat -h rhel73-test -p
  printer pass is idle.  enabled since Thu 09 Mar 2017 10:30:04 AM PST

  # lpstat -h rhel68-test -p
  printer fail is idle.  enabled since Thu 09 Mar 2017 10:31:18 AM PST

  # echo "ServerName rhel68-test" > /etc/cups/client.conf 
  # cat /etc/cups/client.conf
  ServerName rhel68-test

  # lpstat -h rhel73-test -p
  printer fail is idle.  enabled since Thu 09 Mar 2017 10:31:18 AM PST

  # lpstat -h rhel73-test:631 -p
  printer pass is idle.  enabled since Thu 09 Mar 2017 10:30:04 AM PST

  This is the same as cups.org STR #4675 which was resolved with
  https://github.com/apple/cups/commit/4b9daaf451a59d1eb1c99aac32d4e3cb19416397

  I've adapted that patch for RHEL 7.3 and attached.
  The patch fixes the issue in my testing:

  [root@sf01799390 cupsrpms]# yum update *.rpm
  ...
  Updated:
    cups.x86_64 1:1.6.3-26.el7_3.sf01799390.1
    cups-client.x86_64 1:1.6.3-26.el7_3.sf01799390.1
    cups-filesystem.noarch 1:1.6.3-26.el7_3.sf01799390.1
    cups-libs.x86_64 1:1.6.3-26.el7_3.sf01799390.1
      
  Complete!

  # lpstat -h rhel73-test -p
  printer pass is idle.  enabled since Thu 09 Mar 2017 10:30:04 AM PST
Comment 6 Zdenek Dohnal 2017-09-22 08:42 EDT
Created attachment 1329577 [details]
Proposed patch
Comment 16 errata-xmlrpc 2018-04-10 09:41:08 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0782

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