RHEL-15309 cupsd fails to open cups-files.conf and the resulting error message is lost
Resolves: RHEL-15309
This commit is contained in:
parent
f78ec4e753
commit
084c53b6b3
@ -0,0 +1,36 @@
|
||||
From db9cecdd932e58c51d2d659f63415ad47d151717 Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Fri, 1 Sep 2023 17:11:54 +0200
|
||||
Subject: [PATCH] scheduler/conf.c: Print to stderr if we don't open
|
||||
cups-files.conf
|
||||
|
||||
In case cupsd can't open the cups-files.conf, the error message is lost
|
||||
if journal and syslog don't exist or work on system (usually in
|
||||
containers).
|
||||
|
||||
Log the error into stderr at this place to get the error message if
|
||||
needed.
|
||||
---
|
||||
scheduler/conf.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/scheduler/conf.c b/scheduler/conf.c
|
||||
index b18535162..4fa7eb1df 100644
|
||||
--- a/scheduler/conf.c
|
||||
+++ b/scheduler/conf.c
|
||||
@@ -811,11 +811,7 @@ cupsdReadConfiguration(void)
|
||||
cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile);
|
||||
else
|
||||
{
|
||||
-#ifdef HAVE_SYSTEMD_SD_JOURNAL_H
|
||||
- sd_journal_print(LOG_ERR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno));
|
||||
-#else
|
||||
- syslog(LOG_LPR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno));
|
||||
-#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */
|
||||
+ fprintf(stderr, "Unable to read \"%s\" - %s\n", CupsFilesFile, strerror(errno));
|
||||
|
||||
return (0);
|
||||
}
|
||||
--
|
||||
2.41.0
|
||||
|
@ -166,6 +166,8 @@ Patch84: 0001-cups-strlcpy-handle-zero-size.patch
|
||||
Patch85: 0001-Require-authentication-for-CUPS-Get-Document.patch
|
||||
# RHEL-14933 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off"
|
||||
Patch86: cups-preservejob-leak.patch
|
||||
# RHEL-15309 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||
Patch87: 0001-scheduler-conf.c-Print-to-stderr-if-we-don-t-open-cu.patch
|
||||
|
||||
Patch1000: cups-lspp.patch
|
||||
|
||||
@ -469,6 +471,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
%patch85 -p1 -b .get-document-auth
|
||||
# RHEL-14933 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off"
|
||||
%patch86 -p1 -b .preservejob-leak
|
||||
# RHEL-15309 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||
%patch87 -p1 -b .message-stderr
|
||||
|
||||
sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
|
||||
|
||||
@ -897,6 +901,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%changelog
|
||||
* Fri Nov 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-55
|
||||
- RHEL-14933 cupsd memory leak in cupsdDeleteJob() with "PreserveJobHistory Off"
|
||||
- RHEL-15309 cupsd fails to open cups-files.conf and the resulting error message is lost
|
||||
|
||||
* Tue Sep 12 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-54
|
||||
- RHEL-2612 - cups pulls an unneeded dependency on python3
|
||||
|
Loading…
Reference in New Issue
Block a user