]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Always use Negotiate or PeerCred for Kerberized printing.
authorMichael R Sweet <michaelrsweet@gmail.com>
Thu, 10 May 2018 20:33:07 +0000 (16:33 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Thu, 10 May 2018 20:33:07 +0000 (16:33 -0400)
scheduler/client.c

index 1c4760bfd883a846357ca668de13cb59b48835d3..07197007f3fbb005ffc5191b8d299fc0361a5349 100644 (file)
@@ -2362,14 +2362,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));
     }