[cups-devel] [UNKN] STR #4539: cups client ignores ServerName directive

Guillaume Rousse noreply at cups.org
Fri Dec 5 06:32:32 PST 2014


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

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

[STR New]

I'm not able to print without a local cups server anymore, as cups client
(either from command-line, or from gnome printing subsystem) ignores
ServerName directive in ~/.cups/client.conf:

[guillaume at beria ~]$ lpstat -a
lpstat: Bad file descriptor

Using an explicit command-line option works, tough:
[guillaume at beria ~]$ lpstat -h my.print.server -a
c0211a accepting requests since Sun Nov 30 06:50:32 2014
...

[guillaume at beria cauldron]$ strace lpstat -a
...

Using strace with first command shows than the client tries to connect to
localhost, with IPv6 first, IPv4 second:
 
open("/home/guillaume/.cups/client.conf", O_RDONLY) = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
read(5, "ServerName my.print.server\n#ServerNa"..., 4096) = 146
read(5, "", 4096)                       = 0
close(5)                                = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 5
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0
setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fcntl(5, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(5, {sa_family=AF_INET6, sin6_port=htons(631), inet_pton(AF_INET6,
"::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS
(Operation now in progress) <- first localhost connection attempt, IPv6
fcntl(5, F_SETFL, O_RDWR)               = 0
poll([{fd=5, events=POLLIN|POLLOUT}], 1, 250) = 1 ([{fd=5,
revents=POLLIN|POLLOUT|POLLERR|POLLHUP}])
getpeername(5, 0x7fff5393dea0, [256])   = -1 ENOTCONN (Transport endpoint
is not connected)
close(5)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 5
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(5, SOL_SOCKET, SO_REUSEPORT, [1], 4) = 0
setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fcntl(5, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(5, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in
progress) <- second localhost connection attempt, IPv4
fcntl(5, F_SETFL, O_RDWR)               = 0
poll([{fd=5, events=POLLIN|POLLOUT}], 1, 250) = 1 ([{fd=5,
revents=POLLIN|POLLOUT|POLLERR|POLLHUP}])
getpeername(5, 0x7fff5393dea0, [256])   = -1 ENOTCONN (Transport endpoint
is not connected)
close(5)                                = 0
close(-1)                               = -1 EBADF (Bad file descriptor)

I've read the various comments about client.conf file getting deprecated,
however it is still documented in current release. And if support for this
configuration file is removed, does it imply also than a local cups server
is becoming mandatory, whereas it was not previously ?

I'm using cups 2.0.1, on a 64bits Linux, it if matters.
Downstream bug report: https://bugs.mageia.org/show_bug.cgi?id=14592

Link: https://www.cups.org/str.php?L4539
Version: 2.0.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUgcH/AAoJENujp6sI12IjF98P/0xWbRsVE0GA3monpJPgsEoQ
vYEJSNiLvQidilOAqNu0U9/dTHHmYKJS5hnljVlCCYvDxXweCkLRPXHZSDJhCSWi
06JiRgmoJ4J+ruP3ENhTSSOQTqvfOWJ/UcA1XkXt2W72BJ+7eXhIxp+8oFSxD7lj
1Pk4NYux/KqAuzmlbz/3lofjQJpm0BcQc2ZHV8LRoEjPwb9eEzL0U02sgnBaxiOc
NEl1jAvBn9mkFWkqbvPNsY5FyJv6I+o9HvNKLVCDGQePrawd5X+bMfscjm4ETUUF
RmPju519iQEvPwDKYUjX2RzEA4GUcat7r4rB2UD/TdX7T0dZX2X/DvSUH3ZSTJIh
LH0MytGvioolOIYGpD9EpDTNe8O3/GeqqxeKb8+VndZ6up4Teyk1D0aJl8TTGywB
+lXEPTfyEwYwZodwOZM1eiS1jFzc36Z3F0yGuKgQwo9tnn63BCVx1+YE1bD1uFqb
+o8hcxNgq0w3livm68CAktIB7+rt4zyoBZS9YB7gLX5QcurXeUVeHXgTWCXqe1aI
bScj6thK2jbHW+rGpmPGrGsSUZE3HYwMni+fthF0xvQX7Gq5wD5oXwugAQCZb6yj
Z462bjnfpAn0/b5/+POtCJ7kxYlYF9toqfPXt+Mtby3MDn0TIE9qXd3Z7VPDqwc6
250GlyxhbPH+cQJkQKPJ
=3fAb
-----END PGP SIGNATURE-----




More information about the cups-devel mailing list