return (NULL);
}
- if (sscanf(line, "*%40s%*[ \t]%40[^/]", option, choice) != 2)
+ if (sscanf(line, "*%40s%*[ \t]%40[^:/]", option, choice) != 2)
{
snprintf(line, sizeof(line),
_cupsLangString(language,
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
if (!value && strncmp(line, "</", 2))
- continue;
+ value = line + strlen(line);
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
{
const char *remotep = cupsGetOption("BrowseRemoteProtocols",
num_settings, settings);
+ if (!localp)
+ localp = cupsGetOption("BrowseLocalProtocols", cupsd_num_settings,
+ cupsd_settings);
+
+ if (!remotep)
+ remotep = cupsGetOption("BrowseRemoteProtocols", cupsd_num_settings,
+ cupsd_settings);
+
if (new_remote_printers && new_share_printers)
cupsFilePuts(temp,
"# Enable printer sharing and shared printers.\n");
else if ((((in_admin_location || in_conf_location || in_root_location) &&
remote_admin >= 0) ||
(in_root_location && share_printers >= 0)) &&
- (!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny") ||
+ (((!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny")) &&
+ !strcasecmp(value, "@LOCAL")) ||
!strcasecmp(line, "Order")))
continue;
else if (in_cancel_job == 2)
cupsFilePuts(temp, "# Restrict access to the configuration files...\n");
cupsFilePuts(temp, "<Location /admin/conf>\n"
- " AuthType Basic\n"
+ " AuthType Default\n"
" Require user @SYSTEM\n"
" Order allow,deny\n");
"CUPS-Add-Class CUPS-Delete-Class "
"CUPS-Accept-Jobs CUPS-Reject-Jobs "
"CUPS-Set-Default CUPS-Add-Device CUPS-Delete-Device>\n"
- " AuthType Basic\n"
+ " AuthType Default\n"
" Require user @SYSTEM\n"
" Order deny,allow\n"
"</Limit>\n");