File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,6 +513,16 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
513513 int userlen ; /* Username:password length */
514514
515515
516+ /*
517+ * Only allow Basic if enabled...
518+ */
519+
520+ if (type != CUPSD_AUTH_BASIC )
521+ {
522+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Basic authentication is not enabled." );
523+ return ;
524+ }
525+
516526 authorization += 5 ;
517527 while (isspace (* authorization & 255 ))
518528 authorization ++ ;
@@ -558,7 +568,6 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
558568 * Validate the username and password...
559569 */
560570
561- if (type == CUPSD_AUTH_BASIC )
562571 {
563572#if HAVE_LIBPAM
564573 /*
@@ -727,6 +736,16 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
727736 /* Output token for username */
728737 gss_name_t client_name ; /* Client name */
729738
739+ /*
740+ * Only allow Kerberos if enabled...
741+ */
742+
743+ if (type != CUPSD_AUTH_NEGOTIATE )
744+ {
745+ cupsdLogClient (con , CUPSD_LOG_ERROR , "Kerberos authentication is not enabled." );
746+ return ;
747+ }
748+
730749# ifdef __APPLE__
731750 /*
732751 * If the weak-linked GSSAPI/Kerberos library is not present, don't try
You can’t perform that action at this time.
0 commit comments