[prev in list] [next in list] [prev in thread] [next in thread]
List: cups-commit
Subject: [cups.commit] [CUPS] r10714 - in trunk: conf scheduler
From: cups-dev () easysw ! com
Date: 2012-11-30 22:16:50
Message-ID: 11486-cups.commit () news ! easysw ! com
[Download RAW message or body]
Author: mike
Date: 2012-11-30 14:16:49 -0800 (Fri, 30 Nov 2012)
New Revision: 10714
Log:
More fixes for STR #4223...
Modified:
trunk/conf/cups-files.conf.in
trunk/scheduler/conf.c
trunk/scheduler/main.c
Modified: trunk/conf/cups-files.conf.in
===================================================================
--- trunk/conf/cups-files.conf.in 2012-11-26 21:54:54 UTC (rev 10713)
+++ trunk/conf/cups-files.conf.in 2012-11-30 22:16:49 UTC (rev 10714)
@@ -39,7 +39,7 @@
#DataDir @CUPS_DATADIR@
# Location of the static web content served by the scheduler...
-#DocRoot @CUPS_DOCROOT@
+#DocumentRoot @CUPS_DOCROOT@
# Location of the file logging all messages produced by the scheduler and any
# helper programs; may be the name "syslog". If not an absolute path, the value
Modified: trunk/scheduler/conf.c
===================================================================
--- trunk/scheduler/conf.c 2012-11-26 21:54:54 UTC (rev 10713)
+++ trunk/scheduler/conf.c 2012-11-30 22:16:49 UTC (rev 10714)
@@ -140,7 +140,6 @@
{ "PreserveJobFiles", &JobFiles, CUPSD_VARTYPE_TIME },
{ "PreserveJobHistory", &JobHistory, CUPSD_VARTYPE_TIME },
{ "ReloadTimeout", &ReloadTimeout, CUPSD_VARTYPE_TIME },
- { "RemoteRoot", &RemoteRoot, CUPSD_VARTYPE_STRING },
{ "RIPCache", &RIPCache, CUPSD_VARTYPE_STRING },
{ "RootCertDuration", &RootCertDuration, CUPSD_VARTYPE_TIME },
{ "ServerAdmin", &ServerAdmin, CUPSD_VARTYPE_STRING },
@@ -163,6 +162,7 @@
{ "LPDConfigFile", &LPDConfigFile, CUPSD_VARTYPE_STRING },
{ "PageLog", &PageLog, CUPSD_VARTYPE_STRING },
{ "Printcap", &Printcap, CUPSD_VARTYPE_STRING },
+ { "RemoteRoot", &RemoteRoot, CUPSD_VARTYPE_STRING },
{ "RequestRoot", &RequestRoot, CUPSD_VARTYPE_STRING },
{ "ServerBin", &ServerBin, CUPSD_VARTYPE_PATHNAME },
#ifdef HAVE_SSL
@@ -941,6 +941,13 @@
}
/*
+ * Make sure ConfigFilePerm and LogFilePerm have sane values...
+ */
+
+ ConfigFilePerm &= 0664;
+ LogFilePerm &= 0664;
+
+ /*
* Open the system log for cupsd if necessary...
*/
@@ -3301,6 +3308,7 @@
!_cups_strcasecmp(line, "PageLog") ||
!_cups_strcasecmp(line, "Printcap") ||
!_cups_strcasecmp(line, "PrintcapFormat") ||
+ !_cups_strcasecmp(line, "RemoteRoot") ||
!_cups_strcasecmp(line, "RequestRoot") ||
!_cups_strcasecmp(line, "ServerBin") ||
!_cups_strcasecmp(line, "ServerCertificate") ||
Modified: trunk/scheduler/main.c
===================================================================
--- trunk/scheduler/main.c 2012-11-26 21:54:54 UTC (rev 10713)
+++ trunk/scheduler/main.c 2012-11-30 22:16:49 UTC (rev 10714)
@@ -233,35 +233,6 @@
cupsdSetStringf(&ConfigurationFile, "%s/%s", current, argv[i]);
free(current);
}
-
- if (!CupsFilesFile)
- {
- char *filename, /* Copy of cupsd.conf filename */
- *slash; /* Final slash in cupsd.conf filename */
- size_t len; /* Size of buffer */
-
- len = strlen(ConfigurationFile) + 15;
- if ((filename = malloc(len)) == NULL)
- {
- _cupsLangPrintf(stderr,
- _("cupsd: Unable to get path to "
- "cups-files.conf file."));
- return (1);
- }
-
- strlcpy(filename, ConfigurationFile, len);
- if ((slash = strrchr(filename, '/')) == NULL)
- {
- _cupsLangPrintf(stderr,
- _("cupsd: Unable to get path to "
- "cups-files.conf file."));
- return (1);
- }
-
- strlcpy(slash, "/cups-files.conf", len - (slash - filename));
- cupsdSetString(&CupsFilesFile, filename);
- free(filename);
- }
break;
case 'f' : /* Run in foreground... */
@@ -350,9 +321,35 @@
}
if (!ConfigurationFile)
- {
cupsdSetString(&ConfigurationFile, CUPS_SERVERROOT "/cupsd.conf");
- cupsdSetString(&CupsFilesFile, CUPS_SERVERROOT "/cups-files.conf");
+
+ if (!CupsFilesFile)
+ {
+ char *filename, /* Copy of cupsd.conf filename */
+ *slash; /* Final slash in cupsd.conf filename */
+ size_t len; /* Size of buffer */
+
+ len = strlen(ConfigurationFile) + 15;
+ if ((filename = malloc(len)) == NULL)
+ {
+ _cupsLangPrintf(stderr,
+ _("cupsd: Unable to get path to "
+ "cups-files.conf file."));
+ return (1);
+ }
+
+ strlcpy(filename, ConfigurationFile, len);
+ if ((slash = strrchr(filename, '/')) == NULL)
+ {
+ _cupsLangPrintf(stderr,
+ _("cupsd: Unable to get path to "
+ "cups-files.conf file."));
+ return (1);
+ }
+
+ strlcpy(slash, "/cups-files.conf", len - (slash - filename));
+ cupsdSetString(&CupsFilesFile, filename);
+ free(filename);
}
/*
_______________________________________________
cups-commit mailing list
cups-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/cups-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic