[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4664-ga42b38b

Günther Deschner gd at samba.org
Fri Dec 12 00:06:06 GMT 2008


The branch, v3-3-test has been updated
       via  a42b38b34d4e97d2c196e67aef3b01d4f043b646 (commit)
       via  273edcb97c19e6318002aa9af950da22018a64dd (commit)
       via  b39c3b6445a80cb04e131947408da6af689c5ac7 (commit)
       via  a9b2522b6c400c5594073ff4b2a40983b5c492e7 (commit)
       via  210e4cb42833fc6e4f934bd5f4406f37ee0a347d (commit)
       via  c1b0bfeefa57cdb0e2234474027003257a521ab8 (commit)
       via  3673581e02baa1c65d8d08df041f2ebf9ee1780c (commit)
       via  9e8aa924f34c1db89151e83f3b561c043da0c994 (commit)
       via  c38e067dffea512ff67384e6e2850ab682c27f46 (commit)
       via  7b2b810d30bf58df83ec3f2ec7505c43187d62f9 (commit)
       via  a8484c418afb5bb611e3b126e09e90d375f40b22 (commit)
       via  f97468bfecd3d227c7e942cb56f32c6aecf0887b (commit)
       via  2dfeb2d5970f52e4948e22a2a4e4f47479a550dc (commit)
       via  60222a78c00ad9d1d09789024184c430bff0f68b (commit)
       via  650077c22b2e67815c9a2fd8a1cc56986c0aaced (commit)
       via  704b0d35707483a8fbf89da55a2d161375e56b3a (commit)
      from  7eea7edfd02778599771edd3356888c848578766 (commit)

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


- Log -----------------------------------------------------------------
commit a42b38b34d4e97d2c196e67aef3b01d4f043b646
Author: Günther Deschner <gd at samba.org>
Date:   Fri Oct 24 01:57:28 2008 +0200

    netapi: fix access bits in netapi.
    
    Guenther

commit 273edcb97c19e6318002aa9af950da22018a64dd
Author: Günther Deschner <gd at samba.org>
Date:   Thu Oct 23 22:26:21 2008 +0200

    s3-samr-server: remove unused historic code.
    
    Guenther

commit b39c3b6445a80cb04e131947408da6af689c5ac7
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 27 18:23:50 2008 +0100

    s3-netlogon: kill an fstring in rpc_server.
    
    Guenther

commit a9b2522b6c400c5594073ff4b2a40983b5c492e7
Author: Volker Lendecke <vl at sernet.de>
Date:   Tue Sep 2 09:44:39 2008 +0200

    Remove unused CLI_DO_RPC macros (This used to be commit f5212c64d23a28fa40a14b45a8d1c0181f01a6da)

commit 210e4cb42833fc6e4f934bd5f4406f37ee0a347d
Author: Günther Deschner <gd at samba.org>
Date:   Sat Nov 29 01:51:38 2008 +0100

    s3-passdb: remove unused (now samr.idl) ACCT_NT/LM_PWD_SET flags.
    
    Guenther

commit c1b0bfeefa57cdb0e2234474027003257a521ab8
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 11 23:14:38 2008 +0100

    make installmo.sh executeable.
    
    Guenther

commit 3673581e02baa1c65d8d08df041f2ebf9ee1780c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Nov 23 19:37:36 2008 +0100

    Fix an uninitialized variable warning
    
    Andreas Schneider, please check!

commit 9e8aa924f34c1db89151e83f3b561c043da0c994
Author: Günther Deschner <gd at samba.org>
Date:   Sat Nov 29 00:29:47 2008 +0100

    samr: fix samr_UserInfo21 (order of lm_password_set and nt_password_set).
    
    Guenther

commit c38e067dffea512ff67384e6e2850ab682c27f46
Author: Günther Deschner <gd at samba.org>
Date:   Wed Nov 5 15:10:52 2008 +0100

    s3-build: re-run make samba3-idl.
    
    Guenther

commit 7b2b810d30bf58df83ec3f2ec7505c43187d62f9
Author: Günther Deschner <gd at samba.org>
Date:   Wed Nov 5 02:02:50 2008 +0100

    s3-samr-idl: fix samr_ValidatePassword.
    
    Guenther

commit a8484c418afb5bb611e3b126e09e90d375f40b22
Author: Günther Deschner <gd at samba.org>
Date:   Wed Nov 5 02:03:16 2008 +0100

    s3-samr-idl: fix samr_QueryUserInfo2.
    
    Guenther

commit f97468bfecd3d227c7e942cb56f32c6aecf0887b
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 11 22:55:27 2008 +0100

    messaging: move types to IDL.
    
    Guenther
    (This used to be commit 6c346d0eb20af5ba9b09f30319420f7c91480da6)

commit 2dfeb2d5970f52e4948e22a2a4e4f47479a550dc
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 11 11:25:45 2008 +0100

    s3-libnet: fix DEBUG statement in libnet_keytab.
    
    Guenther

commit 60222a78c00ad9d1d09789024184c430bff0f68b
Author: Günther Deschner <gd at samba.org>
Date:   Tue Dec 9 14:48:10 2008 +0100

    s3-libnet: fix build warning (missing prototype).
    
    Guenther

commit 650077c22b2e67815c9a2fd8a1cc56986c0aaced
Author: Günther Deschner <gd at samba.org>
Date:   Tue Nov 4 14:34:23 2008 +0100

    s3-libnet_samsync: print new line in display output.
    
    Guenther

commit 704b0d35707483a8fbf89da55a2d161375e56b3a
Author: Günther Deschner <gd at samba.org>
Date:   Thu Dec 11 22:20:08 2008 +0100

    s3-samr: avoid code duplication for identical code in _samr_Connect2, 4 and 5.
    
    Guenther

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

Summary of changes:
 source/include/includes.h              |    1 +
 source/include/messages.h              |   85 ------------------
 source/include/passdb.h                |   10 --
 source/include/rpc_client.h            |   48 ----------
 source/lib/netapi/user.c               |    2 +-
 source/libnet/libnet_keytab.c          |    2 +-
 source/libnet/libnet_samsync.c         |    4 +-
 source/libnet/libnet_samsync_display.c |    6 +-
 source/librpc/gen_ndr/cli_samr.c       |    6 +-
 source/librpc/gen_ndr/cli_samr.h       |    6 +-
 source/librpc/gen_ndr/messaging.h      |  116 ++++++++++++++++++++++++-
 source/librpc/gen_ndr/ndr_messaging.c  |   81 ++++++++++++++++-
 source/librpc/gen_ndr/ndr_messaging.h  |    3 +
 source/librpc/gen_ndr/ndr_samr.c       |   91 +++++++++++++++----
 source/librpc/gen_ndr/samr.h           |    6 +-
 source/librpc/gen_ndr/srv_samr.c       |    4 +-
 source/librpc/idl/messaging.idl        |   84 +++++++++++++++++-
 source/librpc/idl/samr.idl             |    8 +-
 source/nsswitch/pam_winbind.c          |    2 +-
 source/rpc_server/srv_netlog_nt.c      |    9 +--
 source/rpc_server/srv_samr_nt.c        |  153 +++----------------------------
 21 files changed, 394 insertions(+), 333 deletions(-)
 mode change 100644 => 100755 source/script/installmo.sh


Changeset truncated at 500 lines:

diff --git a/source/include/includes.h b/source/include/includes.h
index ea0af9f..b90f12a 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -703,6 +703,7 @@ typedef char fstring[FSTRING_LEN];
 #include "librpc/gen_ndr/notify.h"
 #include "librpc/gen_ndr/xattr.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
+#include "librpc/gen_ndr/messaging.h"
 #include "librpc/rpc/dcerpc.h"
 #include "nt_printing.h"
 #include "idmap.h"
diff --git a/source/include/messages.h b/source/include/messages.h
index b3ac5e4..db805a2 100644
--- a/source/include/messages.h
+++ b/source/include/messages.h
@@ -24,91 +24,6 @@
 /* change the message version with any incompatible changes in the protocol */
 #define MESSAGE_VERSION 2
 
-
-#define MSG_TYPE_MASK			0xFFFF
-
-/* general messages */
-#define MSG_DEBUG			0x0001
-#define MSG_PING			0x0002
-#define MSG_PONG			0x0003
-#define MSG_PROFILE			0x0004
-#define MSG_REQ_DEBUGLEVEL		0x0005
-#define MSG_DEBUGLEVEL			0x0006
-#define MSG_REQ_PROFILELEVEL		0x0007
-#define MSG_PROFILELEVEL		0x0008
-#define MSG_REQ_POOL_USAGE		0x0009
-#define MSG_POOL_USAGE			0x000A
-
-/* If dmalloc is included, set a steady-state mark */
-#define MSG_REQ_DMALLOC_MARK		0x000B
-
-/* If dmalloc is included, dump to the dmalloc log a description of
- * what has changed since the last MARK */
-#define MSG_REQ_DMALLOC_LOG_CHANGED	0x000C
-
-#define MSG_SHUTDOWN			0x000D
-
-/* nmbd messages */
-#define MSG_FORCE_ELECTION		0x0101
-#define MSG_WINS_NEW_ENTRY		0x0102
-#define MSG_SEND_PACKET			0x0103
-
-/* printing messages */
-/* #define MSG_PRINTER_NOTIFY  2001*/ /* Obsolete */
-#define MSG_PRINTER_NOTIFY2		0x0202
-
-#define MSG_PRINTER_DRVUPGRADE		0x0203
-#define MSG_PRINTERDATA_INIT_RESET	0x0204
-#define MSG_PRINTER_UPDATE		0x0205
-#define MSG_PRINTER_MOD			0x0206
-
-/* smbd messages */
-#define MSG_SMB_CONF_UPDATED		0x0301
-#define MSG_SMB_FORCE_TDIS		0x0302
-#define MSG_SMB_SAM_SYNC		0x0303
-#define MSG_SMB_SAM_REPL		0x0304
-#define MSG_SMB_UNLOCK			0x0305
-#define MSG_SMB_BREAK_REQUEST		0x0306
-#define MSG_SMB_BREAK_RESPONSE		0x0307
-#define MSG_SMB_ASYNC_LEVEL2_BREAK	0x0308
-#define MSG_SMB_OPEN_RETRY		0x0309
-#define MSG_SMB_KERNEL_BREAK		0x030A
-#define MSG_SMB_FILE_RENAME		0x030B
-#define MSG_SMB_INJECT_FAULT		0x030C
-#define MSG_SMB_BLOCKING_LOCK_CANCEL	0x030D
-#define MSG_SMB_NOTIFY			0x030E
-#define MSG_SMB_STAT_CACHE_DELETE	0x030F
-/*
- * Samba4 compatibility
- */
-#define MSG_PVFS_NOTIFY			0x0310
-/*
- * cluster reconfigure events
- */
-#define MSG_SMB_BRL_VALIDATE		0x0311
-#define MSG_SMB_RELEASE_IP		0x0312
-/*
- * Close a specific file given a share entry.
- */
-#define MSG_SMB_CLOSE_FILE		0x0313
-
-/* winbind messages */
-#define MSG_WINBIND_FINISHED		0x0401
-#define MSG_WINBIND_FORGET_STATE	0x0402
-#define MSG_WINBIND_ONLINE		0x0403
-#define MSG_WINBIND_OFFLINE		0x0404
-#define MSG_WINBIND_ONLINESTATUS	0x0405
-#define MSG_WINBIND_TRY_TO_GO_ONLINE	0x0406
-#define MSG_WINBIND_FAILED_TO_GO_ONLINE 0x0407
-#define MSG_WINBIND_VALIDATE_CACHE	0x0408
-#define MSG_WINBIND_DUMP_DOMAIN_LIST	0x0409
-
-/* event messages */
-#define MSG_DUMP_EVENT_LIST		0x0500
-
-/* dbwrap messages 4001-4999 */
-#define MSG_DBWRAP_TDB2_CHANGES		4001
-
 /*
  * Special flags passed to message_send. Allocated from the top, lets see when
  * it collides with the message types in the lower 16 bits :-)
diff --git a/source/include/passdb.h b/source/include/passdb.h
index 360a0d0..744b723 100644
--- a/source/include/passdb.h
+++ b/source/include/passdb.h
@@ -23,16 +23,6 @@
 #ifndef _PASSDB_H
 #define _PASSDB_H
 
-
-/*
- * in samba4 idl
- * ACCT_NT_PWD_SET == SAMR_FIELD_PASSWORD and
- * ACCT_LM_PWD_SET == SAMR_FIELD_PASSWORD2
- */
-
-#define ACCT_NT_PWD_SET		0x01000000
-#define ACCT_LM_PWD_SET		0x02000000
-
 /*
  * bit flags representing initialized fields in struct samu
  */
diff --git a/source/include/rpc_client.h b/source/include/rpc_client.h
index d1af6f9..684044b 100644
--- a/source/include/rpc_client.h
+++ b/source/include/rpc_client.h
@@ -42,54 +42,6 @@
 
 /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
 
-#define CLI_DO_RPC_INTERNAL( pcli, ctx, interface, opnum, q_in, r_out, \
-                             q_ps, r_ps, q_io_fn, r_io_fn, default_error, copy_sess_key ) \
-{\
-	SMB_ASSERT(ndr_syntax_id_equal(&pcli->abstract_syntax, interface)); \
-	if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \
-		return NT_STATUS_NO_MEMORY;\
-	}\
-	prs_init_empty( &r_ps, ctx, UNMARSHALL );\
-	if ( copy_sess_key) prs_set_session_key(&q_ps, (const char *)pcli->dc->sess_key);\
-	if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
-		NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \
-		if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\
-			prs_mem_free( &q_ps );\
-			prs_mem_free( &r_ps );\
-			return _smb_pipe_stat_;\
-		}\
-		if ( copy_sess_key ) prs_set_session_key(&r_ps, (const char *)pcli->dc->sess_key);\
-		if (!r_io_fn("", &r_out, &r_ps, 0)) {\
-			prs_mem_free( &q_ps );\
-			prs_mem_free( &r_ps );\
-			return default_error;\
-		}\
-	} else {\
-		prs_mem_free( &q_ps );\
-		prs_mem_free( &r_ps );\
-		return default_error;\
-	}\
-	prs_mem_free( &q_ps );\
-	prs_mem_free( &r_ps );\
-}
-
-#define CLI_DO_RPC_COPY_SESS_KEY( pcli, ctx, p_idx, opnum, q_in, r_out, \
-				  q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
-{\
-	CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \
-			     q_ps, r_ps, q_io_fn, r_io_fn, default_error, True ); \
-}
-
-#define CLI_DO_RPC( pcli, ctx, p_idx, opnum, q_in, r_out, \
-                    q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
-{\
-	CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \
-			     q_ps, r_ps, q_io_fn, r_io_fn, default_error, False ); \
-}
-
-
-/* Arrrgg. Same but with WERRORS. Needed for registry code. */
-
 #define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \
                              q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
 {\
diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index d7fe392..1f4b03f 100644
--- a/source/lib/netapi/user.c
+++ b/source/lib/netapi/user.c
@@ -553,7 +553,7 @@ WERROR NetUserDel_r(struct libnetapi_ctx *ctx,
 
 	status = rpccli_samr_OpenUser(pipe_cli, ctx,
 				      &domain_handle,
-				      STD_RIGHT_DELETE_ACCESS,
+				      SEC_STD_DELETE,
 				      user_rids.ids[0],
 				      &user_handle);
 	if (!NT_STATUS_IS_OK(status)) {
diff --git a/source/libnet/libnet_keytab.c b/source/libnet/libnet_keytab.c
index 990f6f6..8195694 100644
--- a/source/libnet/libnet_keytab.c
+++ b/source/libnet/libnet_keytab.c
@@ -324,7 +324,7 @@ struct libnet_keytab_entry *libnet_keytab_search(struct libnet_keytab_context *c
 
 	ret = krb5_kt_start_seq_get(ctx->context, ctx->keytab, &cursor);
 	if (ret) {
-		DEBUG(10, ("krb5_kt_start_seq_get failed: %s",
+		DEBUG(10, ("krb5_kt_start_seq_get failed: %s\n",
 			  error_message(ret)));
 		return NULL;
 	}
diff --git a/source/libnet/libnet_samsync.c b/source/libnet/libnet_samsync.c
index 7b264c5..87b3f9c 100644
--- a/source/libnet/libnet_samsync.c
+++ b/source/libnet/libnet_samsync.c
@@ -282,8 +282,8 @@ static const char *samsync_debug_str(TALLOC_CTX *mem_ctx,
  * libnet_samsync
  */
 
-void libnet_init_netr_ChangeLogEntry(struct samsync_object *o,
-				     struct netr_ChangeLogEntry *e)
+static void libnet_init_netr_ChangeLogEntry(struct samsync_object *o,
+					    struct netr_ChangeLogEntry *e)
 {
 	ZERO_STRUCTP(e);
 
diff --git a/source/libnet/libnet_samsync_display.c b/source/libnet/libnet_samsync_display.c
index 19ec88a..c8d9ec6 100644
--- a/source/libnet/libnet_samsync_display.c
+++ b/source/libnet/libnet_samsync_display.c
@@ -126,7 +126,7 @@ static void display_group_info(uint32_t rid, struct netr_DELTA_GROUP *r)
 
 static void display_delete_group(uint32_t rid)
 {
-	d_printf("Delete Group '%d' ", rid);
+	d_printf("Delete Group '%d'\n", rid);
 }
 
 static void display_rename_group(uint32_t rid, struct netr_DELTA_RENAME *r)
@@ -138,7 +138,7 @@ static void display_rename_group(uint32_t rid, struct netr_DELTA_RENAME *r)
 
 static void display_delete_user(uint32_t rid)
 {
-	d_printf("Delete User '%d' ", rid);
+	d_printf("Delete User '%d'\n", rid);
 }
 
 static void display_rename_user(uint32_t rid, struct netr_DELTA_RENAME *r)
@@ -150,7 +150,7 @@ static void display_rename_user(uint32_t rid, struct netr_DELTA_RENAME *r)
 
 static void display_delete_alias(uint32_t rid)
 {
-	d_printf("Delete Alias '%d' ", rid);
+	d_printf("Delete Alias '%d'\n", rid);
 }
 
 static void display_rename_alias(uint32_t rid, struct netr_DELTA_RENAME *r)
diff --git a/source/librpc/gen_ndr/cli_samr.c b/source/librpc/gen_ndr/cli_samr.c
index dc0a2df..179bd00 100644
--- a/source/librpc/gen_ndr/cli_samr.c
+++ b/source/librpc/gen_ndr/cli_samr.c
@@ -2022,7 +2022,7 @@ NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli,
 				    TALLOC_CTX *mem_ctx,
 				    struct policy_handle *user_handle /* [in] [ref] */,
 				    uint16_t level /* [in]  */,
-				    union samr_UserInfo *info /* [out] [ref,switch_is(level)] */)
+				    union samr_UserInfo **info /* [out] [ref,switch_is(level)] */)
 {
 	struct samr_QueryUserInfo2 r;
 	NTSTATUS status;
@@ -2921,8 +2921,8 @@ NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_samr_ValidatePassword(struct rpc_pipe_client *cli,
 				      TALLOC_CTX *mem_ctx,
 				      enum samr_ValidatePasswordLevel level /* [in]  */,
-				      union samr_ValidatePasswordReq req /* [in] [switch_is(level)] */,
-				      union samr_ValidatePasswordRep *rep /* [out] [ref,switch_is(level)] */)
+				      union samr_ValidatePasswordReq *req /* [in] [ref,switch_is(level)] */,
+				      union samr_ValidatePasswordRep **rep /* [out] [ref,switch_is(level)] */)
 {
 	struct samr_ValidatePassword r;
 	NTSTATUS status;
diff --git a/source/librpc/gen_ndr/cli_samr.h b/source/librpc/gen_ndr/cli_samr.h
index 4c7a30e..7216d0c 100644
--- a/source/librpc/gen_ndr/cli_samr.h
+++ b/source/librpc/gen_ndr/cli_samr.h
@@ -255,7 +255,7 @@ NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli,
 				    TALLOC_CTX *mem_ctx,
 				    struct policy_handle *user_handle /* [in] [ref] */,
 				    uint16_t level /* [in]  */,
-				    union samr_UserInfo *info /* [out] [ref,switch_is(level)] */);
+				    union samr_UserInfo **info /* [out] [ref,switch_is(level)] */);
 NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli,
 				       TALLOC_CTX *mem_ctx,
 				       struct policy_handle *domain_handle /* [in] [ref] */,
@@ -384,6 +384,6 @@ NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_samr_ValidatePassword(struct rpc_pipe_client *cli,
 				      TALLOC_CTX *mem_ctx,
 				      enum samr_ValidatePasswordLevel level /* [in]  */,
-				      union samr_ValidatePasswordReq req /* [in] [switch_is(level)] */,
-				      union samr_ValidatePasswordRep *rep /* [out] [ref,switch_is(level)] */);
+				      union samr_ValidatePasswordReq *req /* [in] [ref,switch_is(level)] */,
+				      union samr_ValidatePasswordRep **rep /* [out] [ref,switch_is(level)] */);
 #endif /* __CLI_SAMR__ */
diff --git a/source/librpc/gen_ndr/messaging.h b/source/librpc/gen_ndr/messaging.h
index ca13b7c..3324160 100644
--- a/source/librpc/gen_ndr/messaging.h
+++ b/source/librpc/gen_ndr/messaging.h
@@ -5,9 +5,123 @@
 #ifndef _HEADER_messaging
 #define _HEADER_messaging
 
+#define MSG_TYPE_MASK	( 0xFFFF )
+enum messaging_type
+#ifndef USE_UINT_ENUMS
+ {
+	MSG_DEBUG=0x0001,
+	MSG_PING=0x0002,
+	MSG_PONG=0x0003,
+	MSG_PROFILE=0x0004,
+	MSG_REQ_DEBUGLEVEL=0x0005,
+	MSG_DEBUGLEVEL=0x0006,
+	MSG_REQ_PROFILELEVEL=0x0007,
+	MSG_PROFILELEVEL=0x0008,
+	MSG_REQ_POOL_USAGE=0x0009,
+	MSG_POOL_USAGE=0x000A,
+	MSG_REQ_DMALLOC_MARK=0x000B,
+	MSG_REQ_DMALLOC_LOG_CHANGED=0x000C,
+	MSG_SHUTDOWN=0x000D,
+	MSG_FORCE_ELECTION=0x0101,
+	MSG_WINS_NEW_ENTRY=0x0102,
+	MSG_SEND_PACKET=0x0103,
+	MSG_PRINTER_NOTIFY=0x2001,
+	MSG_PRINTER_NOTIFY2=0x0202,
+	MSG_PRINTER_DRVUPGRADE=0x0203,
+	MSG_PRINTERDATA_INIT_RESET=0x0204,
+	MSG_PRINTER_UPDATE=0x0205,
+	MSG_PRINTER_MOD=0x0206,
+	MSG_SMB_CONF_UPDATED=0x0301,
+	MSG_SMB_FORCE_TDIS=0x0302,
+	MSG_SMB_SAM_SYNC=0x0303,
+	MSG_SMB_SAM_REPL=0x0304,
+	MSG_SMB_UNLOCK=0x0305,
+	MSG_SMB_BREAK_REQUEST=0x0306,
+	MSG_SMB_BREAK_RESPONSE=0x0307,
+	MSG_SMB_ASYNC_LEVEL2_BREAK=0x0308,
+	MSG_SMB_OPEN_RETRY=0x0309,
+	MSG_SMB_KERNEL_BREAK=0x030A,
+	MSG_SMB_FILE_RENAME=0x030B,
+	MSG_SMB_INJECT_FAULT=0x030C,
+	MSG_SMB_BLOCKING_LOCK_CANCEL=0x030D,
+	MSG_SMB_NOTIFY=0x030E,
+	MSG_SMB_STAT_CACHE_DELETE=0x030F,
+	MSG_PVFS_NOTIFY=0x0310,
+	MSG_SMB_BRL_VALIDATE=0x0311,
+	MSG_SMB_RELEASE_IP=0x0312,
+	MSG_SMB_CLOSE_FILE=0x0313,
+	MSG_WINBIND_FINISHED=0x0401,
+	MSG_WINBIND_FORGET_STATE=0x0402,
+	MSG_WINBIND_ONLINE=0x0403,
+	MSG_WINBIND_OFFLINE=0x0404,
+	MSG_WINBIND_ONLINESTATUS=0x0405,
+	MSG_WINBIND_TRY_TO_GO_ONLINE=0x0406,
+	MSG_WINBIND_FAILED_TO_GO_ONLINE=0x0407,
+	MSG_WINBIND_VALIDATE_CACHE=0x0408,
+	MSG_WINBIND_DUMP_DOMAIN_LIST=0x0409,
+	MSG_DUMP_EVENT_LIST=0x0500,
+	MSG_DBWRAP_TDB2_CHANGES=4001
+}
+#else
+ { __donnot_use_enum_messaging_type=0x7FFFFFFF}
+#define MSG_DEBUG ( 0x0001 )
+#define MSG_PING ( 0x0002 )
+#define MSG_PONG ( 0x0003 )
+#define MSG_PROFILE ( 0x0004 )
+#define MSG_REQ_DEBUGLEVEL ( 0x0005 )
+#define MSG_DEBUGLEVEL ( 0x0006 )
+#define MSG_REQ_PROFILELEVEL ( 0x0007 )
+#define MSG_PROFILELEVEL ( 0x0008 )
+#define MSG_REQ_POOL_USAGE ( 0x0009 )
+#define MSG_POOL_USAGE ( 0x000A )
+#define MSG_REQ_DMALLOC_MARK ( 0x000B )
+#define MSG_REQ_DMALLOC_LOG_CHANGED ( 0x000C )
+#define MSG_SHUTDOWN ( 0x000D )
+#define MSG_FORCE_ELECTION ( 0x0101 )
+#define MSG_WINS_NEW_ENTRY ( 0x0102 )
+#define MSG_SEND_PACKET ( 0x0103 )
+#define MSG_PRINTER_NOTIFY ( 0x2001 )
+#define MSG_PRINTER_NOTIFY2 ( 0x0202 )
+#define MSG_PRINTER_DRVUPGRADE ( 0x0203 )
+#define MSG_PRINTERDATA_INIT_RESET ( 0x0204 )
+#define MSG_PRINTER_UPDATE ( 0x0205 )
+#define MSG_PRINTER_MOD ( 0x0206 )
+#define MSG_SMB_CONF_UPDATED ( 0x0301 )
+#define MSG_SMB_FORCE_TDIS ( 0x0302 )
+#define MSG_SMB_SAM_SYNC ( 0x0303 )
+#define MSG_SMB_SAM_REPL ( 0x0304 )
+#define MSG_SMB_UNLOCK ( 0x0305 )
+#define MSG_SMB_BREAK_REQUEST ( 0x0306 )
+#define MSG_SMB_BREAK_RESPONSE ( 0x0307 )
+#define MSG_SMB_ASYNC_LEVEL2_BREAK ( 0x0308 )
+#define MSG_SMB_OPEN_RETRY ( 0x0309 )
+#define MSG_SMB_KERNEL_BREAK ( 0x030A )
+#define MSG_SMB_FILE_RENAME ( 0x030B )
+#define MSG_SMB_INJECT_FAULT ( 0x030C )
+#define MSG_SMB_BLOCKING_LOCK_CANCEL ( 0x030D )
+#define MSG_SMB_NOTIFY ( 0x030E )
+#define MSG_SMB_STAT_CACHE_DELETE ( 0x030F )
+#define MSG_PVFS_NOTIFY ( 0x0310 )
+#define MSG_SMB_BRL_VALIDATE ( 0x0311 )
+#define MSG_SMB_RELEASE_IP ( 0x0312 )
+#define MSG_SMB_CLOSE_FILE ( 0x0313 )
+#define MSG_WINBIND_FINISHED ( 0x0401 )
+#define MSG_WINBIND_FORGET_STATE ( 0x0402 )
+#define MSG_WINBIND_ONLINE ( 0x0403 )
+#define MSG_WINBIND_OFFLINE ( 0x0404 )
+#define MSG_WINBIND_ONLINESTATUS ( 0x0405 )
+#define MSG_WINBIND_TRY_TO_GO_ONLINE ( 0x0406 )
+#define MSG_WINBIND_FAILED_TO_GO_ONLINE ( 0x0407 )
+#define MSG_WINBIND_VALIDATE_CACHE ( 0x0408 )
+#define MSG_WINBIND_DUMP_DOMAIN_LIST ( 0x0409 )
+#define MSG_DUMP_EVENT_LIST ( 0x0500 )
+#define MSG_DBWRAP_TDB2_CHANGES ( 4001 )
+#endif
+;
+
 struct messaging_rec {
 	uint32_t msg_version;
-	uint32_t msg_type;
+	enum messaging_type msg_type;
 	struct server_id dest;
 	struct server_id src;
 	DATA_BLOB buf;
diff --git a/source/librpc/gen_ndr/ndr_messaging.c b/source/librpc/gen_ndr/ndr_messaging.c
index 6251c18..e1e95ee 100644
--- a/source/librpc/gen_ndr/ndr_messaging.c
+++ b/source/librpc/gen_ndr/ndr_messaging.c
@@ -3,12 +3,87 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_messaging.h"
 
+_PUBLIC_ enum ndr_err_code ndr_push_messaging_type(struct ndr_push *ndr, int ndr_flags, enum messaging_type r)
+{
+	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_messaging_type(struct ndr_pull *ndr, int ndr_flags, enum messaging_type *r)
+{
+	uint32_t v;
+	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_messaging_type(struct ndr_print *ndr, const char *name, enum messaging_type r)
+{
+	const char *val = NULL;
+
+	switch (r) {
+		case MSG_DEBUG: val = "MSG_DEBUG"; break;
+		case MSG_PING: val = "MSG_PING"; break;
+		case MSG_PONG: val = "MSG_PONG"; break;
+		case MSG_PROFILE: val = "MSG_PROFILE"; break;
+		case MSG_REQ_DEBUGLEVEL: val = "MSG_REQ_DEBUGLEVEL"; break;
+		case MSG_DEBUGLEVEL: val = "MSG_DEBUGLEVEL"; break;
+		case MSG_REQ_PROFILELEVEL: val = "MSG_REQ_PROFILELEVEL"; break;
+		case MSG_PROFILELEVEL: val = "MSG_PROFILELEVEL"; break;
+		case MSG_REQ_POOL_USAGE: val = "MSG_REQ_POOL_USAGE"; break;
+		case MSG_POOL_USAGE: val = "MSG_POOL_USAGE"; break;
+		case MSG_REQ_DMALLOC_MARK: val = "MSG_REQ_DMALLOC_MARK"; break;
+		case MSG_REQ_DMALLOC_LOG_CHANGED: val = "MSG_REQ_DMALLOC_LOG_CHANGED"; break;
+		case MSG_SHUTDOWN: val = "MSG_SHUTDOWN"; break;
+		case MSG_FORCE_ELECTION: val = "MSG_FORCE_ELECTION"; break;
+		case MSG_WINS_NEW_ENTRY: val = "MSG_WINS_NEW_ENTRY"; break;
+		case MSG_SEND_PACKET: val = "MSG_SEND_PACKET"; break;
+		case MSG_PRINTER_NOTIFY: val = "MSG_PRINTER_NOTIFY"; break;
+		case MSG_PRINTER_NOTIFY2: val = "MSG_PRINTER_NOTIFY2"; break;
+		case MSG_PRINTER_DRVUPGRADE: val = "MSG_PRINTER_DRVUPGRADE"; break;
+		case MSG_PRINTERDATA_INIT_RESET: val = "MSG_PRINTERDATA_INIT_RESET"; break;
+		case MSG_PRINTER_UPDATE: val = "MSG_PRINTER_UPDATE"; break;
+		case MSG_PRINTER_MOD: val = "MSG_PRINTER_MOD"; break;
+		case MSG_SMB_CONF_UPDATED: val = "MSG_SMB_CONF_UPDATED"; break;
+		case MSG_SMB_FORCE_TDIS: val = "MSG_SMB_FORCE_TDIS"; break;
+		case MSG_SMB_SAM_SYNC: val = "MSG_SMB_SAM_SYNC"; break;
+		case MSG_SMB_SAM_REPL: val = "MSG_SMB_SAM_REPL"; break;
+		case MSG_SMB_UNLOCK: val = "MSG_SMB_UNLOCK"; break;
+		case MSG_SMB_BREAK_REQUEST: val = "MSG_SMB_BREAK_REQUEST"; break;
+		case MSG_SMB_BREAK_RESPONSE: val = "MSG_SMB_BREAK_RESPONSE"; break;
+		case MSG_SMB_ASYNC_LEVEL2_BREAK: val = "MSG_SMB_ASYNC_LEVEL2_BREAK"; break;
+		case MSG_SMB_OPEN_RETRY: val = "MSG_SMB_OPEN_RETRY"; break;
+		case MSG_SMB_KERNEL_BREAK: val = "MSG_SMB_KERNEL_BREAK"; break;
+		case MSG_SMB_FILE_RENAME: val = "MSG_SMB_FILE_RENAME"; break;
+		case MSG_SMB_INJECT_FAULT: val = "MSG_SMB_INJECT_FAULT"; break;
+		case MSG_SMB_BLOCKING_LOCK_CANCEL: val = "MSG_SMB_BLOCKING_LOCK_CANCEL"; break;
+		case MSG_SMB_NOTIFY: val = "MSG_SMB_NOTIFY"; break;
+		case MSG_SMB_STAT_CACHE_DELETE: val = "MSG_SMB_STAT_CACHE_DELETE"; break;
+		case MSG_PVFS_NOTIFY: val = "MSG_PVFS_NOTIFY"; break;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list