s3-spoolss: Added missing Printer Driver in winreg_{update,get}_printer.
authorAndreas Schneider <asn@samba.org>
Fri, 23 Apr 2010 19:37:13 +0000 (21:37 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 5 May 2010 15:32:33 +0000 (17:32 +0200)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/rpc_server/srv_spoolss_util.c

index 004427914c54f8dadcbb551d1738a6ae25341f3c..b70090f44b34659bda4350b808134b199bc062df 100644 (file)
@@ -1675,6 +1675,17 @@ WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
                }
        }
 
+       if (info2_mask & SPOOLSS_PRINTER_INFO_DRIVERNAME) {
+               result = winreg_printer_write_sz(tmp_ctx,
+                                                winreg_pipe,
+                                                &key_hnd,
+                                                "Printer Driver",
+                                                info2->drivername);
+               if (!W_ERROR_IS_OK(result)) {
+                       goto done;
+               }
+       }
+
        if (info2_mask & SPOOLSS_PRINTER_INFO_LOCATION) {
                result = winreg_printer_write_sz(tmp_ctx,
                                                 winreg_pipe,
@@ -1999,6 +2010,12 @@ WERROR winreg_get_printer(TALLOC_CTX *mem_ctx,
                                              &info2->parameters);
                CHECK_ERROR(result);
 
+               result = winreg_enumval_to_sz(info2,
+                                             v,
+                                             "Printer Driver",
+                                             &info2->drivername);
+               CHECK_ERROR(result);
+
                result = winreg_enumval_to_dword(info2,
                                                 v,
                                                 "Attributes",