s3-spoolss: fix _spoolss_GetPrinterDriverDirectory.
authorGünther Deschner <gd@samba.org>
Thu, 19 Feb 2009 18:17:19 +0000 (19:17 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 19 Feb 2009 18:20:19 +0000 (19:20 +0100)
treat architecture correctly as it is a [unique] pointer, and newer
Windows versions sometimes send in an empty string.

Guenther

source3/rpc_server/srv_spoolss_nt.c

index 7f4ff97ba8b90413c622a3b1b777dbf507570e17..171953b6ab4092e37595769cffd820eea7a909f6 100644 (file)
@@ -8066,15 +8066,20 @@ WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *
 
 static WERROR getprinterdriverdir_level_1(TALLOC_CTX *mem_ctx,
                                          const char *servername,
-                                         const char *long_archi,
+                                         const char *environment,
                                          struct spoolss_DriverDirectoryInfo1 *info1,
                                          uint32_t offered,
                                          uint32_t *needed)
 {
        char *path = NULL;
        const char *pservername = NULL;
+       const char *long_archi = SPOOLSS_ARCHITECTURE_NT_X86;
        const char *short_archi;
 
+       if (environment) {
+               long_archi = environment;
+       }
+
        pservername = canon_servername(servername);
 
        if ( !is_myname_or_ipaddr(pservername))