Package: cups-browsed
Version: 1.0.71-1
Severity: minor
Tags: patch

Hi,

cups-browsed checks the permissions of cups' unix socket, looking for
IRWXO. Not only it appears to be useless to check for the execute bit,
but this check always fails with the default Debian config; which
makes cups-browsed use a TCP socket instead of the unix one.

Attached patch makes cups-browsed check only for read and write
permissions on the unix socket.

What do you think?

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
Index: cups-filters-1.0.71-1/utils/cups-browsed.c
===================================================================
--- cups-filters-1.0.71-1/utils/cups-browsed.c
+++ cups-filters-1.0.71-1/utils/cups-browsed.c
@@ -3321,9 +3321,10 @@
 #endif
   if (DomainSocket != NULL) {
     struct stat sockinfo;               /* Domain socket information */
     if (!stat(DomainSocket, &sockinfo) &&
-        (sockinfo.st_mode & S_IRWXO) == S_IRWXO)
+        (sockinfo.st_mode & S_IROTH) == S_IROTH &&
+        (sockinfo.st_mode & S_IWOTH) == S_IWOTH)
       setenv("CUPS_SERVER", DomainSocket, 1);
     else
       setenv("CUPS_SERVER", "localhost", 1);
   } else

Reply via email to