Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
auth-info-required not set on browsed printer #2750
When using CUPS 1.3.6 as a client to a remote CUPS queue, the auth-info-required attribute is not set on the client's queue.
so that authentication is required before a job can be submitted.
Although auth_info_required has (presumably) been set in the printer structure, no 'auth-info-required' attribute has been created for it.
CUPS.org User: twaugh.redhat
I think I've found the problem. With 1.3.7, here is what happens:
The client CUPS scheduler sees the browsed printer, with 'auth-info-required' set.
The CUPS client, lp, submits the job on the local machine, and the client CUPS scheduler asks for authentication at that stage, due to the remote printer requiring authentication. This is performed using SO_PEERCRED, and results in an auth file containing only the username -- no password.
The local 'ipp' backend starts, and sees AUTH_USERNAME='tim' and AUTH_PASSWORD='' (empty string) in its environment. As AUTH_PASSWORD is set, it uses that (the empty string) as the password in the password callback and of course this fails. The main request then fails and so auth-info-required is set to 'negotiate', which is incorrect.
The fix is to get the 'ipp' backend to avoid sending the empty string as the password. Patch attached -- and with this patch, I can finally get proxy authentication working with CUPS.
diff -up cups-1.3.7/backend/ipp.c.fix-auth cups-1.3.7/backend/ipp.c