- Fixed admin.cgi handling of DefaultAuthType (bug #432478, STR #2703).

This commit is contained in:
Tim Waugh 2008-02-12 16:40:09 +00:00
parent 75e0a3395e
commit c6372b5325
2 changed files with 37 additions and 0 deletions

32
cups-str2703.patch Normal file
View File

@ -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))

View File

@ -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 <twaugh@redhat.com> 1:1.3.5-5
- Fixed admin.cgi handling of DefaultAuthType (bug #432478, STR #2703).
* Tue Feb 5 2008 Tim Waugh <twaugh@redhat.com> 1:1.3.5-4
- Fix compilation of SO_PEERCRED support.
- Include fixes from svn up to revision 7287. No longer need str2650 or