]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/ipp.c
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / ipp.c
index 2ba651038f4231a15673aedb5917030162d579a8..eb71f7c7bf7530ff1a1fded7872563ded8488b6e 100644 (file)
@@ -1,28 +1,19 @@
 /*
- * "$Id: ipp.c 6593 2007-06-21 21:30:49Z mike $"
+ * "$Id: ipp.c 6678 2007-07-16 18:03:35Z mike $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
+ *   Copyright 2007 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   This file contains Kerberos support code, copyright 2006 by
  *   Jelmer Vernooij.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -256,9 +247,12 @@ cupsdProcessIPPRequest(
 
   con->response = ippNew();
 
-  con->response->request.status.version[0] = con->request->request.op.version[0];
-  con->response->request.status.version[1] = con->request->request.op.version[1];
-  con->response->request.status.request_id = con->request->request.op.request_id;
+  con->response->request.status.version[0] =
+      con->request->request.op.version[0];
+  con->response->request.status.version[1] =
+      con->request->request.op.version[1];
+  con->response->request.status.request_id =
+      con->request->request.op.request_id;
 
  /*
   * Then validate the request header and required attributes...
@@ -356,7 +350,8 @@ cupsdProcessIPPRequest(
 
       if (charset)
        ippAddString(con->response, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-                    "attributes-charset", NULL, charset->values[0].string.text);
+                    "attributes-charset", NULL,
+                    charset->values[0].string.text);
       else
        ippAddString(con->response, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
                     "attributes-charset", NULL, DefaultCharset);
@@ -630,7 +625,8 @@ cupsdProcessIPPRequest(
 
               send_ipp_status(con, IPP_OPERATION_NOT_SUPPORTED,
                              _("%s not supported!"),
-                             ippOpString(con->request->request.op.operation_id));
+                             ippOpString(
+                                 con->request->request.op.operation_id));
              break;
        }
       }
@@ -780,7 +776,7 @@ accept_jobs(cupsd_client_t  *con,   /* I - Client connection */
             ipp_attribute_t *uri)      /* I - Printer or class URI */
 {
   http_status_t        status;                 /* Policy status */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  cups_ptype_t dtype;                  /* Destination type (printer/class) */
   cupsd_printer_t *printer;            /* Printer data */
 
 
@@ -832,7 +828,8 @@ accept_jobs(cupsd_client_t  *con,   /* I - Client connection */
   {
     cupsdSaveAllPrinters();
 
-    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" now accepting jobs (\"%s\").",
+    cupsdLogMessage(CUPSD_LOG_INFO,
+                    "Printer \"%s\" now accepting jobs (\"%s\").",
                     printer->name, get_username(con));
   }
 
@@ -929,7 +926,7 @@ add_class(cupsd_client_t  *con,             /* I - Client connection */
     */
 
     if ((pclass = cupsdFindPrinter(resource + 9)) != NULL &&
-        !(pclass->type & CUPS_PRINTER_REMOTE))
+        !(pclass->type & CUPS_PRINTER_DISCOVERED))
     {
      /*
       * Yes, return an error...
@@ -969,7 +966,7 @@ add_class(cupsd_client_t  *con,             /* I - Client connection */
     pclass = cupsdAddClass(resource + 9);
     modify = 0;
   }
-  else if (pclass->type & CUPS_PRINTER_REMOTE)
+  else if (pclass->type & CUPS_PRINTER_DISCOVERED)
   {
    /*
     * Rename the remote class to "Class"...
@@ -1005,8 +1002,9 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
   if ((attr = ippFindAttribute(con->request, "printer-is-accepting-jobs",
                                IPP_TAG_BOOLEAN)) != NULL)
   {
-    cupsdLogMessage(CUPSD_LOG_INFO, "Setting %s printer-is-accepting-jobs to %d (was %d.)",
-               pclass->name, attr->values[0].boolean, pclass->accepting);
+    cupsdLogMessage(CUPSD_LOG_INFO,
+                    "Setting %s printer-is-accepting-jobs to %d (was %d.)",
+                    pclass->name, attr->values[0].boolean, pclass->accepting);
 
     pclass->accepting = attr->values[0].boolean;
     cupsdAddPrinterHistory(pclass);
@@ -1037,8 +1035,8 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
       return;
     }
 
-    cupsdLogMessage(CUPSD_LOG_INFO, "Setting %s printer-state to %d (was %d.)", pclass->name,
-                    attr->values[0].integer, pclass->state);
+    cupsdLogMessage(CUPSD_LOG_INFO, "Setting %s printer-state to %d (was %d.)",
+                    pclass->name, attr->values[0].integer, pclass->state);
 
     if (attr->values[0].integer == IPP_PRINTER_STOPPED)
       cupsdStopPrinter(pclass, 0);
@@ -1173,9 +1171,9 @@ add_file(cupsd_client_t *con,             /* I - Connection to client */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                 "add_file(con=%p[%d], job=%d, filetype=%s/%s, compression=%d)",
-                 con, con ? con->http.fd : -1, job->id, filetype->super,
-                 filetype->type, compression);
+                 "add_file(con=%p[%d], job=%d, filetype=%s/%s, "
+                 "compression=%d)", con, con ? con->http.fd : -1, job->id,
+                 filetype->super, filetype->type, compression);
 
  /*
   * Add the file to the job...
@@ -1386,11 +1384,16 @@ add_job(cupsd_client_t  *con,           /* I - Client connection */
     return (NULL);
   }
 
-  if (!check_quotas(con, printer))
+  if ((i = check_quotas(con, printer)) < 0)
   {
     send_ipp_status(con, IPP_NOT_POSSIBLE, _("Quota limit reached."));
     return (NULL);
   }
+  else if (i == 0)
+  {
+    send_ipp_status(con, IPP_NOT_AUTHORIZED, _("Not allowed to print."));
+    return (NULL);
+  }
 
  /*
   * Create the job and set things up...
@@ -2195,7 +2198,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
     */
 
     if ((printer = cupsdFindClass(resource + 10)) != NULL &&
-        !(printer->type & CUPS_PRINTER_REMOTE))
+        !(printer->type & CUPS_PRINTER_DISCOVERED))
     {
      /*
       * Yes, return an error...
@@ -2235,7 +2238,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
     printer = cupsdAddPrinter(resource + 10);
     modify  = 0;
   }
-  else if (printer->type & CUPS_PRINTER_REMOTE)
+  else if (printer->type & CUPS_PRINTER_DISCOVERED)
   {
    /*
     * Rename the remote printer to "Printer@server"...
@@ -2407,8 +2410,8 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
       return;
     }
 
-    cupsdLogMessage(CUPSD_LOG_INFO, "Setting %s printer-state to %d (was %d.)", printer->name,
-               attr->values[0].integer, printer->state);
+    cupsdLogMessage(CUPSD_LOG_INFO, "Setting %s printer-state to %d (was %d.)",
+                    printer->name, attr->values[0].integer, printer->state);
 
     if (attr->values[0].integer == IPP_PRINTER_STOPPED)
       cupsdStopPrinter(printer, 0);
@@ -2605,7 +2608,8 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
          cupsdLogMessage(CUPSD_LOG_INFO,
                          "Setting %s port-monitor to \"%s\" (was \"%s\".)",
                          printer->name, ppdattr->value,
-                         printer->port_monitor ? printer->port_monitor : "none");
+                         printer->port_monitor ? printer->port_monitor
+                                               : "none");
 
          if (strcmp(ppdattr->value, "none"))
            cupsdSetString(&printer->port_monitor, ppdattr->value);
@@ -3072,7 +3076,7 @@ cancel_job(cupsd_client_t  *con,  /* I - Client connection */
                resource[HTTP_MAX_URI]; /* Resource portion of URI */
   int          port;                   /* Port portion of URI */
   cupsd_job_t  *job;                   /* Job information */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  cups_ptype_t dtype;                  /* Destination type (printer/class) */
   cupsd_printer_t *printer;            /* Printer data */
 
 
@@ -3533,7 +3537,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
                      "quota limit exceeded.",
                      username, p->name, p->info);
       q->page_count = 2; /* force quota exceeded failure */
-      return (0);
+      return (-1);
     }
     else if (q->page_count == -2) /* quota disabled for user */
     {
@@ -3542,7 +3546,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
                      "printing disabled for user.",
                      username, p->name, p->info);
       q->page_count = 2; /* force quota exceeded failure */
-      return (0);
+      return (-1);
     }
     else if (q->page_count == -1) /* quota access error */
     {
@@ -3551,7 +3555,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
                      "unable to determine quota limit.",
                      username, p->name, p->info);
       q->page_count = 2; /* force quota exceeded failure */
-      return (0);
+      return (-1);
     }
     else if (q->page_count < 0) /* user not found or other error */
     {
@@ -3560,7 +3564,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
                      "user disabled / missing quota.",
                      username, p->name, p->info);
       q->page_count = 2; /* force quota exceeded failure */
-      return (0);
+      return (-1);
     }
     else /* page within user limits */
     {
@@ -3577,7 +3581,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
       cupsdLogMessage(CUPSD_LOG_ERROR,
                       "Unable to allocate quota data for user \"%s\"!",
                       username);
-      return (0);
+      return (-1);
     }
 
     if ((q->k_count >= p->k_limit && p->k_limit) ||
@@ -3585,7 +3589,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
     {
       cupsdLogMessage(CUPSD_LOG_INFO, "User \"%s\" is over the quota limit...",
                       username);
-      return (0);
+      return (-1);
     }
   }
 
@@ -3660,7 +3664,8 @@ copy_attribute(
        else
        {
           for (i = 0; i < attr->num_values; i ++)
-           toattr->values[i].string.text = _cupsStrAlloc(attr->values[i].string.text);
+           toattr->values[i].string.text =
+               _cupsStrAlloc(attr->values[i].string.text);
        }
         break;
 
@@ -3718,7 +3723,8 @@ copy_attribute(
               toattr->values[i].string.charset =
                  toattr->values[0].string.charset;
 
-           toattr->values[i].string.text = _cupsStrAlloc(attr->values[i].string.text);
+           toattr->values[i].string.text =
+               _cupsStrAlloc(attr->values[i].string.text);
           }
         }
         break;
@@ -4134,7 +4140,7 @@ copy_model(cupsd_client_t *con,           /* I - Client connection */
 {
   fd_set       input;                  /* select() input set */
   struct timeval timeout;              /* select() timeout */
-  int          maxfd;                  /* Maximum file descriptor for select() */
+  int          maxfd;                  /* Max file descriptor for select() */
   char         tempfile[1024];         /* Temporary PPD file */
   int          tempfd;                 /* Temporary PPD file descriptor */
   int          temppid;                /* Process ID of cups-driverd */
@@ -5027,7 +5033,7 @@ create_subscription(
   http_status_t        status;                 /* Policy status */
   int                  i;              /* Looping var */
   ipp_attribute_t      *attr;          /* Current attribute */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   char                 scheme[HTTP_MAX_URI],
                                        /* Scheme portion of URI */
                        userpass[HTTP_MAX_URI],
@@ -5041,7 +5047,8 @@ create_subscription(
   cupsd_job_t          *job;           /* Job */
   int                  jobid;          /* Job ID */
   cupsd_subscription_t *sub;           /* Subscription object */
-  const char           *username,      /* requesting-user-name or authenticated username */
+  const char           *username,      /* requesting-user-name or
+                                          authenticated username */
                        *recipient,     /* notify-recipient-uri */
                        *pullmethod;    /* notify-pull-method */
   ipp_attribute_t      *user_data;     /* notify-user-data */
@@ -5207,8 +5214,8 @@ create_subscription(
         if (access(notifier, X_OK))
        {
           send_ipp_status(con, IPP_NOT_POSSIBLE,
-                         _("notify-recipient-uri URI \"%s\" uses unknown scheme!"),
-                         recipient);
+                         _("notify-recipient-uri URI \"%s\" uses unknown "
+                           "scheme!"), recipient);
          ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_ENUM,
                        "notify-status-code", IPP_URI_SCHEME);
          return;
@@ -5377,7 +5384,7 @@ delete_printer(cupsd_client_t  *con,      /* I - Client connection */
                ipp_attribute_t *uri)   /* I - URI of printer or class */
 {
   http_status_t        status;                 /* Policy status */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  cups_ptype_t dtype;                  /* Destination type (printer/class) */
   cupsd_printer_t *printer;            /* Printer/class */
   char         filename[1024];         /* Script/PPD filename */
 
@@ -5691,7 +5698,7 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
   http_status_t        status;                 /* Policy status */
   ipp_attribute_t *attr;               /* Current attribute */
   const char   *dest;                  /* Destination */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  cups_ptype_t dtype;                  /* Destination type (printer/class) */
   cups_ptype_t dmask;                  /* Destination type mask */
   char         scheme[HTTP_MAX_URI],   /* Scheme portion of URI */
                username[HTTP_MAX_URI], /* Username portion of URI */
@@ -6102,7 +6109,10 @@ get_ppd(cupsd_client_t  *con,            /* I - Client connection */
     * See if we need the PPD for a class or remote printer...
     */
 
-    if (dtype & CUPS_PRINTER_REMOTE)
+    snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot,
+             dest->name);
+
+    if ((dtype & CUPS_PRINTER_REMOTE) && access(filename, 0))
     {
       con->response->request.status.status_code = CUPS_SEE_OTHER;
       ippAddString(con->response, IPP_TAG_OPERATION, IPP_TAG_URI,
@@ -6113,9 +6123,14 @@ get_ppd(cupsd_client_t  *con,            /* I - Client connection */
     {
       for (i = 0; i < dest->num_printers; i ++)
         if (!(dest->printers[i]->type &
-             (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
-              CUPS_PRINTER_REMOTE)))
-         break;
+             (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)))
+       {
+         snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot,
+                  dest->printers[i]->name);
+
+          if (!access(filename, 0))
+           break;
+        }
 
       if (i < dest->num_printers)
         dest = dest->printers[i];
@@ -6132,9 +6147,6 @@ get_ppd(cupsd_client_t  *con,             /* I - Client connection */
     * Found the printer with the PPD file, now see if there is one...
     */
 
-    snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot,
-             dest->name);
-
     if ((con->file = open(filename, O_RDONLY)) < 0)
     {
       send_ipp_status(con, IPP_NOT_FOUND,
@@ -6178,7 +6190,7 @@ get_ppds(cupsd_client_t *con)             /* I - Client connection */
                        options[1024],  /* Options to pass to command */
                        device_str[256],/* Escaped ppd-device-id string */
                        language_str[256],
-                                       /* Escaped ppd-natural-language string */
+                                       /* Escaped ppd-natural-language */
                        make_str[256],  /* Escaped ppd-make string */
                        model_str[256], /* Escaped ppd-make-and-model string */
                        model_number_str[256],
@@ -6315,7 +6327,7 @@ get_printer_attrs(cupsd_client_t  *con,   /* I - Client connection */
                  ipp_attribute_t *uri) /* I - Printer URI */
 {
   http_status_t                status;         /* Policy status */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   cupsd_printer_t      *printer;       /* Printer/class */
   cups_array_t         *ra;            /* Requested attributes array */
 
@@ -6372,7 +6384,7 @@ get_printers(cupsd_client_t *con, /* I - Client connection */
 {
   http_status_t        status;                 /* Policy status */
   ipp_attribute_t *attr;               /* Current attribute */
-  int          limit;                  /* Maximum number of printers to return */
+  int          limit;                  /* Max number of printers to return */
   int          count;                  /* Number of printers that match */
   cupsd_printer_t *printer;            /* Current printer pointer */
   int          printer_type,           /* printer-type attribute */
@@ -6589,7 +6601,7 @@ get_subscriptions(cupsd_client_t  *con,   /* I - Client connection */
   cupsd_subscription_t *sub;           /* Subscription */
   cups_array_t         *ra;            /* Requested attributes array */
   ipp_attribute_t      *attr;          /* Attribute */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   char                 scheme[HTTP_MAX_URI],
                                        /* Scheme portion of URI */
                        username[HTTP_MAX_URI],
@@ -6898,7 +6910,7 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
   cupsd_job_t  *job;                   /* Current job */
   const char   *src;                   /* Source printer/class */
   cups_ptype_t stype,                  /* Source type (printer or class) */
-               dtype;                  /* Destination type (printer or class) */
+               dtype;                  /* Destination type (printer/class) */
   char         scheme[HTTP_MAX_URI],   /* Scheme portion of URI */
                username[HTTP_MAX_URI], /* Username portion of URI */
                host[HTTP_MAX_URI],     /* Host portion of URI */
@@ -7659,7 +7671,7 @@ reject_jobs(cupsd_client_t  *con, /* I - Client connection */
             ipp_attribute_t *uri)      /* I - Printer or class URI */
 {
   http_status_t        status;                 /* Policy status */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  cups_ptype_t dtype;                  /* Destination type (printer/class) */
   cupsd_printer_t *printer;            /* Printer data */
   ipp_attribute_t *attr;               /* printer-state-message text */
 
@@ -8263,7 +8275,7 @@ save_krb5_creds(cupsd_client_t *con,      /* I - Client connection */
   }
 
 #  ifdef HAVE_KRB5_CC_RESOLVE
-  if (krb5_cc_resolve(krb5_context, "MEMORY:", &ccache))
+  if (krb5_cc_resolve(krb_context, "MEMORY:", &ccache))
 #  elif defined(HAVE_HEIMDAL)
   if (krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))
 #  else
@@ -8460,7 +8472,8 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
     * Grab format from client...
     */
 
-    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]", super, type) != 2)
+    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]",
+               super, type) != 2)
     {
       send_ipp_status(con, IPP_BAD_REQUEST, _("Bad document-format \"%s\"!"),
                      format->values[0].string.text);
@@ -8756,7 +8769,7 @@ set_default(cupsd_client_t  *con, /* I - Client connection */
             ipp_attribute_t *uri)      /* I - Printer URI */
 {
   http_status_t                status;         /* Policy status */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   cupsd_printer_t      *printer;       /* Printer */
 
 
@@ -9032,7 +9045,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
               else if (con->response->request.status.status_code == IPP_OK)
              {
                job->state->values[0].integer = attr->values[0].integer;
-               job->state_value              = (ipp_jstate_t)attr->values[0].integer;
+               job->state_value = (ipp_jstate_t)attr->values[0].integer;
 
                 event |= CUPSD_EVENT_JOB_STATE;
              }
@@ -9420,7 +9433,7 @@ start_printer(cupsd_client_t  *con,       /* I - Client connection */
               ipp_attribute_t *uri)    /* I - Printer URI */
 {
   http_status_t                status;         /* Policy status */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   cupsd_printer_t      *printer;       /* Printer data */
 
 
@@ -9486,7 +9499,7 @@ stop_printer(cupsd_client_t  *con,        /* I - Client connection */
              ipp_attribute_t *uri)     /* I - Printer URI */
 {
   http_status_t                status;         /* Policy status */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   cupsd_printer_t      *printer;       /* Printer data */
   ipp_attribute_t      *attr;          /* printer-state-message attribute */
 
@@ -9695,7 +9708,7 @@ validate_job(cupsd_client_t  *con,        /* I - Client connection */
   http_status_t                status;         /* Policy status */
   ipp_attribute_t      *attr;          /* Current attribute */
   ipp_attribute_t      *format;        /* Document-format attribute */
-  cups_ptype_t         dtype;          /* Destination type (printer or class) */
+  cups_ptype_t         dtype;          /* Destination type (printer/class) */
   char                 super[MIME_MAX_SUPER],
                                        /* Supertype of file */
                        type[MIME_MAX_TYPE];
@@ -9730,7 +9743,8 @@ validate_job(cupsd_client_t  *con,        /* I - Client connection */
   if ((format = ippFindAttribute(con->request, "document-format",
                                  IPP_TAG_MIMETYPE)) != NULL)
   {
-    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]", super, type) != 2)
+    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]",
+               super, type) != 2)
     {
       send_ipp_status(con, IPP_BAD_REQUEST, _("Bad document-format \"%s\"!"),
                      format->values[0].string.text);
@@ -9788,7 +9802,7 @@ validate_job(cupsd_client_t  *con,        /* I - Client connection */
  * 'validate_name()' - Make sure the printer name only contains valid chars.
  */
 
-static int                     /* O - 0 if name is no good, 1 if name is good */
+static int                     /* O - 0 if name is no good, 1 if good */
 validate_name(const char *name)        /* I - Name to check */
 {
   const char   *ptr;           /* Pointer into name */
@@ -9855,5 +9869,5 @@ validate_user(cupsd_job_t    *job,        /* I - Job */
 
 
 /*
- * End of "$Id: ipp.c 6593 2007-06-21 21:30:49Z mike $".
+ * End of "$Id: ipp.c 6678 2007-07-16 18:03:35Z mike $".
  */