From: Günther Deschner Date: Thu, 19 Feb 2009 18:17:19 +0000 (+0100) Subject: s3-spoolss: fix _spoolss_GetPrinterDriverDirectory. X-Git-Tag: samba-4.0.0alpha7~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9c42e3c21cdc1fa25a05ef0f2edc4ca9b0b486e;p=thirdparty%2Fsamba.git s3-spoolss: fix _spoolss_GetPrinterDriverDirectory. treat architecture correctly as it is a [unique] pointer, and newer Windows versions sometimes send in an empty string. Guenther --- diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 7f4ff97ba8b..171953b6ab4 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -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))