From: Michael R Sweet Date: Thu, 10 May 2018 20:35:37 +0000 (-0400) Subject: Always use Negotiate or PeerCred for Kerberized printing. X-Git-Tag: v2.3b5~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5fee178d99b73b15f487df779c80a71646aacbf;p=thirdparty%2Fcups.git Always use Negotiate or PeerCred for Kerberized printing. --- diff --git a/scheduler/client.c b/scheduler/client.c index 95c34877d4..95b9db6807 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -2105,14 +2105,16 @@ cupsdSendHeader( auth_str[0] = '\0'; if (auth_type == CUPSD_AUTH_BASIC) + { strlcpy(auth_str, "Basic realm=\"CUPS\"", sizeof(auth_str)); + } else if (auth_type == CUPSD_AUTH_NEGOTIATE) { -#ifdef AF_LOCAL +#if defined(SO_PEERCRED) && defined(AF_LOCAL) if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL) - strlcpy(auth_str, "Basic realm=\"CUPS\"", sizeof(auth_str)); + strlcpy(auth_str, "PeerCred", sizeof(auth_str)); else -#endif /* AF_LOCAL */ +#endif /* SO_PEERCRED && AF_LOCAL */ strlcpy(auth_str, "Negotiate", sizeof(auth_str)); }