Blob Blame History Raw
diff -up cups-1.3.5/cgi-bin/admin.c.str2703 cups-1.3.5/cgi-bin/admin.c
--- cups-1.3.5/cgi-bin/admin.c.str2703	2007-11-30 07:00:59.000000000 +0000
+++ cups-1.3.5/cgi-bin/admin.c	2008-02-12 16:31:37.000000000 +0000
@@ -1373,13 +1373,16 @@ do_config_server(http_t *http)		/* I - H
     */
 
     if (cgiGetVariable("KERBEROS"))
-      default_auth_type = "Negotiate";
+      default_auth_type = strdup ("Negotiate");
     else
     {
-      default_auth_type = cupsGetOption("DefaultAuthType", num_settings,
-                                        settings);
+      default_auth_type = strdup (cupsGetOption("DefaultAuthType", num_settings,
+						settings));
       if (!strcasecmp(default_auth_type, "Negotiate"))
-        default_auth_type = "Basic";
+      {
+	free (default_auth_type);
+        default_auth_type = strdup ("Basic");
+      }
     }
 
     fprintf(stderr, "DEBUG: DefaultAuthType %s\n", default_auth_type);
@@ -1429,6 +1432,7 @@ do_config_server(http_t *http)		/* I - H
 #ifdef HAVE_GSSAPI
       num_settings = cupsAddOption("DefaultAuthType", default_auth_type,
                                    num_settings, &settings);
+      free (default_auth_type);
 #endif /* HAVE_GSSAPI */
 
       if (!cupsAdminSetServerSettings(http, num_settings, settings))