The branch, master has been updated
       via  3ca8d28... spoolss: fix build and version in spoolss_PrinterInfo0 
(aka PRINTER_INFO_STRESS).
       via  b1f18fb... spoolss: add spoolss_Build to IDL.
      from  062a8cf... s4-winbind: Fixed the memory context of 
tstream_bsd_existing()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3ca8d28bb7c33fe7733f036c8a6254545b0410ce
Author: Günther Deschner <g...@samba.org>
Date:   Fri Feb 26 14:45:07 2010 +0100

    spoolss: fix build and version in spoolss_PrinterInfo0 (aka 
PRINTER_INFO_STRESS).
    
    Guenther

commit b1f18fb808d56e5c29e78e838802553c5e95f824
Author: Günther Deschner <g...@samba.org>
Date:   Fri Feb 26 14:44:22 2010 +0100

    spoolss: add spoolss_Build to IDL.
    
    Guenther

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

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c        |   31 ++++++++++++++++++++++++++++---
 librpc/gen_ndr/ndr_spoolss.h        |    1 +
 librpc/gen_ndr/spoolss.h            |   15 ++++++++++++++-
 librpc/idl/spoolss.idl              |    7 ++++++-
 source3/rpc_server/srv_spoolss_nt.c |    5 +++--
 5 files changed, 52 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 2448f73..0610c18 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -6810,6 +6810,31 @@ _PUBLIC_ void ndr_print_spoolss_PrinterControl(struct 
ndr_print *ndr, const char
        ndr_print_enum(ndr, name, "ENUM", val, r);
 }
 
+static enum ndr_err_code ndr_push_spoolss_Build(struct ndr_push *ndr, int 
ndr_flags, enum spoolss_Build r)
+{
+       NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_Build(struct ndr_pull *ndr, int 
ndr_flags, enum spoolss_Build *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_Build(struct ndr_print *ndr, const char *name, 
enum spoolss_Build r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case SPOOLSS_DEBUGGING_BUILD: val = "SPOOLSS_DEBUGGING_BUILD"; 
break;
+               case SPOOLSS_RELEASE_BUILD: val = "SPOOLSS_RELEASE_BUILD"; 
break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo0(struct ndr_push 
*ndr, int ndr_flags, const struct spoolss_SetPrinterInfo0 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -6823,7 +6848,7 @@ static enum ndr_err_code 
ndr_push_spoolss_SetPrinterInfo0(struct ndr_push *ndr,
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->free_build));
+               NDR_CHECK(ndr_push_spoolss_Build(ndr, NDR_SCALARS, 
r->free_build));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r->session_counter));
@@ -6889,7 +6914,7 @@ static enum ndr_err_code 
ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull *ndr,
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
&r->global_counter));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->free_build));
+               NDR_CHECK(ndr_pull_spoolss_Build(ndr, NDR_SCALARS, 
&r->free_build));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
&r->session_counter));
@@ -6963,7 +6988,7 @@ _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo0(struct 
ndr_print *ndr, const cha
        ndr_print_uint32(ndr, "global_counter", r->global_counter);
        ndr_print_uint32(ndr, "total_pages", r->total_pages);
        ndr_print_uint32(ndr, "version", r->version);
-       ndr_print_uint32(ndr, "free_build", r->free_build);
+       ndr_print_spoolss_Build(ndr, "free_build", r->free_build);
        ndr_print_uint32(ndr, "spooling", r->spooling);
        ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
        ndr_print_uint32(ndr, "session_counter", r->session_counter);
diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h
index 52873de..394db03 100644
--- a/librpc/gen_ndr/ndr_spoolss.h
+++ b/librpc/gen_ndr/ndr_spoolss.h
@@ -347,6 +347,7 @@ void ndr_print_spoolss_SetJobInfo(struct ndr_print *ndr, 
const char *name, const
 void ndr_print_spoolss_JobInfoContainer(struct ndr_print *ndr, const char 
*name, const struct spoolss_JobInfoContainer *r);
 void ndr_print_spoolss_JobControl(struct ndr_print *ndr, const char *name, 
enum spoolss_JobControl r);
 void ndr_print_spoolss_PrinterControl(struct ndr_print *ndr, const char *name, 
enum spoolss_PrinterControl r);
+void ndr_print_spoolss_Build(struct ndr_print *ndr, const char *name, enum 
spoolss_Build r);
 void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print *ndr, const char 
*name, const struct spoolss_SetPrinterInfo0 *r);
 void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print *ndr, const char 
*name, const struct spoolss_SetPrinterInfo1 *r);
 void ndr_print_spoolss_SetPrinterInfo2(struct ndr_print *ndr, const char 
*name, const struct spoolss_SetPrinterInfo2 *r);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 1111ece..da0d26d 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -1467,6 +1467,19 @@ enum spoolss_PrinterControl
 #endif
 ;
 
+enum spoolss_Build
+#ifndef USE_UINT_ENUMS
+ {
+       SPOOLSS_DEBUGGING_BUILD=(int)(0x00000000),
+       SPOOLSS_RELEASE_BUILD=(int)(0x00000001)
+}
+#else
+ { __donnot_use_enum_spoolss_Build=0x7FFFFFFF}
+#define SPOOLSS_DEBUGGING_BUILD ( 0x00000000 )
+#define SPOOLSS_RELEASE_BUILD ( 0x00000001 )
+#endif
+;
+
 struct spoolss_SetPrinterInfo0 {
        const char *servername;/* [unique,charset(UTF16)] */
        const char *printername;/* [unique,charset(UTF16)] */
@@ -1477,7 +1490,7 @@ struct spoolss_SetPrinterInfo0 {
        uint32_t global_counter;
        uint32_t total_pages;
        uint32_t version;
-       uint32_t free_build;
+       enum spoolss_Build free_build;
        uint32_t spooling;
        uint32_t max_spooling;
        uint32_t session_counter;
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 7dad795..530e09e 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1146,6 +1146,11 @@ cpp_quote("#define spoolss_security_descriptor 
security_descriptor")
                SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
        } spoolss_PrinterControl;
 
+       typedef [v1_enum] enum {
+               SPOOLSS_DEBUGGING_BUILD         = 0x00000000,
+               SPOOLSS_RELEASE_BUILD           = 0x00000001
+       } spoolss_Build;
+
        typedef struct {
                [string,charset(UTF16)] uint16 *servername;
                [string,charset(UTF16)] uint16 *printername;
@@ -1156,7 +1161,7 @@ cpp_quote("#define spoolss_security_descriptor 
security_descriptor")
                uint32 global_counter;
                uint32 total_pages;
                uint32 version;
-               uint32 free_build;
+               spoolss_Build free_build;
                uint32 spooling;
                uint32 max_spooling;
                uint32 session_counter;
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index b978a5c..c7f66bc 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3587,8 +3587,9 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx,
        r->global_counter               = session_counter->counter;
        r->total_pages                  = 0;
        /* in 2.2 we reported ourselves as 0x0004 and 0x0565 */
-       r->version                      = 0x0005;       /* NT 5 */
-       r->free_build                   = 0x0893;       /* build 2195 */
+       SSVAL(&r->version, 0, 0x0005); /* NT 5 */
+       SSVAL(&r->version, 2, 0x0893); /* build 2195 */
+       r->free_build                   = SPOOLSS_RELEASE_BUILD;
        r->spooling                     = 0;
        r->max_spooling                 = 0;
        r->session_counter              = session_counter->counter;


-- 
Samba Shared Repository

Reply via email to