/*
- * "$Id: main.c 6689 2007-07-18 23:52:15Z mike $"
+ * "$Id: main.c 6755 2007-08-01 19:02:47Z mike $"
*
* Scheduler main loop for the Common UNIX Printing System (CUPS).
*
PSQUpdateQuotaProc = dlsym(PSQLibRef, PSQLibFuncName);
#endif /* __APPLE__ && HAVE_DLFCN_H */
+#ifdef HAVE_GSSAPI
+# ifdef __APPLE__
+ /*
+ * If the weak-linked GSSAPI/Kerberos library is not present, don't try
+ * to use it...
+ */
+
+ if (krb5_init_context != NULL)
+# endif /* __APPLE__ */
+
+ /*
+ * Setup a Kerberos context for the scheduler to use...
+ */
+
+ if (krb5_init_context(&KerberosContext))
+ cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize Kerberos context");
+#endif /* HAVE_GSSAPI */
+
/*
* Startup the server...
*/
cupsdStopSystemMonitor();
#endif /* __APPLE__ */
+#ifdef HAVE_GSSAPI
+# ifdef __APPLE__
+ /*
+ * If the weak-linked GSSAPI/Kerberos library is not present, don't try
+ * to use it...
+ */
+
+ if (krb5_init_context != NULL)
+# endif /* __APPLE__ */
+
+ /*
+ * Free the scheduler's Kerberos context...
+ */
+
+ krb5_free_context(KerberosContext);
+#endif /* HAVE_GSSAPI */
+
#ifdef HAVE_LAUNCHD
/*
* Update the launchd KeepAlive file as needed...
/*
- * End of "$Id: main.c 6689 2007-07-18 23:52:15Z mike $".
+ * End of "$Id: main.c 6755 2007-08-01 19:02:47Z mike $".
*/