From c6372b5325c74ab588d9b1eb5caaabd0caac95db Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Feb 12 2008 16:40:09 +0000 Subject: - Fixed admin.cgi handling of DefaultAuthType (bug #432478, STR #2703). --- diff --git a/cups-str2703.patch b/cups-str2703.patch new file mode 100644 index 0000000..d1b3e24 --- /dev/null +++ b/cups-str2703.patch @@ -0,0 +1,32 @@ +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 2008-02-12 16:36:28.000000000 +0000 ++++ cups-1.3.5/cgi-bin/admin.c 2008-02-12 16:37:38.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)) diff --git a/cups.spec b/cups.spec index d03d2d8..149fccb 100644 --- a/cups.spec +++ b/cups.spec @@ -42,6 +42,7 @@ Patch14: cups-lpr-help.patch Patch15: cups-peercred.patch Patch16: cups-pid.patch Patch17: cups-foomatic-recommended.patch +Patch18: cups-str2703.patch Patch19: cups-eggcups.patch Patch20: cups-getpass.patch Patch21: cups-driverd-timeout.patch @@ -156,6 +157,7 @@ lpd emulation. %patch15 -p1 -b .peercred %patch16 -p1 -b .pid %patch17 -p1 -b .foomatic-recommended +%patch18 -p1 -b .str2703 %patch19 -p1 -b .eggcups %patch20 -p1 -b .getpass %patch21 -p1 -b .driverd-timeout @@ -452,6 +454,9 @@ rm -rf $RPM_BUILD_ROOT %{cups_serverbin}/daemon/cups-lpd %changelog +* Tue Feb 12 2008 Tim Waugh 1:1.3.5-5 +- Fixed admin.cgi handling of DefaultAuthType (bug #432478, STR #2703). + * Tue Feb 5 2008 Tim Waugh 1:1.3.5-4 - Fix compilation of SO_PEERCRED support. - Include fixes from svn up to revision 7287. No longer need str2650 or