s3-spoolss: Fix bug #8236 empty notify servername.
authorAndreas Schneider <asn@samba.org>
Fri, 2 Sep 2011 15:03:43 +0000 (17:03 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 3 Sep 2011 00:58:42 +0000 (02:58 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Sep  3 02:58:42 CEST 2011 on sn-devel-104

source3/rpc_server/spoolss/srv_spoolss_nt.c

index a2f8d686659d0ec1c758ea26da21fcfedbe4797c..0f9bfb701a6a32083e7941382e32c0e3c3853cc9 100644 (file)
@@ -3708,6 +3708,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];