| 2145 | */ |
| 2146 | |
| 2147 | static void |
| 2148 | do_menu(http_t *http) /* I - HTTP connection */ |
| 2149 | { |
| 2150 | int num_settings; /* Number of server settings */ |
| 2151 | cups_option_t *settings; /* Server settings */ |
| 2152 | const char *val; /* Setting value */ |
| 2153 | |
| 2154 | |
| 2155 | /* |
| 2156 | * Get the current server settings... |
| 2157 | */ |
| 2158 | |
| 2159 | if (!cupsAdminGetServerSettings(http, &num_settings, &settings)) |
| 2160 | { |
| 2161 | cgiSetVariable("SETTINGS_MESSAGE", |
| 2162 | cgiText(_("Unable to open cupsd.conf file:"))); |
| 2163 | cgiSetVariable("SETTINGS_ERROR", cupsLastErrorString()); |
| 2164 | } |
| 2165 | |
| 2166 | if ((val = cupsGetOption(CUPS_SERVER_DEBUG_LOGGING, num_settings, |
| 2167 | settings)) != NULL && atoi(val)) |
| 2168 | cgiSetVariable("DEBUG_LOGGING", "CHECKED"); |
| 2169 | else |
| 2170 | cgiSetVariable("DEBUG_LOGGING", ""); |
| 2171 | |
| 2172 | if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, num_settings, |
| 2173 | settings)) != NULL && atoi(val)) |
| 2174 | cgiSetVariable("REMOTE_ADMIN", "CHECKED"); |
| 2175 | else |
| 2176 | cgiSetVariable("REMOTE_ADMIN", ""); |
| 2177 | |
| 2178 | if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings, |
| 2179 | settings)) != NULL && atoi(val)) |
| 2180 | cgiSetVariable("REMOTE_ANY", "CHECKED"); |
| 2181 | else |
| 2182 | cgiSetVariable("REMOTE_ANY", ""); |
| 2183 | |
| 2184 | if ((val = cupsGetOption(CUPS_SERVER_SHARE_PRINTERS, num_settings, |
| 2185 | settings)) != NULL && atoi(val)) |
| 2186 | cgiSetVariable("SHARE_PRINTERS", "CHECKED"); |
| 2187 | else |
| 2188 | cgiSetVariable("SHARE_PRINTERS", ""); |
| 2189 | |
| 2190 | if ((val = cupsGetOption(CUPS_SERVER_USER_CANCEL_ANY, num_settings, |
| 2191 | settings)) != NULL && atoi(val)) |
| 2192 | cgiSetVariable("USER_CANCEL_ANY", "CHECKED"); |
| 2193 | else |
| 2194 | cgiSetVariable("USER_CANCEL_ANY", ""); |
| 2195 | |
| 2196 | #ifdef HAVE_GSSAPI |
| 2197 | cgiSetVariable("HAVE_GSSAPI", "1"); |
| 2198 | |
| 2199 | if ((val = cupsGetOption("DefaultAuthType", num_settings, |
| 2200 | settings)) != NULL && !_cups_strcasecmp(val, "Negotiate")) |
| 2201 | cgiSetVariable("KERBEROS", "CHECKED"); |
| 2202 | else |
| 2203 | #endif /* HAVE_GSSAPI */ |
| 2204 | cgiSetVariable("KERBEROS", ""); |
no test coverage detected