(Issue #30, Issue #31)
- The scheduler no longer adds the local hostname to the ServerAlias list
(Issue #32)
+- Added `LogFileGroup` directive in "cups-files.conf" to control the group
+ owner of log files (Issue #34)
- Added `--with-max-log-size` configure option (Issue #35)
- Added `--enable-sync-on-close` configure option (Issue #37)
- Added `--with-error-policy` configure option (Issue #38)
\fBGroup \fIgroup-name-or-number\fR
Specifies the group name or ID that will be used when executing external programs.
The default group is operating system specific but is usually "lp" or "nobody".
+.RE
+.\"#LogFileGroup
+.TP 5
+\fBLogFileGroup \fIgroup-name-or-number\fR
+Specifies the group name or ID that will be used for log files.
+The default group is operating system specific but is usually "lp" or "nobody".
.\"#LogFilePerm
.TP 5
\fBLogFilePerm \fImode\fR
ListenBackLog = SOMAXCONN;
LogDebugHistory = 200;
LogFilePerm = CUPS_DEFAULT_LOG_FILE_PERM;
+ LogFileGroup = Group;
LogLevel = CUPSD_LOG_WARN;
LogTimeFormat = CUPSD_TIME_STANDARD;
MaxClients = 100;
}
}
}
+ else if (!_cups_strcasecmp(line, "LogFileGroup") && value)
+ {
+ /*
+ * Group ID to log as...
+ */
+
+ if (isdigit(value[0]))
+ LogFileGroup = (gid_t)atoi(value);
+ else
+ {
+ endgrent();
+ group = getgrnam(value);
+
+ if (group != NULL)
+ LogFileGroup = group->gr_gid;
+ else
+ {
+ cupsdLogMessage(CUPSD_LOG_ERROR,
+ "Unknown LogFileGroup \"%s\" on line %d of %s.", value,
+ linenum, CupsFilesFile);
+ if (FatalErrors & CUPSD_FATAL_CONFIG)
+ return (0);
+ }
+ }
+ }
else if (!_cups_strcasecmp(line, "PassEnv") && value)
{
/*
/* Permissions for config files */
LogFilePerm VALUE(0644U);
/* Permissions for log files */
+VAR gid_t LogFileGroup VALUE(0);
+ /* Group ID for log files */
VAR cupsd_loglevel_t LogLevel VALUE(CUPSD_LOG_WARN);
/* Error log level */
VAR cupsd_time_t LogTimeFormat VALUE(CUPSD_TIME_STANDARD);
* Change ownership and permissions of non-device logs...
*/
- fchown(cupsFileNumber(*lf), RunUser, Group);
+ fchown(cupsFileNumber(*lf), RunUser, LogFileGroup);
fchmod(cupsFileNumber(*lf), LogFilePerm);
}
}
* Change ownership and permissions of non-device logs...
*/
- fchown(cupsFileNumber(*lf), RunUser, Group);
+ fchown(cupsFileNumber(*lf), RunUser, LogFileGroup);
fchmod(cupsFileNumber(*lf), LogFilePerm);
}