X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=cgi-bin%2Fadmin.c;h=86ccb9c15570f558fdda58248f3824e08786339d;hp=bdf42f911ebd8179465bd473c8d3eb3c89f2c63f;hb=0a6827453a0fe4a97ad37a6a1a7ffeb96a10e339;hpb=a41f09e265d6451d22585430ca176ff406d59f9b diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index bdf42f911..86ccb9c15 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -1388,11 +1388,6 @@ do_config_server(http_t *http) /* I - HTTP connection */ 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... @@ -1409,6 +1404,24 @@ do_config_server(http_t *http) /* I - HTTP connection */ return; } +#ifdef HAVE_GSSAPI + /* + * Get authentication settings... + */ + + if (cgiGetVariable("KERBEROS")) + default_auth_type = "Negotiate"; + else + { + default_auth_type = cupsGetOption("DefaultAuthType", num_settings, + settings); + if (!strcasecmp(default_auth_type, "Negotiate")) + default_auth_type = "Basic"; + } + + fprintf(stderr, "DEBUG: DefaultAuthType %s\n", default_auth_type); +#endif /* HAVE_GSSAPI */ + /* * See if the settings have changed... */