/*
- * "$Id$"
- *
* Authentication functions for CUPS.
*
* Copyright 2007-2014 by Apple Inc.
* This function should be called in response to a @code HTTP_STATUS_UNAUTHORIZED@
* status, prior to resubmitting your request.
*
- * @since CUPS 1.1.20/OS X 10.4@
+ * @since CUPS 1.1.20/macOS 10.4@
*/
int /* O - 0 on success, -1 on error */
_cups_globals_t *cg; /* Global data */
- DEBUG_printf(("cupsDoAuthentication(http=%p, method=\"%s\", resource=\"%s\")",
- http, method, resource));
+ DEBUG_printf(("cupsDoAuthentication(http=%p, method=\"%s\", resource=\"%s\")", (void *)http, method, resource));
if (!http)
http = _cupsConnect();
char encode[33], /* MD5 buffer */
digest[1024]; /* Digest auth data */
-
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "realm", realm);
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "nonce", nonce);
* to use it...
*/
- if (gss_init_sec_context == NULL)
+ if (&gss_init_sec_context == NULL)
{
DEBUG_puts("1_cupsSetNegotiateAuthString: Weak-linked GSSAPI/Kerberos "
"framework is not present");
authsize = sizeof(http->_authstring);
}
- strlcpy(http->authstring, "Negotiate ", authsize);
+ strlcpy(http->authstring, "Negotiate ", (size_t)authsize);
httpEncode64_2(http->authstring + 10, authsize - 10, output_token.value,
(int)output_token.length);
# endif /* HAVE_AUTHORIZATION_H */
- DEBUG_printf(("7cups_local_auth(http=%p) hostaddr=%s, hostname=\"%s\"",
- http, httpAddrString(http->hostaddr, filename, sizeof(filename)), http->hostname));
+ DEBUG_printf(("7cups_local_auth(http=%p) hostaddr=%s, hostname=\"%s\"", (void *)http, httpAddrString(http->hostaddr, filename, sizeof(filename)), http->hostname));
/*
* See if we are accessing localhost...
if (
# ifdef HAVE_GSSAPI
- strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
+ _cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
# endif /* HAVE_GSSAPI */
# ifdef HAVE_AUTHORIZATION_H
!httpGetSubField2(http, HTTP_FIELD_WWW_AUTHENTICATE, "authkey",
filename, strerror(errno)));
# ifdef HAVE_GSSAPI
- if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
+ if (!_cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
{
/*
* Kerberos required, don't try the root certificate...
return (1);
#endif /* WIN32 || __EMX__ */
}
-
-
-/*
- * End of "$Id$".
- */