The branch, v3-5-test has been updated
       via  4eb7c54... s3-spoolss: move more defines out of nt_printing.h to 
spoolss.idl where they belong.
       via  4d640c4... s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL 
structs.
       via  450a644... s3-printing: use spoolss types and structs while getting 
and deleting drivers.
       via  6de2a26... s3-printing: use spoolss types and structs while adding 
drivers.
       via  9dcb99a... s4-smbtorture: add tests for spoolss_EnumPrinterKey to 
RPC-SPOOLSS-PRINTER.
       via  f8d0eae... s3-spoolss: fix spoolss_EnumPrinterKey client and server 
code.
       via  b61da25... spoolss: fix spoolss_EnumPrinterKey IDL.
       via  9b1294c... s3-build: delete more object files for "make clean".
       via  f9b1682... s3-build: really fix build of winbind_krb5_locator.
       via  05689c6... s3-build: make sure to remove libds and client object 
files on make clean.
       via  6f76254... s3-rpcclient: use the parsed binding string flags for 
auth choice.
      from  3fcf1a8... s3: Fix bug 6338 -- net rpc trustdom list always display 
"none"

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


- Log -----------------------------------------------------------------
commit 4eb7c5472f84edd298cd0fc8fdffa6cfd8702304
Author: Günther Deschner <[email protected]>
Date:   Wed Nov 18 15:39:52 2009 +0100

    s3-spoolss: move more defines out of nt_printing.h to spoolss.idl where 
they belong.
    
    Guenther
    (cherry picked from commit 800d6b7820bb949588a799f2835a3d6c07815571)

commit 4d640c449f74ebabb8d1d4003719a5b2735006e9
Author: Günther Deschner <[email protected]>
Date:   Tue Nov 17 12:55:45 2009 +0100

    s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.
    
    Guenther
    (cherry picked from commit 6364c271c4daff94c641eb9e7030f3c9a7ff1ced)

commit 450a644e462073a371a8e465c16abf74fd0abdfe
Author: Günther Deschner <[email protected]>
Date:   Tue Nov 17 12:54:02 2009 +0100

    s3-printing: use spoolss types and structs while getting and deleting 
drivers.
    
    Guenther
    (cherry picked from commit ec56895bdec90cc671a0d562749b3caf161dbdf8)

commit 6de2a26cc1c18b08555ff42513c7f2a685feea55
Author: Günther Deschner <[email protected]>
Date:   Mon Nov 16 15:52:31 2009 +0100

    s3-printing: use spoolss types and structs while adding drivers.
    
    Guenther
    (cherry picked from commit 68cc1166d96ac81abce78a7eb60b7b86d0eb4eda)

commit 9dcb99af64eca362873220d5f03d04d63cf2b0de
Author: Günther Deschner <[email protected]>
Date:   Fri Nov 20 16:33:29 2009 +0100

    s4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.
    
    Guenther
    (cherry picked from commit d66b7d80d5ae1a0bf2e3d1e6718f569726da7734)

commit f8d0eae87453015b9fabc511a09079ea9c14b265
Author: Günther Deschner <[email protected]>
Date:   Fri Nov 20 16:34:00 2009 +0100

    s3-spoolss: fix spoolss_EnumPrinterKey client and server code.
    
    Guenther
    (cherry picked from commit d464151f3b47c675664f464b1645ca85de663655)

commit b61da25c37a715782a2edb9afddb0e9a8fdb45ee
Author: Günther Deschner <[email protected]>
Date:   Fri Nov 20 12:57:13 2009 +0100

    spoolss: fix spoolss_EnumPrinterKey IDL.
    
    Guenther
    (cherry picked from commit 366946f29b58a6efa7acbfe2a74b2ddbad4d32a2)

commit 9b1294c4111fd3d8805e9ea4147ac714de943059
Author: Günther Deschner <[email protected]>
Date:   Fri Nov 20 12:54:19 2009 +0100

    s3-build: delete more object files for "make clean".
    
    Guenther
    (cherry picked from commit eea5a166e766669b6945bb62c9202fb385179cd1)

commit f9b1682cf2d55d3c255e8a69a2b04d8f0d8fd9b1
Author: Günther Deschner <[email protected]>
Date:   Thu Nov 19 13:44:33 2009 +0100

    s3-build: really fix build of winbind_krb5_locator.
    
    Guenther
    (cherry picked from commit fc9f199f2619635f73e8ee7f3b5359521d63f325)

commit 05689c61609e075b64f3a01ba1e81646fda3b9d1
Author: Günther Deschner <[email protected]>
Date:   Thu Nov 19 13:39:24 2009 +0100

    s3-build: make sure to remove libds and client object files on make clean.
    
    Guenther
    (cherry picked from commit bf45447aaa35ee3b26fe76af3c73a77d7b10c2ac)

commit 6f76254c31bc61805eca2f5dd8c524ac64577b1f
Author: Günther Deschner <[email protected]>
Date:   Thu Nov 12 16:45:33 2009 +0100

    s3-rpcclient: use the parsed binding string flags for auth choice.
    
    This allows rpcclient to be called like this:
    
    rpcclient ncacn_ip_tcp:w2k8r2[sign,seal] -U administrator%secret -c 
"dscracknames gd"
    
    Guenther
    (cherry picked from commit 3732798008f26052c030e8a8fc9c9404fd6f5669)

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

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c            |    8 +-
 librpc/gen_ndr/cli_spoolss.h            |    4 +-
 librpc/gen_ndr/ndr_spoolss.c            |   80 ++--
 librpc/gen_ndr/spoolss.h                |   64 +++-
 librpc/gen_ndr/srv_spoolss.c            |    4 +-
 librpc/idl/spoolss.idl                  |   70 +++-
 source3/Makefile.in                     |   11 +-
 source3/include/nt_printing.h           |  108 -----
 source3/include/proto.h                 |   27 +-
 source3/printing/nt_printing.c          |  763 +++++++++++++------------------
 source3/registry/reg_backend_printing.c |   31 +-
 source3/rpc_client/cli_spoolss.c        |   24 +-
 source3/rpc_server/srv_spoolss_nt.c     |  544 ++++++++---------------
 source3/rpcclient/rpcclient.c           |   18 +
 source3/smbd/lanman.c                   |   61 ++--
 source4/torture/rpc/spoolss.c           |   81 ++++
 16 files changed, 861 insertions(+), 1037 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index fc2b8f0..d9bbe52 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -12207,7 +12207,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
                                                      struct rpc_pipe_client 
*cli,
                                                      struct policy_handle 
*_handle /* [in] [ref] */,
                                                      const char *_key_name /* 
[in] [charset(UTF16)] */,
-                                                     const char ** 
*_key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+                                                     uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
                                                      uint32_t _offered /* [in] 
 */,
                                                      uint32_t *_needed /* 
[out] [ref] */)
 {
@@ -12278,7 +12278,7 @@ static void rpccli_spoolss_EnumPrinterKey_done(struct 
tevent_req *subreq)
        }
 
        /* Copy out parameters */
-       *state->orig.out.key_buffer = *state->tmp.out.key_buffer;
+       memcpy(state->orig.out.key_buffer, state->tmp.out.key_buffer, 
state->tmp.in.offered / 2 * sizeof(*state->orig.out.key_buffer));
        *state->orig.out.needed = *state->tmp.out.needed;
 
        /* Copy result */
@@ -12317,7 +12317,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
                                       TALLOC_CTX *mem_ctx,
                                       struct policy_handle *handle /* [in] 
[ref] */,
                                       const char *key_name /* [in] 
[charset(UTF16)] */,
-                                      const char ** *key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+                                      uint16_t *key_buffer /* [out] 
[ref,size_is(offered/2)] */,
                                       uint32_t offered /* [in]  */,
                                       uint32_t *needed /* [out] [ref] */,
                                       WERROR *werror)
@@ -12345,7 +12345,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *key_buffer = *r.out.key_buffer;
+       memcpy(key_buffer, r.out.key_buffer, r.in.offered / 2 * 
sizeof(*key_buffer));
        *needed = *r.out.needed;
 
        /* Return result */
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 985337d..943cbce 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -1262,7 +1262,7 @@ struct tevent_req 
*rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx,
                                                      struct rpc_pipe_client 
*cli,
                                                      struct policy_handle 
*_handle /* [in] [ref] */,
                                                      const char *_key_name /* 
[in] [charset(UTF16)] */,
-                                                     const char ** 
*_key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+                                                     uint16_t *_key_buffer /* 
[out] [ref,size_is(offered/2)] */,
                                                      uint32_t _offered /* [in] 
 */,
                                                      uint32_t *_needed /* 
[out] [ref] */);
 NTSTATUS rpccli_spoolss_EnumPrinterKey_recv(struct tevent_req *req,
@@ -1272,7 +1272,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct 
rpc_pipe_client *cli,
                                       TALLOC_CTX *mem_ctx,
                                       struct policy_handle *handle /* [in] 
[ref] */,
                                       const char *key_name /* [in] 
[charset(UTF16)] */,
-                                      const char ** *key_buffer /* [out] 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+                                      uint16_t *key_buffer /* [out] 
[ref,size_is(offered/2)] */,
                                       uint32_t offered /* [in]  */,
                                       uint32_t *needed /* [out] [ref] */,
                                       WERROR *werror);
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index fb452bc..53b07f7 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -27658,6 +27658,7 @@ _PUBLIC_ void 
ndr_print_spoolss_EnumPrinterDataEx(struct ndr_print *ndr, const c
 
 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterKey(struct ndr_push 
*ndr, int flags, const struct spoolss_EnumPrinterKey *r)
 {
+       uint32_t cntr_key_buffer_1;
        if (flags & NDR_IN) {
                if (r->in.handle == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
@@ -27670,22 +27671,12 @@ _PUBLIC_ enum ndr_err_code 
ndr_push_spoolss_EnumPrinterKey(struct ndr_push *ndr,
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
        }
        if (flags & NDR_OUT) {
-               {
-                       uint32_t _flags_save_string_array = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
-                       if (r->out.key_buffer == NULL) {
-                               return ndr_push_error(ndr, 
NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
-                       }
-                       NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_buffer));
-                       if (*r->out.key_buffer) {
-                               {
-                                       struct ndr_push *_ndr_key_buffer;
-                                       
NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_key_buffer, 0, r->in.offered));
-                                       
NDR_CHECK(ndr_push_string_array(_ndr_key_buffer, NDR_SCALARS, 
*r->out.key_buffer));
-                                       NDR_CHECK(ndr_push_subcontext_end(ndr, 
_ndr_key_buffer, 0, r->in.offered));
-                               }
-                       }
-                       ndr->flags = _flags_save_string_array;
+               if (r->out.key_buffer == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered / 
2));
+               for (cntr_key_buffer_1 = 0; cntr_key_buffer_1 < r->in.offered / 
2; cntr_key_buffer_1++) {
+                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 
r->out.key_buffer[cntr_key_buffer_1]));
                }
                if (r->out.needed == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
@@ -27698,9 +27689,8 @@ _PUBLIC_ enum ndr_err_code 
ndr_push_spoolss_EnumPrinterKey(struct ndr_push *ndr,
 
 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull 
*ndr, int flags, struct spoolss_EnumPrinterKey *r)
 {
-       uint32_t _ptr_key_buffer;
+       uint32_t cntr_key_buffer_1;
        TALLOC_CTX *_mem_save_handle_0;
-       TALLOC_CTX *_mem_save_key_buffer_0;
        TALLOC_CTX *_mem_save_key_buffer_1;
        TALLOC_CTX *_mem_save_needed_0;
        if (flags & NDR_IN) {
@@ -27721,40 +27711,22 @@ _PUBLIC_ enum ndr_err_code 
ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull *ndr,
                NDR_CHECK(ndr_check_string_terminator(ndr, 
ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, 
ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
-               NDR_PULL_ALLOC(ndr, r->out.key_buffer);
-               ZERO_STRUCTP(r->out.key_buffer);
+               NDR_PULL_ALLOC_N(ndr, r->out.key_buffer, r->in.offered / 2);
+               memset(r->out.key_buffer, 0, (r->in.offered / 2) * 
sizeof(*r->out.key_buffer));
                NDR_PULL_ALLOC(ndr, r->out.needed);
                ZERO_STRUCTP(r->out.needed);
        }
        if (flags & NDR_OUT) {
-               {
-                       uint32_t _flags_save_string_array = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
-                       if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                               NDR_PULL_ALLOC(ndr, r->out.key_buffer);
-                       }
-                       _mem_save_key_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->out.key_buffer, 
LIBNDR_FLAG_REF_ALLOC);
-                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_buffer));
-                       if (_ptr_key_buffer) {
-                               NDR_PULL_ALLOC(ndr, *r->out.key_buffer);
-                       } else {
-                               *r->out.key_buffer = NULL;
-                       }
-                       if (*r->out.key_buffer) {
-                               _mem_save_key_buffer_1 = 
NDR_PULL_GET_MEM_CTX(ndr);
-                               NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_buffer, 
0);
-                               {
-                                       struct ndr_pull *_ndr_key_buffer;
-                                       
NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_key_buffer, 0, r->in.offered));
-                                       
NDR_CHECK(ndr_pull_string_array(_ndr_key_buffer, NDR_SCALARS, 
r->out.key_buffer));
-                                       NDR_CHECK(ndr_pull_subcontext_end(ndr, 
_ndr_key_buffer, 0, r->in.offered));
-                               }
-                               NDR_PULL_SET_MEM_CTX(ndr, 
_mem_save_key_buffer_1, 0);
-                       }
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_buffer_0, 
LIBNDR_FLAG_REF_ALLOC);
-                       ndr->flags = _flags_save_string_array;
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->out.key_buffer));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC_N(ndr, r->out.key_buffer, 
ndr_get_array_size(ndr, &r->out.key_buffer));
                }
+               _mem_save_key_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.key_buffer, 0);
+               for (cntr_key_buffer_1 = 0; cntr_key_buffer_1 < r->in.offered / 
2; cntr_key_buffer_1++) {
+                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, 
&r->out.key_buffer[cntr_key_buffer_1]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_buffer_1, 0);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->out.needed);
                }
@@ -27763,12 +27735,16 @@ _PUBLIC_ enum ndr_err_code 
ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull *ndr,
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+               if (r->out.key_buffer) {
+                       NDR_CHECK(ndr_check_array_size(ndr, 
(void*)&r->out.key_buffer, r->in.offered / 2));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
 _PUBLIC_ void ndr_print_spoolss_EnumPrinterKey(struct ndr_print *ndr, const 
char *name, int flags, const struct spoolss_EnumPrinterKey *r)
 {
+       uint32_t cntr_key_buffer_1;
        ndr_print_struct(ndr, name, "spoolss_EnumPrinterKey");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
@@ -27790,10 +27766,14 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterKey(struct 
ndr_print *ndr, const char
                ndr->depth++;
                ndr_print_ptr(ndr, "key_buffer", r->out.key_buffer);
                ndr->depth++;
-               ndr_print_ptr(ndr, "key_buffer", *r->out.key_buffer);
+               ndr->print(ndr, "%s: ARRAY(%d)", "key_buffer", 
(int)r->in.offered / 2);
                ndr->depth++;
-               if (*r->out.key_buffer) {
-                       ndr_print_string_array(ndr, "key_buffer", 
*r->out.key_buffer);
+               for (cntr_key_buffer_1=0;cntr_key_buffer_1<r->in.offered / 
2;cntr_key_buffer_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_key_buffer_1) != -1) {
+                               ndr_print_uint16(ndr, "key_buffer", 
r->out.key_buffer[cntr_key_buffer_1]);
+                               free(idx_1);
+                       }
                }
                ndr->depth--;
                ndr->depth--;
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 2b9fc51..a4c0010 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -23,6 +23,68 @@
 #define SPOOLSS_ARCHITECTURE_ALL       ( "all" )
 #define SPOOLSS_ARCHITECTURE_NT_X86    ( "Windows NT x86" )
 #define SPOOLSS_DEFAULT_SERVER_PATH    ( "C:\\WINDOWS\\system32\\spool" )
+#define SPOOL_PRINTERDATA_KEY  ( "PrinterDriverData" )
+#define SPOOL_DSSPOOLER_KEY    ( "DsSpooler" )
+#define SPOOL_DSDRIVER_KEY     ( "DsDriver" )
+#define SPOOL_DSUSER_KEY       ( "DsUser" )
+#define SPOOL_PNPDATA_KEY      ( "PnPData" )
+#define SPOOL_OID_KEY  ( "OID" )
+#define SPOOL_REG_ASSETNUMBER  ( "assetNumber" )
+#define SPOOL_REG_BYTESPERMINUTE       ( "bytesPerMinute" )
+#define SPOOL_REG_DEFAULTPRIORITY      ( "defaultPriority" )
+#define SPOOL_REG_DESCRIPTION  ( "description" )
+#define SPOOL_REG_DRIVERNAME   ( "driverName" )
+#define SPOOL_REG_DRIVERVERSION        ( "driverVersion" )
+#define SPOOL_REG_FLAGS        ( "flags" )
+#define SPOOL_REG_LOCATION     ( "location" )
+#define SPOOL_REG_OPERATINGSYSTEM      ( "operatingSystem" )
+#define SPOOL_REG_OPERATINGSYSTEMHOTFIX        ( "operatingSystemHotfix" )
+#define SPOOL_REG_OPERATINGSYSTEMSERVICEPACK   ( "operatingSystemServicePack" )
+#define SPOOL_REG_OPERATINGSYSTEMVERSION       ( "operatingSystemVersion" )
+#define SPOOL_REG_PORTNAME     ( "portName" )
+#define SPOOL_REG_PRINTATTRIBUTES      ( "printAttributes" )
+#define SPOOL_REG_PRINTBINNAMES        ( "printBinNames" )
+#define SPOOL_REG_PRINTCOLLATE ( "printCollate" )
+#define SPOOL_REG_PRINTCOLOR   ( "printColor" )
+#define SPOOL_REG_PRINTDUPLEXSUPPORTED ( "printDuplexSupported" )
+#define SPOOL_REG_PRINTENDTIME ( "printEndTime" )
+#define SPOOL_REG_PRINTERNAME  ( "printerName" )
+#define SPOOL_REG_PRINTFORMNAME        ( "printFormName" )
+#define SPOOL_REG_PRINTKEEPPRINTEDJOBS ( "printKeepPrintedJobs" )
+#define SPOOL_REG_PRINTLANGUAGE        ( "printLanguage" )
+#define SPOOL_REG_PRINTMACADDRESS      ( "printMACAddress" )
+#define SPOOL_REG_PRINTMAXCOPIES       ( "printMaxCopies" )
+#define SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED  ( "printMaxResolutionSupported" 
)
+#define SPOOL_REG_PRINTMAXXEXTENT      ( "printMaxXExtent" )
+#define SPOOL_REG_PRINTMAXYEXTENT      ( "printMaxYExtent" )
+#define SPOOL_REG_PRINTMEDIAREADY      ( "printMediaReady" )
+#define SPOOL_REG_PRINTMEDIASUPPORTED  ( "printMediaSupported" )
+#define SPOOL_REG_PRINTMEMORY  ( "printMemory" )
+#define SPOOL_REG_PRINTMINXEXTENT      ( "printMinXExtent" )
+#define SPOOL_REG_PRINTMINYEXTENT      ( "printMinYExtent" )
+#define SPOOL_REG_PRINTNETWORKADDRESS  ( "printNetworkAddress" )
+#define SPOOL_REG_PRINTNOTIFY  ( "printNotify" )
+#define SPOOL_REG_PRINTNUMBERUP        ( "printNumberUp" )
+#define SPOOL_REG_PRINTORIENTATIONSSUPPORTED   ( "printOrientationsSupported" )
+#define SPOOL_REG_PRINTOWNER   ( "printOwner" )
+#define SPOOL_REG_PRINTPAGESPERMINUTE  ( "printPagesPerMinute" )
+#define SPOOL_REG_PRINTRATE    ( "printRate" )
+#define SPOOL_REG_PRINTRATEUNIT        ( "printRateUnit" )
+#define SPOOL_REG_PRINTSEPARATORFILE   ( "printSeparatorFile" )
+#define SPOOL_REG_PRINTSHARENAME       ( "printShareName" )
+#define SPOOL_REG_PRINTSPOOLING        ( "printSpooling" )
+#define SPOOL_REGVAL_PRINTWHILESPOOLING        ( "PrintWhileSpooling" )
+#define SPOOL_REGVAL_PRINTAFTERSPOOLED ( "PrintAfterSpooled" )
+#define SPOOL_REGVAL_PRINTDIRECT       ( "PrintDirect" )
+#define SPOOL_REG_PRINTSTAPLINGSUPPORTED       ( "printStaplingSupported" )
+#define SPOOL_REG_PRINTSTARTTIME       ( "printStartTime" )
+#define SPOOL_REG_PRINTSTATUS  ( "printStatus" )
+#define SPOOL_REG_PRIORITY     ( "priority" )
+#define SPOOL_REG_SERVERNAME   ( "serverName" )
+#define SPOOL_REG_SHORTSERVERNAME      ( "shortServerName" )
+#define SPOOL_REG_UNCNAME      ( "uNCName" )
+#define SPOOL_REG_URL  ( "url" )
+#define SPOOL_REG_VERSIONNUMBER        ( "versionNumber" )
 #define SPL_LOCAL_PORT ( "Local Port" )
 #define SPL_TCPIP_PORT ( "Standard TCP/IP Port" )
 #define SPL_XCV_MONITOR_LOCALMON       ( ",XcvMonitor Local Port" )
@@ -3489,7 +3551,7 @@ struct spoolss_EnumPrinterKey {
        } in;
 
        struct {
-               const char ** *key_buffer;/* 
[subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */
+               uint16_t *key_buffer;/* [ref,size_is(offered/2)] */
                uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c
index c3266dc..6ca334b 100644
--- a/librpc/gen_ndr/srv_spoolss.c
+++ b/librpc/gen_ndr/srv_spoolss.c
@@ -6325,7 +6325,7 @@ static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.key_buffer = talloc_zero(r, const char **);
+       r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.offered / 2);
        if (r->out.key_buffer == NULL) {
                talloc_free(r);
                return false;
@@ -9504,7 +9504,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client 
*cli, TALLOC_CTX *mem_ctx,
                case NDR_SPOOLSS_ENUMPRINTERKEY: {
                        struct spoolss_EnumPrinterKey *r = (struct 
spoolss_EnumPrinterKey *)_r;
                        ZERO_STRUCT(r->out);
-                       r->out.key_buffer = talloc_zero(mem_ctx, const char **);
+                       r->out.key_buffer = talloc_zero_array(mem_ctx, 
uint16_t, r->in.offered / 2);
                        if (r->out.key_buffer == NULL) {
                        return NT_STATUS_NO_MEMORY;
                        }
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 04681bf..bb517a1 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1527,6 +1527,74 @@ import "misc.idl", "security.idl", "winreg.idl";
                [default,flag(NDR_REMAINING)] DATA_BLOB data;
        } spoolss_PrinterData;
 
+       /* predefined registry key names for printer data */
+
+       const string SPOOL_PRINTERDATA_KEY              = "PrinterDriverData";
+       const string SPOOL_DSSPOOLER_KEY                = "DsSpooler";
+       const string SPOOL_DSDRIVER_KEY                 = "DsDriver";
+       const string SPOOL_DSUSER_KEY                   = "DsUser";
+       const string SPOOL_PNPDATA_KEY                  = "PnPData";
+       const string SPOOL_OID_KEY                      = "OID";
+
+       /* predefined value names for printer data */
+
+       const string SPOOL_REG_ASSETNUMBER              = "assetNumber";
+       const string SPOOL_REG_BYTESPERMINUTE           = "bytesPerMinute";
+       const string SPOOL_REG_DEFAULTPRIORITY          = "defaultPriority";
+       const string SPOOL_REG_DESCRIPTION              = "description";
+       const string SPOOL_REG_DRIVERNAME               = "driverName";
+       const string SPOOL_REG_DRIVERVERSION            = "driverVersion";
+       const string SPOOL_REG_FLAGS                    = "flags";
+       const string SPOOL_REG_LOCATION                 = "location";
+       const string SPOOL_REG_OPERATINGSYSTEM          = "operatingSystem";
+       const string SPOOL_REG_OPERATINGSYSTEMHOTFIX    = 
"operatingSystemHotfix";
+       const string SPOOL_REG_OPERATINGSYSTEMSERVICEPACK = 
"operatingSystemServicePack";
+       const string SPOOL_REG_OPERATINGSYSTEMVERSION   = 
"operatingSystemVersion";
+       const string SPOOL_REG_PORTNAME                 = "portName";
+       const string SPOOL_REG_PRINTATTRIBUTES          = "printAttributes";
+       const string SPOOL_REG_PRINTBINNAMES            = "printBinNames";
+       const string SPOOL_REG_PRINTCOLLATE             = "printCollate";
+       const string SPOOL_REG_PRINTCOLOR               = "printColor";
+       const string SPOOL_REG_PRINTDUPLEXSUPPORTED     = 
"printDuplexSupported";
+       const string SPOOL_REG_PRINTENDTIME             = "printEndTime";
+       const string SPOOL_REG_PRINTERNAME              = "printerName";
+       const string SPOOL_REG_PRINTFORMNAME            = "printFormName";
+       const string SPOOL_REG_PRINTKEEPPRINTEDJOBS     = 
"printKeepPrintedJobs";
+       const string SPOOL_REG_PRINTLANGUAGE            = "printLanguage";
+       const string SPOOL_REG_PRINTMACADDRESS          = "printMACAddress";
+       const string SPOOL_REG_PRINTMAXCOPIES           = "printMaxCopies";
+       const string SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED = 
"printMaxResolutionSupported";
+       const string SPOOL_REG_PRINTMAXXEXTENT          = "printMaxXExtent";
+       const string SPOOL_REG_PRINTMAXYEXTENT          = "printMaxYExtent";
+       const string SPOOL_REG_PRINTMEDIAREADY          = "printMediaReady";
+       const string SPOOL_REG_PRINTMEDIASUPPORTED      = "printMediaSupported";
+       const string SPOOL_REG_PRINTMEMORY              = "printMemory";
+       const string SPOOL_REG_PRINTMINXEXTENT          = "printMinXExtent";
+       const string SPOOL_REG_PRINTMINYEXTENT          = "printMinYExtent";
+       const string SPOOL_REG_PRINTNETWORKADDRESS      = "printNetworkAddress";
+       const string SPOOL_REG_PRINTNOTIFY              = "printNotify";
+       const string SPOOL_REG_PRINTNUMBERUP            = "printNumberUp";
+       const string SPOOL_REG_PRINTORIENTATIONSSUPPORTED = 
"printOrientationsSupported";
+       const string SPOOL_REG_PRINTOWNER               = "printOwner";
+       const string SPOOL_REG_PRINTPAGESPERMINUTE      = "printPagesPerMinute";
+       const string SPOOL_REG_PRINTRATE                = "printRate";
+       const string SPOOL_REG_PRINTRATEUNIT            = "printRateUnit";
+       const string SPOOL_REG_PRINTSEPARATORFILE       = "printSeparatorFile";
+       const string SPOOL_REG_PRINTSHARENAME           = "printShareName";
+       const string SPOOL_REG_PRINTSPOOLING            = "printSpooling";
+       const string SPOOL_REGVAL_PRINTWHILESPOOLING    = "PrintWhileSpooling";
+       const string SPOOL_REGVAL_PRINTAFTERSPOOLED     = "PrintAfterSpooled";
+       const string SPOOL_REGVAL_PRINTDIRECT           = "PrintDirect";
+       const string SPOOL_REG_PRINTSTAPLINGSUPPORTED   = 
"printStaplingSupported";
+       const string SPOOL_REG_PRINTSTARTTIME           = "printStartTime";
+       const string SPOOL_REG_PRINTSTATUS              = "printStatus";
+       const string SPOOL_REG_PRIORITY                 = "priority";
+       const string SPOOL_REG_SERVERNAME               = "serverName";
+       const string SPOOL_REG_SHORTSERVERNAME          = "shortServerName";
+       const string SPOOL_REG_UNCNAME                  = "uNCName";
+       const string SPOOL_REG_URL                      = "url";
+       const string SPOOL_REG_VERSIONNUMBER            = "versionNumber";
+
        [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
                [in,ref] policy_handle *handle,
                [in]     [string,charset(UTF16)] uint16 value_name[],
@@ -2508,7 +2576,7 @@ import "misc.idl", "security.idl", "winreg.idl";
        [public] WERROR spoolss_EnumPrinterKey(
                [in, ref] policy_handle *handle,
                [in] [string,charset(UTF16)] uint16 key_name[],
-               [out,ref] [subcontext(0),subcontext_size(offered)] 
nstring_array **key_buffer,
+               [out,ref] [size_is(offered/2)] uint16 *key_buffer,
                [in] uint32 offered,
                [out,ref] uint32 *needed
        );
diff --git a/source3/Makefile.in b/source3/Makefile.in
index cb10a7c..724c221 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2524,7 +2524,7 @@ bin/v...@exeext@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
 
 bin/winbind_krb5_locat...@shlibext@: $(BINARY_PREREQS) 
$(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
        @echo "Linking $@"
-       @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) 
$(LIBWBCLIENT_LIBS) $(KRB5_LIBS) \
+       @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) 
$(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
                @sonamef...@`basename $...@`
 
 bin/pam_winbi...@shlibext@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) 
$(LIBWBCLIENT)
@@ -3082,18 +3082,21 @@ TOPFILES=dynconfig.o localedir.o
 
 cleanlibs::
        -rm -f ../lib/*/*.o ../lib/*/*/*.o \
+               ../lib/*/*.ho \
                ../libcli/*.o ../libcli/*/*.o ../libcli/*/*/*.o \
                ../librpc/*/*.o \
-               ../libgpo/*.o ../libgpo/*/*.o
+               ../libgpo/*.o ../libgpo/*/*.o \
+               ../libds/*.o ../libds/*/*.o
 
 clean:: cleanlibs
        -rm -f include/build_env.h
        -rm -f smbd/build_options.c
        -rm -f $(PRECOMPILED_HEADER)
        -rm -f core */*~ *~ \
-               */*.o */*/*.o */*/*/*.o \
+               */*.o */*/*.o */*/*/*.o */*/*/*/*.o \
                ../testsuite/*/*.o \
-               ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*...@shlibext@ \
+               ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o 
../nsswitch/*...@shlibext@ \
+               ../client/*.o \
                */*...@shlibext@ */*/*...@shlibext@ */*/*/*...@shlibext@ \
                $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
                $(MODULES) $(TORTURE_PROGS) \
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 12096c8..3a509a2 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -22,114 +22,6 @@
 #ifndef NT_PRINTING_H_
 #define NT_PRINTING_H_
 
-typedef struct nt_printer_driver_info_level_3
-{
-       uint32 cversion;
-
-       fstring name;
-       fstring environment;
-       fstring driverpath;
-       fstring datafile;
-       fstring configfile;
-       fstring helpfile;
-       fstring monitorname;
-       fstring defaultdatatype;
-       fstring *dependentfiles;
-} NT_PRINTER_DRIVER_INFO_LEVEL_3;
-
-/* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
-typedef struct {
-       uint32  version;
-       fstring name;
-       fstring environment;
-       fstring driverpath;
-       fstring datafile;
-       fstring configfile;
-       fstring helpfile;
-       fstring monitorname;
-       fstring defaultdatatype;
-       fstring mfgname;
-       fstring oemurl;
-       fstring hardwareid;
-       fstring provider;
-       fstring *dependentfiles;
-       fstring *previousnames;
-} NT_PRINTER_DRIVER_INFO_LEVEL_6;
-
-
-typedef struct nt_printer_driver_info_level
-{
-       NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
-       NT_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
-} NT_PRINTER_DRIVER_INFO_LEVEL;
-
-/* predefined registry key names for printer data */
-
-#define SPOOL_PRINTERDATA_KEY          "PrinterDriverData"
-#define SPOOL_DSSPOOLER_KEY            "DsSpooler"
-#define SPOOL_DSDRIVER_KEY             "DsDriver"
-#define SPOOL_DSUSER_KEY               "DsUser"
-#define SPOOL_PNPDATA_KEY              "PnPData"
-#define SPOOL_OID_KEY                  "OID"
-
-/* predefined value names for printer data */
-#define SPOOL_REG_ASSETNUMBER          "assetNumber"
-#define SPOOL_REG_BYTESPERMINUTE       "bytesPerMinute"
-#define SPOOL_REG_DEFAULTPRIORITY      "defaultPriority"
-#define SPOOL_REG_DESCRIPTION          "description"
-#define SPOOL_REG_DRIVERNAME           "driverName"
-#define SPOOL_REG_DRIVERVERSION                "driverVersion"
-#define SPOOL_REG_FLAGS                        "flags"
-#define SPOOL_REG_LOCATION             "location"
-#define SPOOL_REG_OPERATINGSYSTEM      "operatingSystem"
-#define SPOOL_REG_OPERATINGSYSTEMHOTFIX        "operatingSystemHotfix"


-- 
Samba Shared Repository

Reply via email to