The branch, v3-5-test has been updated
       via  27522fa... s3-registry: fix REG_MULTI_SZ handling in 
registry_push_value.
       via  77cafe2... s3-kerberos: add check for prerequisite krb5/krb5.h 
header while checking for krb5/locate_plugin.h.
       via  df71a31... nsswitch: fix compile of winbind_krb5_locator with 
recent Heimdal versions.
       via  9e2f707... cifs.upcall: 2nd part of fix for Bug #6868: support 
building with Heimdal we well as with MIT.
       via  68fcb81... s3-spoolss: re-arrange driver info level fillup 
functions.
       via  87969b9... s3-spoolss: fixes for _spoolss_EnumPrinterKey client and 
server.
       via  78687dc... s3-registry: use push_reg_multi_sz() in 
registry_push_value().
       via  bec0149... s3-registry: remove reg_pull_multi_sz().
      from  db4fd2b... Fix bug 6892 - When a chown operation is issued via 
Windows Explorer, all ACLS are wiped out. Merges existing DACLs when a ACL set 
operation comes in with only owner or group values set. Jeremy. (cherry picked 
from commit 7ed6f9f0960885366800b1ca2ce9558414b62d54)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 27522fa94ce11a549dee6d498e58df14355bc950
Author: Günther Deschner <[email protected]>
Date:   Wed Nov 25 21:34:55 2009 +0100

    s3-registry: fix REG_MULTI_SZ handling in registry_push_value.
    
    Catched by smbconftort test on the buildfarm.
    
    Guenther
    (cherry picked from commit 95108f1c60aaa0407aa4eb8c9a567e90302253c6)

commit 77cafe2cd7e1a7e51f074ebeb7e676b779ff2155
Author: Günther Deschner <[email protected]>
Date:   Wed Nov 25 21:33:48 2009 +0100

    s3-kerberos: add check for prerequisite krb5/krb5.h header while checking 
for krb5/locate_plugin.h.
    
    (Needed for new Heimdal versions).
    
    Guenther
    (cherry picked from commit c438b2b3923db66672ec82e795eef543de5fcb8a)

commit df71a31140d2a63eeb22d2dace45f6b73abde0be
Author: Günther Deschner <[email protected]>
Date:   Wed Nov 25 15:21:54 2009 +0100

    nsswitch: fix compile of winbind_krb5_locator with recent Heimdal versions.
    
    Guenther
    (cherry picked from commit 51864219cc12ceb66c281355f3e1191d5e32842d)

commit 9e2f7070cf0eaf74297d565892edf5089756b124
Author: Günther Deschner <[email protected]>
Date:   Wed Nov 25 15:06:19 2009 +0100

    cifs.upcall: 2nd part of fix for Bug #6868: support building with Heimdal 
we well as with MIT.
    
    Guenther
    (cherry picked from commit 660ee2e74523194e5f6b2b6428d76628beb74717)

commit 68fcb8119bec2d4613c7d0af8cef2012671b484b
Author: Günther Deschner <[email protected]>
Date:   Mon Nov 23 15:31:58 2009 +0100

    s3-spoolss: re-arrange driver info level fillup functions.
    
    Guenther
    (cherry picked from commit e92470d4427bda74537c4ecf79a7e888a1e16963)

commit 87969b9f9953adaace28240d10d20b17997304ed
Author: Günther Deschner <[email protected]>
Date:   Tue Nov 24 15:22:04 2009 +0100

    s3-spoolss: fixes for _spoolss_EnumPrinterKey client and server.
    
    Thanks Metze for review!
    
    Guenther
    (cherry picked from commit 846aa18648f3b34ab5cbc4dc4ba334bbedeab2f4)

commit 78687dcf5d6b1d66f14c62674a313d7aef825756
Author: Günther Deschner <[email protected]>
Date:   Tue Nov 24 15:26:32 2009 +0100

    s3-registry: use push_reg_multi_sz() in registry_push_value().
    
    Guenther
    (cherry picked from commit 2707dfb441801e753c74657f20b5ca22a274778f)

commit bec0149124b6d4a0d63c00c9094387ee5b89a031
Author: Günther Deschner <[email protected]>
Date:   Tue Nov 24 15:26:08 2009 +0100

    s3-registry: remove reg_pull_multi_sz().
    
    Guenther
    (cherry picked from commit d4e06596d50e008425b9d346c3814a03eea8309a)

-----------------------------------------------------------------------

Summary of changes:
 client/cifs.upcall.c                |    2 +
 nsswitch/winbind_krb5_locator.c     |    1 +
 source3/configure.in                |    9 ++-
 source3/include/proto.h             |    2 -
 source3/lib/util_reg.c              |   23 ----
 source3/lib/util_reg_api.c          |   88 ++++++----------
 source3/rpc_client/cli_spoolss.c    |    4 +-
 source3/rpc_server/srv_spoolss_nt.c |  192 +++++++++++++++++-----------------
 8 files changed, 139 insertions(+), 182 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/cifs.upcall.c b/client/cifs.upcall.c
index d3ff5f1..063e423 100644
--- a/client/cifs.upcall.c
+++ b/client/cifs.upcall.c
@@ -105,7 +105,9 @@ err_endseq:
 err_ccstart:
        krb5_free_principal(context, principal);
 err_princ:
+#if defined(KRB5_TC_OPENCLOSE)
        krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE);
+#endif
        krb5_cc_close(context, ccache);
 err_cache:
        krb5_free_context(context);
diff --git a/nsswitch/winbind_krb5_locator.c b/nsswitch/winbind_krb5_locator.c
index b9e35bd..272e7db 100644
--- a/nsswitch/winbind_krb5_locator.c
+++ b/nsswitch/winbind_krb5_locator.c
@@ -26,6 +26,7 @@
 
 #if defined(HAVE_KRB5) && defined(HAVE_KRB5_LOCATE_PLUGIN_H)
 
+#include <krb5/krb5.h>
 #include <krb5/locate_plugin.h>
 
 #ifndef KRB5_PLUGIN_NO_HANDLE
diff --git a/source3/configure.in b/source3/configure.in
index ac7b471..70a85a4 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3279,7 +3279,7 @@ if test x"$with_ads_support" != x"no"; then
   # now check for krb5.h. Some systems have the libraries without the headers!
   # note that this check is done here to allow for different kerberos
   # include paths
-  AC_CHECK_HEADERS(krb5.h)
+  AC_CHECK_HEADERS(krb5.h krb5/krb5.h)
 
   if test x"$ac_cv_header_krb5_h" = x"no"; then
 
@@ -3300,7 +3300,12 @@ if test x"$with_ads_support" != x"no"; then
     CPPFLAGS=$ac_save_CPPFLAGS
     LDFLAGS=$ac_save_LDFLAGS
   fi
-  AC_CHECK_HEADERS(krb5/locate_plugin.h)
+  AC_CHECK_HEADERS([krb5/locate_plugin.h], [], [],
+[[#ifdef HAVE_KRB5_KRB5_H
+ #include <krb5/krb5.h>
+ #endif
+]])
+
   if test x"$ac_cv_header_krb5_locate_plugin_h" = x"yes"; then
        WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"
        if test x"$BLDSHARED" = x"true" ; then
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1c10578..3ec7ce1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1260,8 +1260,6 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t 
uid) ;
 /* The following definitions come from lib/util_reg.c  */
 
 const char *reg_type_lookup(enum winreg_Type type);
-WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len,
-                        uint32 *num_values, char ***values);
 bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
 bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
 bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
diff --git a/source3/lib/util_reg.c b/source3/lib/util_reg.c
index ca46f86..850dbfa 100644
--- a/source3/lib/util_reg.c
+++ b/source3/lib/util_reg.c
@@ -73,29 +73,6 @@ const char *reg_type_lookup(enum winreg_Type type)
        return result;
 }
 
-WERROR reg_pull_multi_sz(TALLOC_CTX *mem_ctx, const void *buf, size_t len,
-                        uint32 *num_values, char ***values)
-{
-       DATA_BLOB blob;
-       const char **vals;
-       int i;
-
-       blob = data_blob_const((uint8_t *)buf, len);
-
-       if (!pull_reg_multi_sz(mem_ctx, &blob, &vals)) {
-               return WERR_NOMEM;
-       }
-
-       for (i=0; vals[i]; i++) {
-               ;;
-       }
-
-       *num_values = i;
-       *values = (char **)vals;
-
-       return WERR_OK;
-}
-
 /*******************************************************************
  push a string in unix charset into a REG_SZ UCS2 null terminated blob
  ********************************************************************/
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 56ecc54..7150444 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -102,14 +102,27 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
                SAFE_FREE(tmp);
                break;
        }
-       case REG_MULTI_SZ:
-               err = reg_pull_multi_sz(value, (void *)data, length,
-                                       &value->v.multi_sz.num_strings,
-                                       &value->v.multi_sz.strings);
-               if (!(W_ERROR_IS_OK(err))) {
+       case REG_MULTI_SZ: {
+               int i;
+               const char **vals;
+               DATA_BLOB blob;
+
+               blob = data_blob_const(data, length);
+
+               if (!pull_reg_multi_sz(mem_ctx, &blob, &vals)) {
+                       err = WERR_NOMEM;
                        goto error;
                }
+
+               for (i=0; vals[i]; i++) {
+                       ;;
+               }
+
+               value->v.multi_sz.num_strings = i;
+               value->v.multi_sz.strings = (char **)vals;
+
                break;
+       }
        case REG_BINARY:
                value->v.binary = data_blob_talloc(mem_ctx, data, length);
                break;
@@ -142,72 +155,33 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
        }
        case REG_SZ:
        case REG_EXPAND_SZ: {
-               if (!convert_string_talloc(mem_ctx, CH_UNIX, CH_UTF16LE,
-                                          value->v.sz.str,
-                                          MIN(value->v.sz.len,
-                                              strlen(value->v.sz.str)+1),
-                                          (void *)&(presult->data),
-                                          &presult->length, False))
+               if (!push_reg_sz(mem_ctx, presult, value->v.sz.str))
                {
                        return WERR_NOMEM;
                }
                break;
        }
        case REG_MULTI_SZ: {
-               uint32_t count;
-               size_t len = 0;
-               char **strings;
-               size_t *string_lengths;
-               uint32_t ofs;
-               TALLOC_CTX *tmp_ctx = talloc_stackframe();
-
-               strings = TALLOC_ARRAY(tmp_ctx, char *,
-                                      value->v.multi_sz.num_strings);
-               if (strings == NULL) {
-                       return WERR_NOMEM;
-               }
+               /* handle the case where we don't get a NULL terminated array */
+               const char **array;
+               int i;
 
-               string_lengths = TALLOC_ARRAY(tmp_ctx, size_t,
-                                             value->v.multi_sz.num_strings);
-               if (string_lengths == NULL) {
-                       TALLOC_FREE(tmp_ctx);
+               array = talloc_array(mem_ctx, const char *,
+                                    value->v.multi_sz.num_strings + 1);
+               if (!array) {
                        return WERR_NOMEM;
                }
 
-               /* convert the single strings */
-               for (count = 0; count < value->v.multi_sz.num_strings; count++)
-               {
-                       if (!convert_string_talloc(strings, CH_UNIX,
-                               CH_UTF16LE, value->v.multi_sz.strings[count],
-                               strlen(value->v.multi_sz.strings[count])+1,
-                               (void *)&strings[count],
-                               &string_lengths[count], false))
-                       {
-
-                               TALLOC_FREE(tmp_ctx);
-                               return WERR_NOMEM;
-                       }
-                       len += string_lengths[count];
+               for (i=0; i < value->v.multi_sz.num_strings; i++) {
+                       array[i] = value->v.multi_sz.strings[i];
                }
+               array[i] = NULL;
 
-               /* now concatenate all into the data blob */
-               presult->data = TALLOC_ARRAY(mem_ctx, uint8_t, len);
-               if (presult->data == NULL) {
-                       TALLOC_FREE(tmp_ctx);
+               if (!push_reg_multi_sz(mem_ctx, presult, array)) {
+                       talloc_free(array);
                        return WERR_NOMEM;
                }
-               for (count = 0, ofs = 0;
-                    count < value->v.multi_sz.num_strings;
-                    count++)
-               {
-                       memcpy(presult->data + ofs, strings[count],
-                              string_lengths[count]);
-                       ofs += string_lengths[count];
-               }
-               presult->length = len;
-
-               TALLOC_FREE(tmp_ctx);
-
+               talloc_free(array);
                break;
        }
        case REG_BINARY:
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 2dba103..6d6d5df 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -815,7 +815,7 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client 
*cli,
        *key_buffer = NULL;
 
        if (offered) {
-               buffer = talloc_array(mem_ctx, uint16_t, offered);
+               buffer = talloc_array(mem_ctx, uint16_t, offered/2);
                W_ERROR_HAVE_NO_MEMORY(buffer);
        }
 
@@ -829,7 +829,7 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client 
*cli,
 
        if (W_ERROR_EQUAL(werror, WERR_MORE_DATA)) {
                offered = needed;
-               buffer = talloc_realloc(mem_ctx, buffer, uint16_t, needed);
+               buffer = talloc_realloc(mem_ctx, buffer, uint16_t, needed/2);
                W_ERROR_HAVE_NO_MEMORY(buffer);
                status = rpccli_spoolss_EnumPrinterKey(cli, mem_ctx,
                                                       handle,
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 072090b..bcc6f5f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4541,11 +4541,11 @@ static const char 
**string_array_from_driver_info(TALLOC_CTX *mem_ctx,
 
 static WERROR fill_printer_driver_info1(TALLOC_CTX *mem_ctx,
                                        struct spoolss_DriverInfo1 *r,
-                                       const union spoolss_DriverInfo *driver,
+                                       const struct spoolss_DriverInfo3 
*driver,
                                        const char *servername,
                                        const char *architecture)
 {
-       r->driver_name          = talloc_strdup(mem_ctx, 
driver->info3.driver_name);
+       r->driver_name          = talloc_strdup(mem_ctx, driver->driver_name);
        W_ERROR_HAVE_NO_MEMORY(r->driver_name);
 
        return WERR_OK;
@@ -4557,38 +4557,38 @@ static WERROR fill_printer_driver_info1(TALLOC_CTX 
*mem_ctx,
 
 static WERROR fill_printer_driver_info2(TALLOC_CTX *mem_ctx,
                                        struct spoolss_DriverInfo2 *r,
-                                       const union spoolss_DriverInfo *driver,
+                                       const struct spoolss_DriverInfo3 
*driver,
                                        const char *servername)
 
 {
        const char *cservername = canon_servername(servername);
 
-       r->version              = driver->info3.version;
+       r->version              = driver->version;
 
-       r->driver_name          = talloc_strdup(mem_ctx, 
driver->info3.driver_name);
+       r->driver_name          = talloc_strdup(mem_ctx, driver->driver_name);
        W_ERROR_HAVE_NO_MEMORY(r->driver_name);
-       r->architecture         = talloc_strdup(mem_ctx, 
driver->info3.architecture);
+       r->architecture         = talloc_strdup(mem_ctx, driver->architecture);
        W_ERROR_HAVE_NO_MEMORY(r->architecture);
 
-       if (strlen(driver->info3.driver_path)) {
+       if (strlen(driver->driver_path)) {
                r->driver_path  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.driver_path);
+                               cservername, driver->driver_path);
        } else {
                r->driver_path  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->driver_path);
 
-       if (strlen(driver->info3.data_file)) {
+       if (strlen(driver->data_file)) {
                r->data_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.data_file);
+                               cservername, driver->data_file);
        } else {
                r->data_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->data_file);
 
-       if (strlen(driver->info3.config_file)) {
+       if (strlen(driver->config_file)) {
                r->config_file  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.config_file);
+                               cservername, driver->config_file);
        } else {
                r->config_file  = talloc_strdup(mem_ctx, "");
        }
@@ -4603,57 +4603,57 @@ static WERROR fill_printer_driver_info2(TALLOC_CTX 
*mem_ctx,
 
 static WERROR fill_printer_driver_info3(TALLOC_CTX *mem_ctx,
                                        struct spoolss_DriverInfo3 *r,
-                                       const union spoolss_DriverInfo *driver,
+                                       const struct spoolss_DriverInfo3 
*driver,
                                        const char *servername)
 {
        const char *cservername = canon_servername(servername);
 
-       r->version              = driver->info3.version;
+       r->version              = driver->version;
 
-       r->driver_name          = talloc_strdup(mem_ctx, 
driver->info3.driver_name);
+       r->driver_name          = talloc_strdup(mem_ctx, driver->driver_name);
        W_ERROR_HAVE_NO_MEMORY(r->driver_name);
-       r->architecture         = talloc_strdup(mem_ctx, 
driver->info3.architecture);
+       r->architecture         = talloc_strdup(mem_ctx, driver->architecture);
        W_ERROR_HAVE_NO_MEMORY(r->architecture);
 
-       if (strlen(driver->info3.driver_path)) {
+       if (strlen(driver->driver_path)) {
                r->driver_path  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.driver_path);
+                               cservername, driver->driver_path);
        } else {
                r->driver_path  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->driver_path);
 
-       if (strlen(driver->info3.data_file)) {
+       if (strlen(driver->data_file)) {
                r->data_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.data_file);
+                               cservername, driver->data_file);
        } else {
                r->data_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->data_file);
 
-       if (strlen(driver->info3.config_file)) {
+       if (strlen(driver->config_file)) {
                r->config_file  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.config_file);
+                               cservername, driver->config_file);
        } else {
                r->config_file  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->config_file);
 
-       if (strlen(driver->info3.help_file)) {
+       if (strlen(driver->help_file)) {
                r->help_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.help_file);
+                               cservername, driver->help_file);
        } else {
                r->help_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->help_file);
 
-       r->monitor_name         = talloc_strdup(mem_ctx, 
driver->info3.monitor_name);
+       r->monitor_name         = talloc_strdup(mem_ctx, driver->monitor_name);
        W_ERROR_HAVE_NO_MEMORY(r->monitor_name);
-       r->default_datatype     = talloc_strdup(mem_ctx, 
driver->info3.default_datatype);
+       r->default_datatype     = talloc_strdup(mem_ctx, 
driver->default_datatype);
        W_ERROR_HAVE_NO_MEMORY(r->default_datatype);
 
        r->dependent_files = string_array_from_driver_info(mem_ctx,
-                                                          
driver->info3.dependent_files,
+                                                          
driver->dependent_files,
                                                           cservername);
        return WERR_OK;
 }
@@ -4664,58 +4664,58 @@ static WERROR fill_printer_driver_info3(TALLOC_CTX 
*mem_ctx,
 
 static WERROR fill_printer_driver_info4(TALLOC_CTX *mem_ctx,
                                        struct spoolss_DriverInfo4 *r,
-                                       const union spoolss_DriverInfo *driver,
+                                       const struct spoolss_DriverInfo3 
*driver,
                                        const char *servername)
 {
        const char *cservername = canon_servername(servername);
 
-       r->version              = driver->info3.version;
+       r->version              = driver->version;
 
-       r->driver_name          = talloc_strdup(mem_ctx, 
driver->info3.driver_name);
+       r->driver_name          = talloc_strdup(mem_ctx, driver->driver_name);
        W_ERROR_HAVE_NO_MEMORY(r->driver_name);
-       r->architecture         = talloc_strdup(mem_ctx, 
driver->info3.architecture);
+       r->architecture         = talloc_strdup(mem_ctx, driver->architecture);
        W_ERROR_HAVE_NO_MEMORY(r->architecture);
 
-       if (strlen(driver->info3.driver_path)) {
+       if (strlen(driver->driver_path)) {
                r->driver_path  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.driver_path);
+                               cservername, driver->driver_path);
        } else {
                r->driver_path  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->driver_path);
 
-       if (strlen(driver->info3.data_file)) {
+       if (strlen(driver->data_file)) {
                r->data_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.data_file);
+                               cservername, driver->data_file);
        } else {
                r->data_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->data_file);
 
-       if (strlen(driver->info3.config_file)) {
+       if (strlen(driver->config_file)) {
                r->config_file  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.config_file);
+                               cservername, driver->config_file);
        } else {
                r->config_file  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->config_file);
 
-       if (strlen(driver->info3.help_file)) {
+       if (strlen(driver->help_file)) {
                r->help_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.help_file);
+                               cservername, driver->help_file);
        } else {
                r->help_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->help_file);
 
        r->dependent_files = string_array_from_driver_info(mem_ctx,
-                                                          
driver->info3.dependent_files,
+                                                          
driver->dependent_files,
                                                           cservername);
 
 
-       r->monitor_name         = talloc_strdup(mem_ctx, 
driver->info3.monitor_name);
+       r->monitor_name         = talloc_strdup(mem_ctx, driver->monitor_name);
        W_ERROR_HAVE_NO_MEMORY(r->monitor_name);
-       r->default_datatype     = talloc_strdup(mem_ctx, 
driver->info3.default_datatype);
+       r->default_datatype     = talloc_strdup(mem_ctx, 
driver->default_datatype);
        W_ERROR_HAVE_NO_MEMORY(r->default_datatype);
 
        r->previous_names = string_array_from_driver_info(mem_ctx,
@@ -4731,37 +4731,37 @@ static WERROR fill_printer_driver_info4(TALLOC_CTX 
*mem_ctx,
 
 static WERROR fill_printer_driver_info5(TALLOC_CTX *mem_ctx,
                                        struct spoolss_DriverInfo5 *r,
-                                       const union spoolss_DriverInfo *driver,
+                                       const struct spoolss_DriverInfo3 
*driver,
                                        const char *servername)
 {
        const char *cservername = canon_servername(servername);
 
-       r->version              = driver->info3.version;
+       r->version              = driver->version;
 
-       r->driver_name          = talloc_strdup(mem_ctx, 
driver->info3.driver_name);
+       r->driver_name          = talloc_strdup(mem_ctx, driver->driver_name);
        W_ERROR_HAVE_NO_MEMORY(r->driver_name);
-       r->architecture         = talloc_strdup(mem_ctx, 
driver->info3.architecture);
+       r->architecture         = talloc_strdup(mem_ctx, driver->architecture);
        W_ERROR_HAVE_NO_MEMORY(r->architecture);
 
-       if (strlen(driver->info3.driver_path)) {
+       if (strlen(driver->driver_path)) {
                r->driver_path  = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.driver_path);
+                               cservername, driver->driver_path);
        } else {
                r->driver_path  = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->driver_path);
 
-       if (strlen(driver->info3.data_file)) {
+       if (strlen(driver->data_file)) {
                r->data_file    = talloc_asprintf(mem_ctx, "\\\\%s%s",
-                               cservername, driver->info3.data_file);
+                               cservername, driver->data_file);
        } else {
                r->data_file    = talloc_strdup(mem_ctx, "");
        }
        W_ERROR_HAVE_NO_MEMORY(r->data_file);
 
-       if (strlen(driver->info3.config_file)) {


-- 
Samba Shared Repository

Reply via email to