s3-spoolss: Fix bug #8236 empty notify servername.
authorAndreas Schneider <asn@samba.org>
Fri, 2 Sep 2011 15:03:43 +0000 (17:03 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Sep 2011 18:31:03 +0000 (20:31 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c

index c309c65e79db1321c630217bbc3693d984cc0cdb..c886f34d03980de7e1d086ad7e13fdb2ae457d4a 100644 (file)
@@ -3695,6 +3695,15 @@ static WERROR printer_notify_info(struct pipes_struct *p,
                return WERR_BADFID;
        }
 
+       /*
+        * When sending a PRINTER_NOTIFY_FIELD_SERVER_NAME we should send the
+        * correct servername.
+        */
+       pinfo2->servername = talloc_strdup(pinfo2, Printer->servername);
+       if (pinfo2->servername == NULL) {
+               return WERR_NOMEM;
+       }
+
        for (i=0; i<option->count; i++) {
                option_type = option->types[i];