[cups-devel] RFC: should cupsd fall back using default config values?

Johannes Meixner jsmeix at suse.de
Tue Nov 25 01:41:05 PST 2014


at least up to CUPS 1.7.5 the cupsd fails to start when
/etc/cups/cupsd.conf is empty or missing:
# cp -p /etc/cups/cupsd.conf /etc/cups/cupsd.conf.save

# cat /dev/null >/etc/cups/cupsd.conf

# /usr/sbin/cupsd -f

# cat /var/log/cups/error_log
X ... No valid Listen or Port lines were found in the configuration file.

# rm /etc/cups/cupsd.conf

# /usr/sbin/cupsd -f
cupsd: Unable to open "/etc/cups/cupsd.conf": No such file or directory

I assume this behaviour is intentional but don't know why.
What is the reason that cupsd fails to start in this cases?

I think when /etc/cups/cupsd.conf is empty or missing, cupsd could
nevertheless start using the default config values as fallback
because I think for the user there should be no difference between
using a default /etc/cups/cupsd.conf versus when /etc/cups/cupsd.conf
is empty or missing - or what do I overlook here?

For CUPS 1.7.5 only the "Listen" value must explicitly exist,
all other config values can be missing:
# cat /etc/cups/cupsd.conf /etc/cups/cups-files.conf | egrep -v '^$|^ *#'
Listen localhost:631

# /usr/sbin/cupsd -f
[works well now]

I don't think it is a security issue if cupsd uses "Listen localhost:631"
as fallback when the "Listen" value was not explicitly specified?

Kind Regards
Johannes Meixner
SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer

More information about the cups mailing list