The branch, v3-4-test has been updated
       via  b5f5d3afa4f19b1219d4f20fefa2785811105c0d (commit)
       via  ab4e2da6cf9d8ef72aa73b2a9a18207b9986305d (commit)
       via  10dd219380a2a9ab609be3fb7312795d0fdaab86 (commit)
      from  f922e22d907d4a99e91f00f001c05b2b35d73a26 (commit)

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


- Log -----------------------------------------------------------------
commit b5f5d3afa4f19b1219d4f20fefa2785811105c0d
Author: Günther Deschner <[email protected]>
Date:   Tue Apr 7 01:12:34 2009 +0200

    s3: re-run make samba3-idl.
    
    Guenther
    (cherry picked from commit eeddbb6f8466d285fd103a3a4da9ebf5afbcb613)

commit ab4e2da6cf9d8ef72aa73b2a9a18207b9986305d
Author: Günther Deschner <[email protected]>
Date:   Tue Apr 7 01:11:44 2009 +0200

    svcctl: Fix svcctl_ControlsAccepted bitmask.
    
    Never ever have 0 value in a bitmask...
    
    pidl should generate at least a warning about those things.
    
    Guenther
    (cherry picked from commit 557f38326badcd8e1d2338f76c5717e16ae7a7d3)

commit 10dd219380a2a9ab609be3fb7312795d0fdaab86
Author: Günther Deschner <[email protected]>
Date:   Tue Apr 7 01:10:41 2009 +0200

    s3-svcctl: Fix _svcctl_EnumServicesStatusW() crash bug on too small buffer.
    
    Guenther
    (cherry picked from commit 21b083a647997549e8188c6fc0687fdecfaa4cb3)

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

Summary of changes:
 librpc/gen_ndr/ndr_svcctl.c        |    1 -
 librpc/gen_ndr/svcctl.h            |    2 +-
 librpc/idl/svcctl.idl              |    3 ++-
 source3/rpc_server/srv_svcctl_nt.c |    4 +++-
 4 files changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c
index 6101b7d..3dd61b2 100644
--- a/librpc/gen_ndr/ndr_svcctl.c
+++ b/librpc/gen_ndr/ndr_svcctl.c
@@ -120,7 +120,6 @@ _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct 
ndr_print *ndr, const cha
 {
        ndr_print_uint32(ndr, name, r);
        ndr->depth++;
-       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NONE", 
SVCCTL_ACCEPT_NONE, r);
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", 
SVCCTL_ACCEPT_STOP, r);
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
"SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r);
        ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", 
SVCCTL_ACCEPT_SHUTDOWN, r);
diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h
index 6ba0e4f..16d4821 100644
--- a/librpc/gen_ndr/svcctl.h
+++ b/librpc/gen_ndr/svcctl.h
@@ -9,6 +9,7 @@
 #ifndef _HEADER_svcctl
 #define _HEADER_svcctl
 
+#define SVCCTL_ACCEPT_NONE     ( 0x00000000 )
 #define SERVICE_TYPE_KERNEL_DRIVER     ( 0x01 )
 #define SERVICE_TYPE_FS_DRIVER ( 0x02 )
 #define SERVICE_TYPE_ADAPTER   ( 0x04 )
@@ -59,7 +60,6 @@ enum svcctl_ServiceStatus
 ;
 
 /* bitmap svcctl_ControlsAccepted */
-#define SVCCTL_ACCEPT_NONE ( 0x00000000 )
 #define SVCCTL_ACCEPT_STOP ( 0x00000001 )
 #define SVCCTL_ACCEPT_PAUSE_CONTINUE ( 0x00000002 )
 #define SVCCTL_ACCEPT_SHUTDOWN ( 0x00000004 )
diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl
index 3f99029..4b66d9c 100644
--- a/librpc/idl/svcctl.idl
+++ b/librpc/idl/svcctl.idl
@@ -30,8 +30,9 @@ import "misc.idl", "security.idl";
                SVCCTL_PAUSED                   = 0x00000007
        } svcctl_ServiceStatus;
 
+       const int SVCCTL_ACCEPT_NONE                    = 0x00000000;
+
        typedef [bitmap32bit] bitmap {
-               SVCCTL_ACCEPT_NONE                      = 0x00000000,
                SVCCTL_ACCEPT_STOP                      = 0x00000001,
                SVCCTL_ACCEPT_PAUSE_CONTINUE            = 0x00000002,
                SVCCTL_ACCEPT_SHUTDOWN                  = 0x00000004,
diff --git a/source3/rpc_server/srv_svcctl_nt.c 
b/source3/rpc_server/srv_svcctl_nt.c
index 3ca85aa..848cdc2 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -468,9 +468,11 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
                }
 
                blob = ndr_push_blob(ndr);
+               if (blob.length >= r->in.buf_size) {
+                       memcpy(r->out.service, blob.data, r->in.buf_size);
+               }
        }
 
-       r->out.service                  = blob.data;
        *r->out.bytes_needed            = (buffer_size > r->in.buf_size) ? 
buffer_size : r->in.buf_size;
        *r->out.services_returned       = (uint32)num_services;
        *r->out.resume_handle           = 0x0;


-- 
Samba Shared Repository

Reply via email to