summaryrefslogtreecommitdiff
path: root/cgi-bin
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2016-08-09 18:11:24 +0200
committerDidier Raboud <odyx@debian.org>2021-05-27 09:06:18 +0200
commit7f1bf8f979b8b1fbe9bddb0839c953fdfbf7fbcc (patch)
treefb5d42464c1b3e1004f05b9e74e793f30cf148ff /cgi-bin
parentec010413c8d7b10f782996b3b0dd30c675adc7ad (diff)
Debian: Move cupsd.conf.default from SERVERROOT to DATADIR
Origin: vendor Bug: https://github.com/apple/cups/issues/4342 Bug: https://github.com/OpenPrinting/cups/pull/26 Bug-Debian: https://bugs.debian.org/640124
Diffstat (limited to 'cgi-bin')
-rw-r--r--cgi-bin/admin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index c6489389f..5ff750190 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1636,6 +1636,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
int ch; /* Character from file */
char filename[1024]; /* Filename */
const char *server_root; /* Location of config files */
+ const char *data_dir; /* Location of data files */
/*
@@ -1719,7 +1720,10 @@ do_config_server(http_t *http) /* I - HTTP connection */
* well...
*/
- strlcat(filename, ".default", sizeof(filename));
+ if ((data_dir = getenv("CUPS_DATADIR")) == NULL)
+ data_dir = CUPS_DATADIR;
+
+ snprintf(filename, sizeof(filename), "%s/cupsd.conf.default",data_dir);
if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
(cupsd = cupsFileOpen(filename, "r")) != NULL)