You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
We're seeing a problem with 1.3.4 and using negotiate for the admin location, setting a printer in accept/reject or stopping/starting breaks with a 401.
To me it looks like the if clause on line 2004 in auth.c needs to handle the case of local authorization.
parts of a debug2 log:
D [19/Nov/2007:08:08:59 +0100] cupsdAuthorize: Authorized as kllin@SU.SE using Local
d [19/Nov/2007:08:08:59 +0100] cupsdIsAuthorized: con->uri="/admin/", con->best=0x80a7ee0(/admin)
d [19/Nov/2007:08:08:59 +0100] cupsdIsAuthorized: level=AUTH_USER, type=Negotiate, satisfy=AUTH_SATISFY_ANY, num_names=1
d [19/Nov/2007:08:08:59 +0100] cupsdIsAuthorized: auth=AUTH_ALLOW...
D [19/Nov/2007:08:08:59 +0100] cupsdIsAuthorized: username="kllin@SU.SE"
E [19/Nov/2007:08:08:59 +0100] Authorized using Basic, expected Negotiate!
d [19/Nov/2007:08:08:42 +0100] cupsdReadClient: Unauthorized request for /admin/
D [19/Nov/2007:08:08:42 +0100] cupsdSendError: 13 code=401 (Unauthorized)
D [19/Nov/2007:08:08:42 +0100] cupsdSendHeader: WWW-Authenticate: Negotiate
relevant parts of cupsd.conf:
DefaultAuthType Negotiate
<Location /admin>
AuthType Default
Encryption Required
Require user @System
Authentication certificate definitions for the Common UNIX
Printing System (CUPS).
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
Copyright 1997-2005 by Easy Software Products.
These coded instructions, statements, and computer programs are the
@@ -24,6 +24,9 @@
int pid; /* Process ID (0 for root certificate) /
char certificate[33]; / 32 hex characters, or 128 bits /
char username[33]; / Authenticated username */
+#ifdef HAVE_GSSAPI
Activity
michaelrsweet commentedon Nov 29, 2007
CUPS.org User: mike
No, we need to update the certificate cache to also handle cached Kerberos credentials, so that we can load and use the cached credentials as needed.
michaelrsweet commentedon Jan 22, 2008
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Jan 22, 2008
"str2606.patch":
Index: client.c
--- client.c (revision 7233)
+++ client.c (working copy)
@@ -4257,6 +4257,10 @@
server_name[1024], /* SERVER_NAME environment variable /
server_port[1024]; / SERVER_PORT environment variable /
ipp_attribute_t *attr; / attributes-natural-language attribute */
+#ifdef HAVE_GSSAPI
+#endif / HAVE_GSSAPI */
/*
@@ -4476,6 +4480,120 @@
snprintf(remote_user, sizeof(remote_user), "REMOTE_USER=%s", con->username);
envp[envc ++] = remote_user;
+
+#ifdef HAVE_GSSAPI
+# if !defined(HAVE_KRB5_CC_NEW_UNIQUE) && !defined(HAVE_HEIMDAL)
+# else
+# ifdef APPLE+
+# ifdef HAVE_KRB5_CC_NEW_UNIQUE+# endif / HAVE_KRB5_CC_NEW_UNIQUE || HAVE_HEIMDAL */
+#endif /* HAVE_GSSAPI */
}
if (con->http.version == HTTP_1_1)
@@ -4589,7 +4707,11 @@
*/
if (con->username[0])
+#ifdef HAVE_GSSAPI
+#else
+#endif /* HAVE_GSSAPI */
cupsdLogMessage(CUPSD_LOG_DEBUG, "[CGI] %s started - PID = %d",
command, pid);
Index: cert.c
--- cert.c (revision 7232)
+++ cert.c (working copy)
@@ -4,7 +4,7 @@
* Copyright 2007 by Apple Inc.
@@ -42,7 +42,8 @@
void
cupsdAddCert(int pid, /* I - Process ID */
{
int i; /* Looping var /
cupsd_cert_t *cert; / Current certificate */
@@ -244,6 +245,16 @@
close(fd);
/*
* Add Kerberos credentials as needed...
*/
+#ifdef HAVE_GSSAPI
+#else
+#endif /* HAVE_GSSAPI */
*/
@@ -282,6 +293,15 @@
else
prev->next = cert->next;
+#ifdef HAVE_GSSAPI
+#endif /* HAVE_GSSAPI */
free(cert);
/*
@@ -412,7 +432,7 @@
*/
if (!RunUser)
}
Index: cert.h
--- cert.h (revision 7232)
+++ cert.h (working copy)
@@ -4,7 +4,7 @@
@@ -24,6 +24,9 @@
int pid; /* Process ID (0 for root certificate) /
char certificate[33]; / 32 hex characters, or 128 bits /
char username[33]; / Authenticated username */
+#ifdef HAVE_GSSAPI
+#endif / HAVE_GSSAPI */
} cupsd_cert_t;
@@ -39,7 +42,8 @@
*/
-extern void cupsdAddCert(int pid, const char *username);
+extern void cupsdAddCert(int pid, const char *username,
extern void cupsdDeleteCert(int pid);
extern void cupsdDeleteAllCerts(void);
extern const char *cupsdFindCert(const char *certificate);
Index: job.c
--- job.c (revision 7233)
+++ job.c (working copy)
@@ -1820,6 +1820,7 @@
cupsdClearString(&job->auth_username);
cupsdClearString(&job->auth_domain);
cupsdClearString(&job->auth_password);
+
#ifdef HAVE_GSSAPI
/*
Destroy the credential cache and clear the KRB5CCNAME env var string.
Index: main.c
--- main.c (revision 7232)
+++ main.c (working copy)
@@ -946,7 +946,7 @@
*/
cupsdDeleteCert(0);
}
/*