[cups.bugs] [MOD] STR #2133: _cupsAdminSetServerSettings() fails the second time

twaugh.redhat twaugh at redhat.com
Wed Nov 29 08:41:11 PST 2006


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

[STR New]

[1.2.7]

After _cupsAdminSetServerSettings() is called, and after the connection to
the server is re-established (due to reloading), a second call to
_cupsAdminSetServerSettings() will fail because it tries to write to fd
-1.

Attached is a small libcups application to demonstrate this.  Adjust the
remote server as necessary.

I get this output:
Password for root on hoopoe? 
8 settings
4 dests
8 settings
../cupstest: failed to set settings: Bad file descriptor

showing that everything worked right up until the second
_cupsAdminSetServerSettings().  A strace shows this near the end:

open("/tmp/456db6fa88f08", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
sendto(-1, "GET /admin/conf/cupsd.conf HTTP/"..., 175, 0, NULL, 0) = -1
EBADF (Bad file descriptor)
sendto(-1, "GET /admin/conf/cupsd.conf HTTP/"..., 175, 0, NULL, 0) = -1
EBADF (Bad file descriptor)
recvfrom(-1, 0x6394cc, 2048, 0, 0, 0)   = -1 EBADF (Bad file descriptor)
close(4)                                = 0
unlink("/tmp/456db6fa88f08")            = 0

Why is it trying to use fd -1?

Link: http://www.cups.org/str.php?L2133
Version: 1.2.6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cupstest.c
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20061129/22cc115f/attachment.c>


More information about the cups-devel mailing list