major_status; /* Major status code */
gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
/* Output token */
- _cups_globals_t *cg = _cupsGlobals(); /* Thread globals */
# ifdef __APPLE__
if (http->gssname == GSS_C_NO_NAME)
{
- if (!cg->gss_service_name[0])
- _cupsSetDefaults();
-
- http->gssname = cups_gss_getname(http, cg->gss_service_name);
+ http->gssname = cups_gss_getname(http, _cupsGSSServiceName());
}
if (http->gssctx != GSS_C_NO_CONTEXT)
extern void _cupsGlobalLock(void);
extern _cups_globals_t *_cupsGlobals(void);
extern void _cupsGlobalUnlock(void);
+# ifdef HAVE_GSSAPI
+extern const char *_cupsGSSServiceName(void);
+# endif /* HAVE_GSSAPI */
extern int _cupsNextDelay(int current, int *previous);
extern void _cupsSetDefaults(void);
extern void _cupsSetError(ipp_status_t status, const char *message,
* cupsSetUser() - Set the default user name.
* cupsUser() - Return the current user's name.
* _cupsGetPassword() - Get a password from the user.
+ * _cupsGSSServiceName() - Get the GSS (Kerberos) service name.
* _cupsSetDefaults() - Set the default server, port, and encryption.
* cups_read_client_conf() - Read a client.conf file.
*/
}
+/*
+ * '_cupsGSSServiceName()' - Get the GSS (Kerberos) service name.
+ */
+
+const char *
+_cupsGSSServiceName(void)
+{
+ _cups_globals_t *cg = _cupsGlobals(); /* Thread globals */
+
+
+ if (!cg->gss_service_name[0])
+ _cupsSetDefaults();
+
+ return (cg->gss_service_name);
+}
+
+
/*
* '_cupsSetDefaults()' - Set the default server, port, and encryption.
*/