[cups-devel] [UNKN] STR #4528: ~/.cups/client.conf SeverName is never read

Sebastien Luttringer noreply at cups.org
Tue Nov 18 18:08:42 PST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The attached client.conf only works when puts in CUPS_SERVERROOT (/etc/cups
in my case).
That's not an override issue, because removing /etc/cups/client.conf
doesn't help. Using environment variables works as expected.

I dug into the source code and my understanding is that the first call of
cups_read_client_conf() in _cupsSetDefaults() (it reads
/etc/cups/client.conf)  set cg->server to "localhost" if this file doesn't
set ServerName directive.

As a consequence, when cups_read_client_conf() is called the second time to
read ~/.cups/client.conf, it ignores ServerName directive.

A solution would be to remove (!cg->server[0] || !cg->ipp_port) in
cups_read_client_conf(). That's also have the side effect to let user
override global default ServerName. Which is common behavior of $HOME
dotfiles.

I would propose a git patch but I was unable to clone the git repository; I
got a 403.

Link: https://www.cups.org/str.php?L4528
Version: 2.0.1
Attachment: https://www.cups.org/strfiles.php/3415/client.conf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUa/uqAAoJENujp6sI12Ij3RcP/j91VFole49XxQ/0GQ12pAJc
YSToXmxVh1twOKpv01ic8KlZWwELCS38hJpTCgHa8KVNM3l/fRf4/dG4xN+WB6II
sil9QSkO0BxmBhaoHbESKGLdlPtgdGXGLZ8rTA+oR6yJ/tdqSUn0np/R/4fhUd/B
B1rwz7Ma39SXKuvULdqTdd+CeD0ATHn35ZiM18IrUVvdwOpo6PpagrGlagq0/UHQ
IcF8Z6PyPKsXcq8QZ+zlFmmNwq14KWNXprzq3WxPpEg1orbrhlp2mDO0pitw/RAU
4bZQDSBI0dmFcQ62KYWVL/ubPPP3kDPUc3nQZG8sFockAXu2es08a7fyVcXrDwR7
09asKaP8Egicbd7Ai3RrfXG4wRfWTufKHMI58uFPJO9b6n3JaNzEleTobYef8tMd
lGl6jqMCnSmkC1ba8ZHcAqxG49NQ6dSOchdSL5aLhs+S6tDuSTxTvQcVqQCK/9Sc
MyE41DR/gcD0dWNHJ3zQh3ld5Ash1lf3qqSnIEt/wBOPiRjeJY9gixRR3IVnony+
t6jBJvobGdJWJBbpL4KcCtO2Xh9jN0VzoN+04Fs66JfwbS1cQO4V7CfVU8fPnBJ1
EtCSYN/yNMQ5sW12TyuxKNqGcrvNV3lBtr3sRBo4ZRbFAhecdG6QyBRotp+1RPRL
8KKsurWe1aqCegwSUkSS
=y4cP
-----END PGP SIGNATURE-----




More information about the cups mailing list