-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix negotiate authentication between CGIs and scheduler #19
Changes from all commits
d4521ed
61ad778
f629d07
0563a28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2109,18 +2109,13 @@ cupsdSendHeader( | |
} | ||
else if (auth_type == CUPSD_AUTH_NEGOTIATE) | ||
{ | ||
#if defined(SO_PEERCRED) && defined(AF_LOCAL) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will break macOS clients. We never send Kerberos credentials over a domain socket for a native (IPP) client since we use the login UID to do authorization. Need to think about how this can be managed... :/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't aware how these changes can affect macOS. The 'PeerCred' mech will still be in WWW-Authenticate string together with 'Negotiate' and 'Local', added just below: https://github.com/scabrero/cups/blob/web-interface-negotiate-fix/scheduler/client.c#L2135 Then the
|
||
if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL) | ||
strlcpy(auth_str, "PeerCred", sizeof(auth_str)); | ||
else | ||
#endif /* SO_PEERCRED && AF_LOCAL */ | ||
strlcpy(auth_str, "Negotiate", sizeof(auth_str)); | ||
} | ||
|
||
if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE && !con->is_browser && !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost")) | ||
if (con->best && !con->is_browser && !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost")) | ||
{ | ||
/* | ||
* Add a "trc" (try root certification) parameter for local non-Kerberos | ||
* Add a "trc" (try root certification) parameter for local | ||
* requests when the request requires system group membership - then the | ||
* client knows the root certificate can/should be used. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably just be: