summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authorMichael R Sweet <michaelrsweet@gmail.com>2018-05-10 16:35:37 -0400
committerMichael R Sweet <michaelrsweet@gmail.com>2018-05-10 16:35:37 -0400
commite5fee178d99b73b15f487df779c80a71646aacbf (patch)
tree2d44a3c5874621557f99e69cdb39372d29f9ea01 /scheduler
parentdfe5f3b95cfde0a59fdebf03e789f7cdc680c380 (diff)
Always use Negotiate or PeerCred for Kerberized printing.
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/scheduler/client.c b/scheduler/client.c
index 95c34877d..95b9db680 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));
}