]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Changing the printer-is-shared value for a remote queue did not produce an
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 17 Nov 2015 19:25:54 +0000 (19:25 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 17 Nov 2015 19:25:54 +0000 (19:25 +0000)
error (STR #4738)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12977 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.1.txt
scheduler/ipp.c

index 91f95e3928b1346034a1317383219e9bd16fa397..ad807f2138ad461ad5195a1e619e3f11f1fe8130 100644 (file)
@@ -28,6 +28,8 @@ CHANGES IN CUPS V2.1.1
        - Added USB quirk for Canon MP530 (STR #4730)
        - The scheduler did not deliver job notifications for jobs submitted to
          classes (STR #4733)
+       - Changing the printer-is-shared value for a remote queue did not
+         produce an error (STR #4738)
        - Updated localizations (STR #4709)
 
 
index c0834c0a204e4872dabf3c2289f040fa456c8369..7a2fecd743081bf74fbc5e57eb28f89cfc434bde 100644 (file)
@@ -978,6 +978,16 @@ add_class(cupsd_client_t  *con,            /* I - Client connection */
   if ((attr = ippFindAttribute(con->request, "printer-is-shared",
                                IPP_TAG_BOOLEAN)) != NULL)
   {
+    if (pclass->type & CUPS_PRINTER_REMOTE)
+    {
+     /*
+      * Cannot re-share remote printers.
+      */
+
+      send_ipp_status(con, IPP_BAD_REQUEST, _("Cannot change printer-is-shared for remote queues."));
+      return;
+    }
+
     if (pclass->shared && !attr->values[0].boolean)
       cupsdDeregisterPrinter(pclass, 1);
 
@@ -2471,6 +2481,16 @@ add_printer(cupsd_client_t  *con,        /* I - Client connection */
       return;
     }
 
+    if (printer->type & CUPS_PRINTER_REMOTE)
+    {
+     /*
+      * Cannot re-share remote printers.
+      */
+
+      send_ipp_status(con, IPP_BAD_REQUEST, _("Cannot change printer-is-shared for remote queues."));
+      return;
+    }
+
     if (printer->shared && !attr->values[0].boolean)
       cupsdDeregisterPrinter(printer, 1);