- Security: All file, directory, user, and group settings are now stored
in a separate cups-files.conf configuration file that cannot be set
through the CUPS web interface or APIs (STR #4223)
+ - cupsGetPPD3 could return a local PPD instead of the correct remote
+ PPD.
- The scheduler incorrectly advertised auth-info-required for local
queues needing local authentication (STR #4205)
- CUPS 1.6 clients using the ServerName directive in client.conf did not
cups-config
data/testprint
desktop/cups.desktop
+ doc/help/ref-cups-files-conf.html
doc/help/ref-cupsd-conf.html
doc/help/standard.html
doc/index.html
help/ref-classes-conf.html \
help/ref-client-conf.html \
help/ref-cupsd-conf.html \
+ help/ref-cups-files-conf.html \
help/ref-error_log.html \
help/ref-mailto-conf.html \
help/ref-page_log.html \
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH cupsctl 8 "CUPS" "16 July 2012" "Apple Inc."
+.TH cupsctl 8 "CUPS" "12 December 2012" "Apple Inc."
.SH NAME
cupsctl \- configure cupsd.conf options
.SH SYNOPSIS
.nf
cupsctl --no-shared-printers
.fi
-.LP
-Enable printing using the file: pseudo-device:
-.nf
- cupsctl FileDevice=Yes
-.fi
.SH KNOWN ISSUES
You cannot set the Listen or Port directives using \fIcupsctl\fR.
.SH SEE ALSO
* Open the new config file...
*/
- snprintf(filename, sizeof(filename), "%s/cupsd.conf", ServerRoot);
- if ((out = cupsdCreateConfFile(filename, ConfigFilePerm)) == NULL)
+ if ((out = cupsdCreateConfFile(ConfigurationFile, ConfigFilePerm)) == NULL)
{
cupsFileClose(in);
return (HTTP_SERVER_ERROR);
}
- cupsdLogMessage(CUPSD_LOG_INFO, "Installing config file \"%s\"...", filename);
+ cupsdLogMessage(CUPSD_LOG_INFO, "Installing config file \"%s\"...",
+ ConfigurationFile);
/*
* Copy from the request to the new config file...
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to copy to config file \"%s\": %s",
- filename, strerror(errno));
+ ConfigurationFile, strerror(errno));
cupsFileClose(in);
cupsFileClose(out);
- snprintf(filename, sizeof(filename), "%s%s.N", ServerRoot, con->uri + 11);
+ snprintf(filename, sizeof(filename), "%s.N", ConfigurationFile);
cupsdRemoveFile(filename);
return (HTTP_SERVER_ERROR);
cupsFileClose(in);
- if (cupsdCloseCreatedConfFile(out, filename))
+ if (cupsdCloseCreatedConfFile(out, ConfigurationFile))
return (HTTP_SERVER_ERROR);
/*
cupsFileClose(fp);
if (!status)
+ {
+ if (TestConfigFile)
+ printf("\"%s\" contains errors.\n", CupsFilesFile);
+ else
+ syslog(LOG_LPR, "Unable to read \"%s\" due to errors.",
+ CupsFilesFile);
+
return (0);
+ }
}
else if (errno == ENOENT)
cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile);
else
{
- cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", CupsFilesFile,
- strerror(errno));
+ syslog(LOG_LPR, "Unable to open \"%s\": %s", CupsFilesFile,
+ strerror(errno));
return (0);
}
if ((fp = cupsFileOpen(ConfigurationFile, "r")) == NULL)
{
- cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", ConfigurationFile,
- strerror(errno));
+ syslog(LOG_LPR, "Unable to open \"%s\": %s", ConfigurationFile,
+ strerror(errno));
return (0);
}
cupsFileClose(fp);
if (!status)
+ {
+ if (TestConfigFile)
+ printf("\"%s\" contains errors.\n", ConfigurationFile);
+ else
+ syslog(LOG_LPR, "Unable to read \"%s\" due to errors.",
+ ConfigurationFile);
+
return (0);
+ }
RunUser = getuid();
Group, 1, 1) < 0 ||
cupsdCheckPermissions(ServerRoot, "ssl", 0700, RunUser,
Group, 1, 0) < 0 ||
- cupsdCheckPermissions(ServerRoot, "cupsd.conf", ConfigFilePerm, RunUser,
+ cupsdCheckPermissions(ConfigurationFile, NULL, ConfigFilePerm, RunUser,
+ Group, 0, 0) < 0 ||
+ cupsdCheckPermissions(CupsFilesFile, NULL, ConfigFilePerm, RunUser,
Group, 0, 0) < 0 ||
cupsdCheckPermissions(ServerRoot, "classes.conf", 0600, RunUser,
Group, 0, 0) < 0 ||
static int log_linesize = 0; /* Size of line for output file */
static char *log_line = NULL; /* Line for output file */
+#ifdef HAVE_VSYSLOG
+static const int syslevels[] = /* SYSLOG levels... */
+ {
+ 0,
+ LOG_EMERG,
+ LOG_ALERT,
+ LOG_CRIT,
+ LOG_ERR,
+ LOG_WARNING,
+ LOG_NOTICE,
+ LOG_INFO,
+ LOG_DEBUG,
+ LOG_DEBUG
+ };
+#endif /* HAVE_VSYSLOG */
+
/*
* Local functions...
if ((TestConfigFile || !ErrorLog) && level <= CUPSD_LOG_WARN)
{
va_start(ap, message);
+#ifdef HAVE_VSYSLOG
+ vsyslog(LOG_LPR | syslevels[level], message, ap);
+#else
vfprintf(stderr, message, ap);
putc('\n', stderr);
+#endif /* HAVE_VSYSLOG */
va_end(ap);
return (1);
'D',
'd'
};
-#ifdef HAVE_VSYSLOG
- static const int syslevels[] = /* SYSLOG levels... */
- {
- 0,
- LOG_EMERG,
- LOG_ALERT,
- LOG_CRIT,
- LOG_ERR,
- LOG_WARNING,
- LOG_NOTICE,
- LOG_INFO,
- LOG_DEBUG,
- LOG_DEBUG
- };
-#endif /* HAVE_VSYSLOG */
#ifdef HAVE_VSYSLOG
*/
if (!cupsdReadConfiguration())
- {
- if (TestConfigFile)
- printf("%s contains errors\n", ConfigurationFile);
- else
- syslog(LOG_LPR, "Unable to read configuration file \'%s\' - exiting!",
- ConfigurationFile);
return (1);
- }
else if (TestConfigFile)
{
- printf("%s is OK\n", ConfigurationFile);
+ printf("\"%s\" is OK.\n", CupsFilesFile);
+ printf("\"%s\" is OK.\n", ConfigurationFile);
return (0);
}