diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/libnet/userinfo.c | 14 | ||||
-rw-r--r-- | source4/torture/libnet/userman.c | 6 |
2 files changed, 16 insertions, 4 deletions
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c index 2dd60b02f1..aa1e64301a 100644 --- a/source4/torture/libnet/userinfo.c +++ b/source4/torture/libnet/userinfo.c @@ -22,6 +22,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_samr.h" #include "libnet/composite.h" +#include "libnet/userinfo.h" #include "libcli/composite/monitor.h" #define TEST_USERNAME "libnetuserinfotest" @@ -206,16 +207,23 @@ static BOOL test_userinfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, static void msg_handler(struct monitor_msg *m) { + struct msg_rpc_open_user *msg_open; + struct msg_rpc_query_user *msg_query; + struct msg_rpc_close_user *msg_close; + switch (m->type) { case rpc_open_user: + msg_open = (struct msg_rpc_open_user*)m->data; printf("monitor_msg: user opened (rid=%d, access_mask=0x%08x)\n", - m->data.rpc_open_user.rid, m->data.rpc_open_user.access_mask); + msg_open->rid, msg_open->access_mask); break; case rpc_query_user: - printf("monitor_msg: user queried (level=%d)\n", m->data.rpc_query_user.level); + msg_query = (struct msg_rpc_query_user*)m->data; + printf("monitor_msg: user queried (level=%d)\n", msg_query->level); break; case rpc_close_user: - printf("monitor_msg: user closed (rid=%d)\n", m->data.rpc_close_user.rid); + msg_close = (struct msg_rpc_close_user*)m->data; + printf("monitor_msg: user closed (rid=%d)\n", msg_close->rid); break; } } diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c index 1da57e2b35..0441a99a54 100644 --- a/source4/torture/libnet/userman.c +++ b/source4/torture/libnet/userman.c @@ -22,6 +22,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_samr.h" #include "libnet/composite.h" +#include "libnet/userman.h" #include "libcli/composite/monitor.h" #define TEST_USERNAME "libnetusermantest" @@ -103,9 +104,12 @@ static BOOL test_useradd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, static void msg_handler(struct monitor_msg *m) { + struct msg_rpc_create_user *msg_create; + switch (m->type) { case rpc_create_user: - printf("monitor_msg: user created (rid=%d)\n", m->data.rpc_create_user.rid); + msg_create = (struct msg_rpc_create_user*)m->data; + printf("monitor_msg: user created (rid=%d)\n", msg_create->rid); break; } } |