diff --git a/SOURCES/0001-Update-man-pages-for-h-option-Issue-357.patch b/SOURCES/0001-Update-man-pages-for-h-option-Issue-357.patch new file mode 100644 index 0000000..705d77c --- /dev/null +++ b/SOURCES/0001-Update-man-pages-for-h-option-Issue-357.patch @@ -0,0 +1,855 @@ +From 4d6787bd98c2fac8dcc58f34125d299d82e622aa Mon Sep 17 00:00:00 2001 +From: Michael R Sweet +Date: Mon, 2 May 2022 15:35:20 -0400 +Subject: [PATCH] Update man pages for -h option (Issue #357) + +--- + doc/help/man-cancel.html | 7 ++++--- + doc/help/man-cupsctl.html | 7 ++++--- + doc/help/man-ipptool.html | 6 ++++++ + doc/help/man-lp.html | 9 +++++---- + doc/help/man-lpinfo.html | 9 +++++---- + doc/help/man-lpmove.html | 9 +++++---- + doc/help/man-lpoptions.html | 17 +++++++++-------- + doc/help/man-lpq.html | 5 +++-- + doc/help/man-lpr.html | 5 +++-- + doc/help/man-lprm.html | 6 +++--- + doc/help/man-lpstat.html | 5 +++-- + man/cancel.1 | 9 +++++---- + man/cupsctl.8 | 9 +++++---- + man/lp.1 | 11 ++++++----- + man/lpinfo.8 | 11 ++++++----- + man/lpmove.8 | 11 ++++++----- + man/lpoptions.1 | 19 ++++++++++--------- + man/lpq.1 | 7 ++++--- + man/lpr.1 | 7 ++++--- + man/lprm.1 | 8 ++++---- + man/lpstat.1 | 11 ++++++----- + 22 files changed, 107 insertions(+), 82 deletions(-) + +diff --git a/doc/help/man-cancel.html b/doc/help/man-cancel.html +index d51bb2b91..a0b52369c 100644 +--- a/doc/help/man-cancel.html ++++ b/doc/help/man-cancel.html +@@ -12,6 +12,9 @@ cancel - cancel jobs +

Synopsis

+ cancel + [ ++-h ++hostname[:port] ++] [ + -E + ] [ + -U +@@ -19,9 +22,6 @@ cancel - cancel jobs + ] [ + -a + ] [ +--h +-hostname[:port] +-] [ + -u + username + ] [ +@@ -46,6 +46,7 @@ destinations if none is provided. +
Forces encryption when connecting to the server. +
-h hostname[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. +
-U username +
Specifies the username to use when connecting to the server. +
-u username +diff --git a/doc/help/man-cupsctl.html b/doc/help/man-cupsctl.html +index b3f892ef9..e5c98dccb 100644 +--- a/doc/help/man-cupsctl.html ++++ b/doc/help/man-cupsctl.html +@@ -12,14 +12,14 @@ cupsctl - configure cupsd.conf options +

Synopsis

+ cupsctl + [ ++-h ++server[:port] ++] [ + -E + ] [ + -U + username + ] [ +--h +-server[:port] +-] [ + --[no-]debug-logging + ] [ + --[no-]remote-admin +@@ -45,6 +45,7 @@ The following options are recognized: +
Specifies an alternate username to use when authenticating with the scheduler. +
-h server[:port] +
Specifies the server address. ++Note: This option must occur before all others. +
--[no-]debug-logging +
Enables (disables) debug logging to the error_log file. +
--[no-]remote-admin +diff --git a/doc/help/man-ipptool.html b/doc/help/man-ipptool.html +index 81f67d77f..688454c69 100644 +--- a/doc/help/man-ipptool.html ++++ b/doc/help/man-ipptool.html +@@ -59,6 +59,8 @@ ipptool - perform internet printing protocol requests + -i + seconds + ] [ ++-j ++] [ + -n + repeat-count + ] [ +@@ -150,6 +152,10 @@ This option is incompatible with the -i (interval) and -n (repeat- + testfile + should be repeated at the specified interval. + This option is incompatible with the -X (XML plist output) option. ++
-j ++
Specifies that ++ipptool ++will produce JSON output. +
-l +
Specifies that plain text output is desired. +
-n repeat-count +diff --git a/doc/help/man-lp.html b/doc/help/man-lp.html +index f70c088d3..6442e900d 100644 +--- a/doc/help/man-lp.html ++++ b/doc/help/man-lp.html +@@ -12,6 +12,8 @@ lp - print files +

Synopsis

+ lp + [ ++-h hostname[:port] ++] [ + -E + ] [ + -U +@@ -21,8 +23,6 @@ lp - print files + ] [ + -d destination[/instance] + ] [ +--h hostname[:port] +-] [ + -m + ] [ + -n +@@ -51,6 +51,8 @@ lp - print files +
+ lp + [ ++-h hostname[:port] ++] [ + -E + ] [ + -U +@@ -58,8 +60,6 @@ lp - print files + ] [ + -c + ] [ +--h hostname[:port] +-] [ + -i + job-id + ] [ +@@ -106,6 +106,7 @@ In CUPS, print files are always sent to the scheduler via IPP which has the same +
Prints files to the named printer. +
-h hostname[:port] +
Chooses an alternate server. ++Note: This option must occur before all others. +
-i job-id +
Specifies an existing job to modify. +
-m +diff --git a/doc/help/man-lpinfo.html b/doc/help/man-lpinfo.html +index a1aed9421..30df7691c 100644 +--- a/doc/help/man-lpinfo.html ++++ b/doc/help/man-lpinfo.html +@@ -12,10 +12,10 @@ lpinfo - show available devices or drivers (deprecated) +

Synopsis

+ lpinfo + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -l + ] [ + --device-id +@@ -40,10 +40,10 @@ lpinfo - show available devices or drivers (deprecated) +
+ lpinfo + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -l + ] [ + --exclude-schemes +@@ -66,6 +66,7 @@ The first form (-m) lists the available drivers, while the second form (< +
Forces encryption when connecting to the server. +
-h server[:port] +
Selects an alternate server. ++Note: This option must occur before all others. +
-l +
Shows a "long" listing of devices or drivers. +
--device-id device-id-string +diff --git a/doc/help/man-lpmove.html b/doc/help/man-lpmove.html +index d8019ee25..b0db753f9 100644 +--- a/doc/help/man-lpmove.html ++++ b/doc/help/man-lpmove.html +@@ -12,10 +12,10 @@ lpmove - move a job or all jobs to a new destination +

Synopsis

+ lpmove + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -U + username + ] +@@ -24,10 +24,10 @@ lpmove - move a job or all jobs to a new destination +
+ lpmove + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -U + username + ] +@@ -44,6 +44,7 @@ The lpmove command supports the following options: +
Specifies an alternate username. +
-h server[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. + +

Examples

+ Move job 123 from "oldprinter" to "newprinter": +diff --git a/doc/help/man-lpoptions.html b/doc/help/man-lpoptions.html +index 6dda87f64..6af78290b 100644 +--- a/doc/help/man-lpoptions.html ++++ b/doc/help/man-lpoptions.html +@@ -12,9 +12,9 @@ lpoptions - display or set printer options and defaults +

Synopsis

+ lpoptions + [ +--E +-] [ + -h server[:port] ++] [ ++-E + ] + -d destination[/instance] + [ +@@ -23,20 +23,20 @@ lpoptions - display or set printer options and defaults +
+ lpoptions + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -p destination[/instance] + ] + -o option[=value] ... +
+ lpoptions + [ +--E +-] [ + -h server[:port] + ] [ ++-E ++] [ + -p destination[/instance] + ] + -r +@@ -44,9 +44,9 @@ lpoptions - display or set printer options and defaults +
+ lpoptions + [ +--E +-] [ + -h server[:port] ++] [ ++-E + ] + -x destination[/instance] +

Description

+@@ -72,6 +72,7 @@ If instance is supplied then that particular instance is used. + This option overrides the system default printer for the current user. +
-h server[:port] +
Uses an alternate server. ++Note: This option must occur before all others. +
-l +
Lists the printer specific options and their current settings. +
-o option[=value] +diff --git a/doc/help/man-lpq.html b/doc/help/man-lpq.html +index 1c9e704ff..19e536d3c 100644 +--- a/doc/help/man-lpq.html ++++ b/doc/help/man-lpq.html +@@ -12,13 +12,13 @@ lpq - show printer queue status +

Synopsis

+ lpq + [ ++-h server[:port] ++] [ + -E + ] [ + -U + username + ] [ +--h server[:port] +-] [ + -P destination[/instance] + ] [ + -a +@@ -44,6 +44,7 @@ Jobs queued on the default destination will be shown if no printer or class is s +
Reports jobs on all printers. +
-h server[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. +
-l +
Requests a more verbose (long) reporting format. + +diff --git a/doc/help/man-lpr.html b/doc/help/man-lpr.html +index d044ab1a8..f9b19e1fe 100644 +--- a/doc/help/man-lpr.html ++++ b/doc/help/man-lpr.html +@@ -12,10 +12,10 @@ lpr - print files +

Synopsis

+ lpr + [ +--E +-] [ + -H server[:port] + ] [ ++-E ++] [ + -U + username + ] [ +@@ -67,6 +67,7 @@ The following options are recognized by lpr: +
Forces encryption when connecting to the server. +
-H server[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. +
-C "name" +
-J "name" +
-T "name" +diff --git a/doc/help/man-lprm.html b/doc/help/man-lprm.html +index 7410320a3..dbe7f20de 100644 +--- a/doc/help/man-lprm.html ++++ b/doc/help/man-lprm.html +@@ -12,14 +12,13 @@ lprm - cancel print jobs +

Synopsis

+ lprm + [ ++-h hostname[:port] ++] [ + -E + ] [ + -U + username + ] [ +--h +-server[:port] +-] [ + -P + destination[/instance] + ] [ +@@ -45,6 +44,7 @@ command supports the following options: +
Specifies an alternate username. +
-h server[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. + +

Conforming To

+ The CUPS version of +diff --git a/doc/help/man-lpstat.html b/doc/help/man-lpstat.html +index f23089bbe..2c5dedc7c 100644 +--- a/doc/help/man-lpstat.html ++++ b/doc/help/man-lpstat.html +@@ -12,6 +12,8 @@ lpstat - print cups status information +

Synopsis

+ lpstat + [ ++-h hostname[:port] ++] [ + -E + ] [ + -H +@@ -19,8 +21,6 @@ lpstat - print cups status information + -U + username + ] [ +--h hostname[:port] +-] [ + -l + ] [ + -W +@@ -91,6 +91,7 @@ If no classes are specified then all classes are listed. +
Shows all available destinations on the local network. +
-h server[:port] +
Specifies an alternate server. ++Note: This option must occur before all others. +
-l +
Shows a long listing of printers, classes, or jobs. +
-o [destination(s)] +diff --git a/man/cancel.1 b/man/cancel.1 +index 34a5d9fc0..caea0ed69 100644 +--- a/man/cancel.1 ++++ b/man/cancel.1 +@@ -8,12 +8,15 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH cancel 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH cancel 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + cancel \- cancel jobs + .SH SYNOPSIS + .B cancel + [ ++.B \-h ++.I hostname[:port] ++] [ + .B \-E + ] [ + .B \-U +@@ -21,9 +24,6 @@ cancel \- cancel jobs + ] [ + .B \-a + ] [ +-.B \-h +-.I hostname[:port] +-] [ + .B \-u + .I username + ] [ +@@ -50,6 +50,7 @@ Forces encryption when connecting to the server. + .TP 5 + \fB\-h \fIhostname\fR[\fI:port\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .TP 5 + \fB\-U \fIusername\fR + Specifies the username to use when connecting to the server. +diff --git a/man/cupsctl.8 b/man/cupsctl.8 +index 1b1ff4183..7e50d07ac 100644 +--- a/man/cupsctl.8 ++++ b/man/cupsctl.8 +@@ -8,20 +8,20 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH cupsctl 8 "CUPS" "26 April 2019" "Apple Inc." ++.TH cupsctl 8 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + cupsctl \- configure cupsd.conf options + .SH SYNOPSIS + .B cupsctl + [ ++.B \-h ++\fIserver\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-U + .I username + ] [ +-.B \-h +-\fIserver\fR[\fB:\fIport\fR] +-] [ + \fB\-\-\fR[\fBno\-\fR]\fBdebug\-logging\fR + ] [ + \fB\-\-\fR[\fBno\-\fR]\fBremote\-admin\fR +@@ -49,6 +49,7 @@ Specifies an alternate username to use when authenticating with the scheduler. + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Specifies the server address. ++Note: This option must occur before all others. + .TP 5 + \fB\-\-\fR[\fBno\-\fR]\fBdebug\-logging\fR + Enables (disables) debug logging to the \fIerror_log\fR file. +diff --git a/man/lp.1 b/man/lp.1 +index a54f904a5..4bdd2de7b 100644 +--- a/man/lp.1 ++++ b/man/lp.1 +@@ -8,12 +8,14 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lp 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lp 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lp \- print files + .SH SYNOPSIS + .B lp + [ ++\fB\-h \fIhostname\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-U +@@ -23,8 +25,6 @@ lp \- print files + ] [ + \fB\-d \fIdestination\fR[\fB/\fIinstance\fR] + ] [ +-\fB\-h \fIhostname\fR[\fB:\fIport\fR] +-] [ + .B \-m + ] [ + .B \-n +@@ -53,6 +53,8 @@ lp \- print files + .br + .B lp + [ ++\fB\-h \fIhostname\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-U +@@ -60,8 +62,6 @@ lp \- print files + ] [ + .B \-c + ] [ +-\fB\-h \fIhostname\fR[\fB:\fIport\fR] +-] [ + .B \-i + .I job-id + ] [ +@@ -113,6 +113,7 @@ Prints files to the named printer. + .TP 5 + \fB\-h \fIhostname\fR[\fB:\fIport\fR] + Chooses an alternate server. ++Note: This option must occur before all others. + .TP 5 + \fB\-i \fIjob-id\fR + Specifies an existing job to modify. +diff --git a/man/lpinfo.8 b/man/lpinfo.8 +index d238f9a60..d44b568d2 100644 +--- a/man/lpinfo.8 ++++ b/man/lpinfo.8 +@@ -8,16 +8,16 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lpinfo 8 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpinfo 8 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpinfo \- show available devices or drivers (deprecated) + .SH SYNOPSIS + .B lpinfo + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + .B \-l + ] [ + .B \-\-device\-id +@@ -42,10 +42,10 @@ lpinfo \- show available devices or drivers (deprecated) + .br + .B lpinfo + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + .B \-l + ] [ + .B \-\-exclude\-schemes +@@ -69,6 +69,7 @@ Forces encryption when connecting to the server. + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Selects an alternate server. ++Note: This option must occur before all others. + .TP 5 + .B \-l + Shows a "long" listing of devices or drivers. +diff --git a/man/lpmove.8 b/man/lpmove.8 +index af3c6b63c..62adba654 100644 +--- a/man/lpmove.8 ++++ b/man/lpmove.8 +@@ -8,16 +8,16 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lpmove 8 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpmove 8 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpmove \- move a job or all jobs to a new destination + .SH SYNOPSIS + .B lpmove + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + .B \-U + .I username + ] +@@ -26,10 +26,10 @@ lpmove \- move a job or all jobs to a new destination + .br + .B lpmove + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + .B \-U + .I username + ] +@@ -48,6 +48,7 @@ Specifies an alternate username. + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .SH EXAMPLES + Move job 123 from "oldprinter" to "newprinter": + .nf +diff --git a/man/lpoptions.1 b/man/lpoptions.1 +index 372f46a37..2eb5b6010 100644 +--- a/man/lpoptions.1 ++++ b/man/lpoptions.1 +@@ -8,15 +8,15 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lpoptions 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpoptions 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpoptions \- display or set printer options and defaults + .SH SYNOPSIS + .B lpoptions + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] ++] [ ++.B \-E + ] + \fB\-d \fIdestination\fR[\fB/\fIinstance\fR] + [ +@@ -25,20 +25,20 @@ lpoptions \- display or set printer options and defaults + .br + .B lpoptions + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + \fB\-p \fIdestination\fR[\fB/\fIinstance\fR] + ] + \fB\-o \fIoption\fR[\fB=\fIvalue\fR] ... + .br + .B lpoptions + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + \fB\-p \fIdestination\fR[\fB/\fIinstance\fR] + ] + .B \-r +@@ -46,9 +46,9 @@ lpoptions \- display or set printer options and defaults + .br + .B lpoptions + [ +-.B \-E +-] [ + \fB\-h \fIserver\fR[\fB:\fIport\fR] ++] [ ++.B \-E + ] + \fB\-x \fIdestination\fR[\fB/\fIinstance\fR] + .SH DESCRIPTION +@@ -79,6 +79,7 @@ This option overrides the system default printer for the current user. + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Uses an alternate server. ++Note: This option must occur before all others. + .TP 5 + .B \-l + Lists the printer specific options and their current settings. +diff --git a/man/lpq.1 b/man/lpq.1 +index ce23a6c81..a81633ecb 100644 +--- a/man/lpq.1 ++++ b/man/lpq.1 +@@ -8,19 +8,19 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lpq 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpq 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpq \- show printer queue status + .SH SYNOPSIS + .B lpq + [ ++\fB\-h \fIserver\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-U + .I username + ] [ +-\fB\-h \fIserver\fR[\fB:\fIport\fR] +-] [ + \fB\-P \fIdestination\fR[\fB/\fIinstance\fR] + ] [ + .B \-a +@@ -51,6 +51,7 @@ Reports jobs on all printers. + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .TP 5 + .B \-l + Requests a more verbose (long) reporting format. +diff --git a/man/lpr.1 b/man/lpr.1 +index e5f9f9018..77a62b305 100644 +--- a/man/lpr.1 ++++ b/man/lpr.1 +@@ -8,16 +8,16 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lpr 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpr 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpr \- print files + .SH SYNOPSIS + .B lpr + [ +-.B \-E +-] [ + \fB\-H \fIserver\fR[\fB:\fIport\fR] + ] [ ++.B \-E ++] [ + .B \-U + .I username + ] [ +@@ -70,6 +70,7 @@ Forces encryption when connecting to the server. + .TP 5 + \fB\-H \fIserver\fR[\fB:\fIport\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .TP 5 + \fB\-C "\fIname\fB"\fR + .TP 5 +diff --git a/man/lprm.1 b/man/lprm.1 +index 094166539..0cf88ac51 100644 +--- a/man/lprm.1 ++++ b/man/lprm.1 +@@ -8,20 +8,19 @@ + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more + .\" information. + .\" +-.TH lprm 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lprm 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lprm \- cancel print jobs + .SH SYNOPSIS + .B lprm + [ ++\fB\-h \fIhostname\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-U + .I username + ] [ +-.B \-h +-.IR server [ :port ] +-] [ + .B \-P + .IR destination [ /instance ] + ] [ +@@ -50,6 +49,7 @@ Specifies an alternate username. + .TP 5 + \fB\-h \fIserver\fR[\fI:port\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .SH CONFORMING TO + The CUPS version of + .B lprm +diff --git a/man/lpstat.1 b/man/lpstat.1 +index 0a10cd9bc..88acff7b3 100644 +--- a/man/lpstat.1 ++++ b/man/lpstat.1 +@@ -1,17 +1,20 @@ + .\" + .\" lpstat man page for CUPS. + .\" +-.\" Copyright 2007-2019 by Apple Inc. +-.\" Copyright 1997-2006 by Easy Software Products. ++.\" Copyright © 2021-2022 by OpenPrinting. ++.\" Copyright © 2007-2019 by Apple Inc. ++.\" Copyright © 1997-2006 by Easy Software Products. + .\" + .\" Licensed under Apache License v2.0. See the file "LICENSE" for more information. + .\" +-.TH lpstat 1 "CUPS" "26 April 2019" "Apple Inc." ++.TH lpstat 1 "CUPS" "2022-05-02" "OpenPrinting" + .SH NAME + lpstat \- print cups status information + .SH SYNOPSIS + .B lpstat + [ ++\fB\-h \fIhostname\fR[\fB:\fIport\fR] ++] [ + .B \-E + ] [ + .B \-H +@@ -19,8 +22,6 @@ + .B \-U + .I username + ] [ +-\fB\-h \fIhostname\fR[\fB:\fIport\fR] +-] [ + .B \-l + ] [ + .B \-W +@@ -100,6 +101,7 @@ + .TP 5 + \fB\-h \fIserver\fR[\fB:\fIport\fR] + Specifies an alternate server. ++Note: This option must occur before all others. + .TP 5 + .B \-l + Shows a long listing of printers, classes, or jobs. +@@ -145,4 +147,4 @@ + .BR lprm (1), + CUPS Online Help (http://localhost:631/help) + .SH COPYRIGHT +-Copyright \[co] 2007-2019 by Apple Inc. ++Copyright \[co] 2021-2022 by OpenPrinting. diff --git a/SOURCES/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch b/SOURCES/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch new file mode 100644 index 0000000..67e2edc --- /dev/null +++ b/SOURCES/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch @@ -0,0 +1,55 @@ +From bdb1ca45454d90410031c4c2054005a995f76180 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Wed, 6 Apr 2022 15:04:45 +0200 +Subject: [PATCH] cups/tls-gnutls.c: Use always GNUTLS_SHUT_WR + +The current mode for `gnutls_bye()` in client use cases strictly +follows TLS v1.2 standard, which in this particular part says: + +``` +Unless some other fatal alert has been transmitted, each party is +required to send a close_notify alert before closing the write +side of the connection. The other party MUST respond with a +close_notify alert of its own and close down the connection immediately, +discarding any pending writes. It is not required for the initiator +of the close to wait for the responding close_notify alert before +closing the read side of the connection. +``` + +and waits for the other side of TLS connection to confirm the close. + +Unfortunately it can undesired for reasons: +- we support switching of TLS versions in CUPS, and this mode strictly + follows TLS v1.2 - so for older version this behavior is not expected + and can cause delays +- even some TLS v1.2 implementations (like Windows Server 2016) don't + comply TLS v1.2 behavior even if it says it does - in that case, + encrypted printing takes 30s till HTTP timeout is reached, because the + other side didn't send confirmation +- AFAIU openssl's SSL_shutdown() doesn't make this TLS v1.2 difference, + so we could end up with two TLS implementations in CUPS which will + behave differently + +Since the standard defines that waiting for confirmation is not required +and due the problems above, I would propose using GNUTLS_SHUT_WR mode +regardless of HTTP mode. +--- + cups/tls-gnutls.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cups/tls-gnutls.c b/cups/tls-gnutls.c +index c55995b2b..f87b4f4df 100644 +--- a/cups/tls-gnutls.c ++++ b/cups/tls-gnutls.c +@@ -1667,7 +1667,7 @@ _httpTLSStop(http_t *http) /* I - Connection to server */ + int error; /* Error code */ + + +- error = gnutls_bye(http->tls, http->mode == _HTTP_MODE_CLIENT ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR); ++ error = gnutls_bye(http->tls, GNUTLS_SHUT_WR); + if (error != GNUTLS_E_SUCCESS) + _cupsSetError(IPP_STATUS_ERROR_INTERNAL, gnutls_strerror(errno), 0); + +-- +2.35.1 + diff --git a/SOURCES/0001-scheduler-cert.c-Fix-string-comparison-fixes-CVE-202.patch b/SOURCES/0001-scheduler-cert.c-Fix-string-comparison-fixes-CVE-202.patch new file mode 100644 index 0000000..0aa9c99 --- /dev/null +++ b/SOURCES/0001-scheduler-cert.c-Fix-string-comparison-fixes-CVE-202.patch @@ -0,0 +1,35 @@ +From de4f8c196106033e4c372dce3e91b9d42b0b9444 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: Thu, 26 May 2022 06:27:04 +0200 +Subject: [PATCH] scheduler/cert.c: Fix string comparison (fixes + CVE-2022-26691) + +The previous algorithm didn't expect the strings can have a different +length, so one string can be a substring of the other and such substring +was reported as equal to the longer string. +--- + CHANGES.md | 1 + + scheduler/cert.c | 9 ++++++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/scheduler/cert.c b/scheduler/cert.c +index b268bf1b2..9b65b96c9 100644 +--- a/scheduler/cert.c ++++ b/scheduler/cert.c +@@ -444,5 +444,12 @@ ctcompare(const char *a, /* I - First string */ + b ++; + } + +- return (result); ++ /* ++ * The while loop finishes when *a == '\0' or *b == '\0' ++ * so after the while loop either both *a and *b == '\0', ++ * or one points inside a string, so when we apply bitwise OR on *a, ++ * *b and result, we get a non-zero return value if the compared strings don't match. ++ */ ++ ++ return (result | *a | *b); + } +-- +2.36.1 + diff --git a/SPECS/cups.spec b/SPECS/cups.spec index 8b0b442..cf4a787 100644 --- a/SPECS/cups.spec +++ b/SPECS/cups.spec @@ -17,7 +17,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.3.3%{OP_VER} -Release: 13%{?dist} +Release: 16%{?dist} License: ASL 2.0 Url: http://www.cups.org/ # Apple stopped uploading the new versions into github, use OpenPrinting fork @@ -97,6 +97,12 @@ Patch25: cups-fips-restrict-md5.patch # Memory leak fixes (bug #1964975) # https://github.com/OpenPrinting/cups/pull/322 Patch26: 0001-cups-http-encode-memleaks-fixes-issue-322.patch +# 2073266 - 30-second delays printing to Windows 2016 server via HTTPS +Patch27: 0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch +# 2091997 - manpage update to acknowledge order dependency of -h option +Patch28: 0001-Update-man-pages-for-h-option-Issue-357.patch +# CVE-2022-26691 cups: authorization bypass when using "local" authorization +Patch29: 0001-scheduler-cert.c-Fix-string-comparison-fixes-CVE-202.patch ##### Patches removed because IMHO they aren't no longer needed @@ -325,7 +331,12 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch25 -p1 -b .restrict-md5 # 1964975 - Memory leak fixes %patch26 -p1 -b .memleak-fixes - +# 2073266 - 30-second delays printing to Windows 2016 server via HTTPS +%patch27 -p1 -b .gnutlsbye +# 2091997 - manpage update to acknowledge order dependency of -h option +%patch28 -p1 -b .manpage-update +# CVE-2022-26691 cups: authorization bypass when using "local" authorization +%patch29 -p1 -b .cve26691 %if %{lspp} # LSPP support. @@ -749,6 +760,15 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippeveps.7.gz %changelog +* Thu Jun 16 2022 Zdenek Dohnal - 1:2.3.3op2-16 +- CVE-2022-26691 cups: authorization bypass when using "local" authorization + +* Fri Jun 10 2022 Richard Lescak - 1:2.3.3op2-15 +- 2091997 - update man pages to mention order dependency of -h option + +* Fri Apr 08 2022 Zdenek Dohnal - 1:2.3.3op2-14 +- 2073266 - 30-second delays printing to Windows 2016 server via HTTPS + * Thu Feb 24 2022 Richard Lescak - 1:2.3.3op2-13 - 1964975 - added fix for uninit jump into the leaks patch