s3-spoolss: Fix _spoolss_EnumPrintProcDataTypes error handling
authorGünther Deschner <gd@samba.org>
Mon, 27 Sep 2010 22:10:54 +0000 (00:10 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 27 Sep 2010 23:17:16 +0000 (01:17 +0200)
source3/rpc_server/srv_spoolss_nt.c

index 465f02040391a87006a6fdfd458023a6fad7f0c3..89a835fb80ece868bad1987dd8a10432e1cbb883 100644 (file)
@@ -8596,6 +8596,11 @@ WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p,
        *r->out.needed = 0;
        *r->out.info = NULL;
 
+       if (r->in.print_processor_name == NULL ||
+           !strequal(r->in.print_processor_name, "winprint")) {
+               return WERR_UNKNOWN_PRINTPROCESSOR;
+       }
+
        switch (r->in.level) {
        case 1:
                result = enumprintprocdatatypes_level_1(p->mem_ctx, r->out.info,