Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2189919

Summary: CGI scripts don't work with local Negotiate authentication
Product: Red Hat Enterprise Linux 9 Reporter: Zdenek Dohnal <zdohnal>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Dancak <pdancak>
Severity: high Docs Contact:
Priority: high    
Version: 9.0CC: bmason, orion, pdancak, zdohnal
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pdancak: needinfo+
pdancak: needinfo+
pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cups-2.3.3op2-18.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:39:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2023-06-26   

Comment 9 Orion Poplawski 2023-10-18 15:01:27 UTC
So, cups-2.3.3op2-18.el9 is better, but if I try to upload a PPD file I get:

Secure Connection Failed

An error occurred during a connection to HOST:631. PR_CONNECT_RESET_ERROR

Error code: PR_CONNECT_RESET_ERROR

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

Log:
Oct 18 08:53:43 cupsd[43259]: [Client 48] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=43940, file=21
Oct 18 08:53:43 cupsd[43259]: [Client 48] Waiting for CGI data.
Oct 18 08:53:43 cupsd[43259]: [Client 49] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
Oct 18 08:53:43 cupsd[43259]: [Client 49] Closing connection.
Oct 18 08:53:43 cupsd[43259]: cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
Oct 18 08:53:43 cupsd[43259]: [Client 48] CGI data ready to be sent.
Oct 18 08:53:43 cupsd[43259]: [Client 48] con->http=0x5651556c9910
Oct 18 08:53:43 cupsd[43259]: [Client 48] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_CHUNKED, data_remaining=0, response=(nil)(), pipe_pid=43940, file=21
Oct 18 08:53:43 cupsd[43259]: [Client 48] Waiting for CGI data.
Oct 18 08:53:43 cupsd[43259]: REQUEST 10.11.1.142 - user@REALM "POST /admin HTTP/1.1" 200 3971 - -
Oct 18 08:53:43 cupsd[43259]: [Client 48] Sending 0-length chunk.
Oct 18 08:53:43 cupsd[43259]: [Client 48] Flushing write buffer.
Oct 18 08:53:43 cupsd[43259]: [Client 48] New state is HTTP_STATE_WAITING
Oct 18 08:53:43 cupsd[43259]: [Client 48] Waiting for request.
Oct 18 08:53:43 cupsd[43259]: cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
Oct 18 08:53:43 cupsd[43259]: PID 43940 (/usr/lib/cups/cgi-bin/admin.cgi) exited with no errors.
Oct 18 08:53:53 cupsd[43259]: [Client 48] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
Oct 18 08:53:53 cupsd[43259]: [Client 48] Closing connection.
Oct 18 08:53:53 cupsd[43259]: cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
Oct 18 08:53:53 cupsd[43259]: [Client 48] Waiting for socket close.
Oct 18 08:53:53 cupsd[43259]: [Client 48] Closing on EOF.
Oct 18 08:53:53 cupsd[43259]: [Client 48] Closing connection.
Oct 18 08:53:53 cupsd[43259]: cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
Oct 18 08:53:54 cupsd[43259]: cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
Oct 18 08:53:54 cupsd[43259]: [Client 50] Server address is "10.10.11.1".
Oct 18 08:53:54 cupsd[43259]: [Client 50] Accepted from 10.11.1.142:39628 (IPv4)
Oct 18 08:53:54 cupsd[43259]: [Client 50] Waiting for request.
Oct 18 08:53:54 cupsd[43259]: [Client 50] Connection now encrypted.
Oct 18 08:53:54 cupsd[43259]: [Client 50] POST /admin HTTP/1.1
Oct 18 08:53:54 cupsd[43259]: cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
Oct 18 08:53:54 cupsd[43259]: [Client 50] Read: status=200, state=6
Oct 18 08:53:54 cupsd[43259]: [Client 50] No authentication data provided.
Oct 18 08:53:54 cupsd[43259]: cupsdIsAuthorized: username=""
Oct 18 08:53:54 cupsd[43259]: REQUEST 10.11.1.142 - - "POST /admin HTTP/1.1" 401 0 - -
Oct 18 08:53:54 cupsd[43259]: [Client 50] cupsdSendHeader: code=401, type="text/html", auth_type=0
Oct 18 08:53:54 cupsd[43259]: [Client 50] WWW-Authenticate: Negotiate
Oct 18 08:53:54 cupsd[43259]: [Client 50] Closing connection.
Oct 18 08:53:54 cupsd[43259]: cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
Oct 18 08:53:54 cupsd[43259]: [Client 50] Waiting for socket close.
Oct 18 08:53:54 cupsd[43259]: [Client 50] Closing on unexpected HTTP read state HTTP_STATE_POST_SEND.
Oct 18 08:53:54 cupsd[43259]: [Client 50] Closing connection.
Oct 18 08:53:54 cupsd[43259]: cupsdSetBusyState: newbusy="Not busy", busy="Not busy"

Comment 10 Orion Poplawski 2023-10-18 15:17:45 UTC
And if I try to add a printer with lpadmin I get:

lpadmin: Unable to connect to server: Success

strace shows:

access("/run/cups/cups.sock", R_OK)     = 0

but no further attempts to communicate with cups.

Comment 11 Orion Poplawski 2023-10-18 15:25:58 UTC
If I try to add a printer through the web gui it keeps prompting me for the make over and over.  I see:

Make: Dell
Model: Dell Color Printer S3840cdn, driverless, cups-filters 1.28.7 (en)

but after add printer is goes back to asking for the make.

Comment 12 Orion Poplawski 2023-10-19 02:37:26 UTC
So apologies for piling on this bug report.  Ignore comment #10 - that's user error.  I think comment #11 has more to do with being unable to pull a ppd from the printer, but not really sure.  In any case it probably deserves its own report.  But the first issue in comment #9 does seem like it may be related to auth issues with the cgi script.  But happy to file something new for that as well.

Comment 13 Zdenek Dohnal 2023-10-19 05:37:56 UTC
Hi Orion,

thank you for checking this!

Sure, it would be great if you filed a ticket via https://access.redhat.com if you have subscription to get the issue properly prioritized. Otherwise, you can access https://issues.redhat.com and file the issue there, but I can't vouch for solving it in timely manner :( .

Either way, thank you so much for your comments!

Comment 15 errata-xmlrpc 2023-11-07 08:39:54 UTC
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 (Moderate: cups security and bug fix update), 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/RHSA-2023:6596