[cups.bugs] [HIGH] STR #2603: CUPS on RHEL unable to disable sanitize_title

eric barkley eric.barkley at hp.com
Sat Nov 17 06:35:33 PST 2007


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

[STR New]

The syntax for our print job looks like:

    lp -d PQ123 -t IDENTIFIER=JOBID123 /tmp/test.lp

JOBID123 identifies the queue on the IBM mainframe, and the "=" is
required.
  
RHEL 4 (and RHEL 3) Cups backend lpd is stripping  off the "=" from the
job title before sending the data, replacing the "=" with "_".  This is
preventing us from using these print queues.

As lp currently works, sanitize_title is initialized to true.  If -o
sanitize_title is passed in the command, it executes the assignment:
         sanitize_title = !value[0] || !strcasecmp(value, "on") ||
         !strcasecmp(value, "yes") || !strcasecmp(value, "true");
  
This only serves to test if the user passed -o sanitize_title in the
affirmative, then it will set sanitize_title to true.  There is not a way
to set it to false.  One way to address this solution might be to follow
this assigment with its boolean opposite, for example:

cups-1.3.4/backend/lpd.c:

      else if (!strcasecmp(name, "sanitize_title"))
      {
       /*
        * Set sanitize title...
        */

        sanitize_title = !value[0] || !strcasecmp(value, "on") ||
         !strcasecmp(value, "yes") || !strcasecmp(value, "true");

        sanitize_title = !value[0] || !strcasecmp(value, "off") ||
         !strcasecmp(value, "no")   || !strcasecmp(value, "false");
      }

Link: http://www.cups.org/str.php?L2603
Version: 1.1-current





More information about the cups mailing list