]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/admin.c
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / admin.c
index de4bcd1123850a669e0cbabe68d035f65885f666..dd8e25f98b644e6472654f47170f8c1875ceaa69 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: admin.c 6304 2007-02-22 22:06:23Z mike $"
+ * "$Id: admin.c 6361 2007-03-19 16:01:28Z mike $"
  *
  *   Administration CGI for the Common UNIX Printing System (CUPS).
  *
@@ -360,8 +360,8 @@ do_add_rss_subscription(http_t *http)       /* I - HTTP connection */
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
                NULL, user);
 
-  ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient",
-               NULL, rss_uri);
+  ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
+               "notify-recipient-uri", NULL, rss_uri);
   ippAddStrings(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events",
                 num_events, NULL, events);
   ippAddInteger(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
@@ -1834,6 +1834,10 @@ do_config_server(http_t *http)           /* I - HTTP connection */
                        *remote_printers,
                                        /* REMOTE_PRINTERS value */
                        *share_printers,/* SHARE_PRINTERS value */
+#ifdef HAVE_GSSAPI
+                       *default_auth_type,
+                                       /* DefaultAuthType value */
+#endif /* HAVE_GSSAPI */
                        *user_cancel_any;
                                        /* USER_CANCEL_ANY value */
 
@@ -1842,12 +1846,17 @@ do_config_server(http_t *http)          /* I - HTTP connection */
     * Get the checkbox values from the form...
     */
 
-    debug_logging   = cgiGetVariable("DEBUG_LOGGING") ? "1" : "0";
-    remote_admin    = cgiGetVariable("REMOTE_ADMIN") ? "1" : "0";
-    remote_any      = cgiGetVariable("REMOTE_ANY") ? "1" : "0";
-    remote_printers = cgiGetVariable("REMOTE_PRINTERS") ? "1" : "0";
-    share_printers  = cgiGetVariable("SHARE_PRINTERS") ? "1" : "0";
-    user_cancel_any = cgiGetVariable("USER_CANCEL_ANY") ? "1" : "0";
+    debug_logging     = cgiGetVariable("DEBUG_LOGGING") ? "1" : "0";
+    remote_admin      = cgiGetVariable("REMOTE_ADMIN") ? "1" : "0";
+    remote_any        = cgiGetVariable("REMOTE_ANY") ? "1" : "0";
+    remote_printers   = cgiGetVariable("REMOTE_PRINTERS") ? "1" : "0";
+    share_printers    = cgiGetVariable("SHARE_PRINTERS") ? "1" : "0";
+    user_cancel_any   = cgiGetVariable("USER_CANCEL_ANY") ? "1" : "0";
+#ifdef HAVE_GSSAPI
+    default_auth_type = cgiGetVariable("KERBEROS") ? "Negotiate" : "Basic";
+
+    fprintf(stderr, "DEBUG: DefaultAuthType %s\n", default_auth_type);
+#endif /* HAVE_GSSAPI */
 
    /*
     * Get the current server settings...
@@ -1878,6 +1887,11 @@ do_config_server(http_t *http)           /* I - HTTP connection */
                                               num_settings, settings)) ||
         strcmp(share_printers, cupsGetOption(CUPS_SERVER_SHARE_PRINTERS,
                                              num_settings, settings)) ||
+#ifdef HAVE_GSSAPI
+        !cupsGetOption("DefaultAuthType", num_settings, settings) ||
+       strcmp(default_auth_type, cupsGetOption("DefaultAuthType",
+                                               num_settings, settings)) ||
+#endif /* HAVE_GSSAPI */
         strcmp(user_cancel_any, cupsGetOption(CUPS_SERVER_USER_CANCEL_ANY,
                                               num_settings, settings)))
     {
@@ -1900,6 +1914,10 @@ do_config_server(http_t *http)           /* I - HTTP connection */
                                    share_printers, num_settings, &settings);
       num_settings = cupsAddOption(CUPS_SERVER_USER_CANCEL_ANY,
                                    user_cancel_any, num_settings, &settings);
+#ifdef HAVE_GSSAPI
+      num_settings = cupsAddOption("DefaultAuthType", default_auth_type,
+                                   num_settings, &settings);
+#endif /* HAVE_GSSAPI */
 
       if (!_cupsAdminSetServerSettings(http, num_settings, settings))
       {
@@ -2473,6 +2491,14 @@ do_menu(http_t *http)                    /* I - HTTP connection */
                            settings)) != NULL && atoi(val))
     cgiSetVariable("USER_CANCEL_ANY", "CHECKED");
 
+#ifdef HAVE_GSSAPI
+  cgiSetVariable("HAVE_GSSAPI", "1");
+
+  if ((val = cupsGetOption("DefaultAuthType", num_settings,
+                           settings)) != NULL && !strcasecmp(val, "Negotiate"))
+    cgiSetVariable("KERBEROS", "CHECKED");
+#endif /* HAVE_GSSAPI */
+
   cupsFreeOptions(num_settings, settings);
 
  /*
@@ -3225,5 +3251,5 @@ match_string(const char *a,               /* I - First string */
 
     
 /*
- * End of "$Id: admin.c 6304 2007-02-22 22:06:23Z mike $".
+ * End of "$Id: admin.c 6361 2007-03-19 16:01:28Z mike $".
  */