[cups.bugs] [LOW] STR #2956: Set-Allowed-Users could lead to a loss of printers and/or classes

Roland rojon at altern.org
Thu Sep 25 14:57:41 PDT 2008


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

[STR New]

If somebody is entering a value list of users in the Set Allowed Users
Dialog which contains a trailing space or comma, then after a restart or
reload of cupsd this leads to lost printer-entries, due to empty AllowUser
or DenyUser directives written to printers.conf / classes.conf.
To avoid this, I suggest the following patch for cgi-bin/admin.c:

--- cgi-bin/admin.c-7982        Thu Sep 25 23:44:30 2008
+++ cgi-bin/admin.c             Thu Sep 25 23:45:45 2008
@@ -2597,6 +2597,9 @@

       while (*ptr == ',' || isspace(*ptr & 255))
        ptr ++;
+
+      if (!*ptr)
+        break;

       if (*ptr == '\'' || *ptr == '\"')
       {

Link: http://www.cups.org/str.php?L2956
Version: 1.3-current





More information about the cups mailing list