summaryrefslogtreecommitdiff
path: root/scheduler/auth.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-05-18 22:09:10 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-05-18 22:09:10 +0000
commit68b10830fa5eca364644a90bb564821698611ff7 (patch)
tree7919621a55ced69185e55ac7a136957da1ab6e89 /scheduler/auth.c
parent536bc2c6525745b914830119c65824faf63e15e8 (diff)
Merge changes from CUPS 1.4svn-r8659
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1516 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/auth.c')
-rw-r--r--scheduler/auth.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/scheduler/auth.c b/scheduler/auth.c
index d72f3064d..89545e975 100644
--- a/scheduler/auth.c
+++ b/scheduler/auth.c
@@ -1052,7 +1052,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
if (!con->gss_creds)
cupsdLogMessage(CUPSD_LOG_DEBUG,
- "cupsdAuthorize: No credentials!");
+ "cupsdAuthorize: No delegated credentials!");
if (major_status == GSS_S_CONTINUE_NEEDED)
cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status,
@@ -1584,7 +1584,11 @@ cupsdCopyKrb5Creds(cupsd_client_t *con) /* I - Client connection */
peersize = sizeof(peercred);
+# ifdef __APPLE__
+ if (getsockopt(con->http.fd, 0, LOCAL_PEERCRED, &peercred, &peersize))
+# else
if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &peercred, &peersize))
+# endif /* __APPLE__ */
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to get peer credentials - %s",
strerror(errno));
@@ -1592,6 +1596,10 @@ cupsdCopyKrb5Creds(cupsd_client_t *con) /* I - Client connection */
return (NULL);
}
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "cupsdCopyKrb5Creds: Copying credentials for UID %d...",
+ CUPSD_UCRED_UID(peercred));
+
krb5_ipc_client_set_target_uid(CUPSD_UCRED_UID(peercred));
if ((error = krb5_cc_default(KerberosContext, &peerccache)) != 0)