summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-07-25 22:57:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:03 -0500
commitb2ed6343cb4650537f199089432f5b6d96dccd6d (patch)
tree5b4ed4f873dcb9900c53b11d964cd915985e17d2 /source4/libnet
parenta04e899bc07825acecd0e1d3bd5e9898b52a0bd9 (diff)
downloadsamba-b2ed6343cb4650537f199089432f5b6d96dccd6d.tar.gz
samba-b2ed6343cb4650537f199089432f5b6d96dccd6d.tar.bz2
samba-b2ed6343cb4650537f199089432f5b6d96dccd6d.zip
r8761: Propagate changes in monitor messaging code.
rafal (This used to be commit 5be8479d5cf119bcda4046bf1c5d7c3b876e718d)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/userinfo.c24
-rw-r--r--source4/libnet/userman.c8
2 files changed, 27 insertions, 5 deletions
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index 7fb6a83a06..def9c87147 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -28,6 +28,7 @@
#include "libcli/composite/monitor.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "libnet/composite.h"
+#include "libnet/userinfo.h"
static void userinfo_handler(struct rpc_request *req);
@@ -129,26 +130,41 @@ static void userinfo_handler(struct rpc_request *req)
struct composite_context *c = req->async.private;
struct userinfo_state *s = talloc_get_type(c->private, struct userinfo_state);
struct monitor_msg msg;
+ struct msg_rpc_open_user *msg_open;
+ struct msg_rpc_query_user *msg_query;
+ struct msg_rpc_close_user *msg_close;
/* Stages of the call */
switch (s->stage) {
case USERINFO_OPENUSER:
c->status = userinfo_openuser(c, s);
+
msg.type = rpc_open_user;
- msg.data.rpc_open_user.rid = s->openuser.in.rid;
- msg.data.rpc_open_user.access_mask = s->openuser.in.access_mask;
+ msg_open = talloc(s, struct msg_rpc_open_user);
+ msg_open->rid = s->openuser.in.rid;
+ msg_open->access_mask = s->openuser.in.access_mask;
+ msg.data = (void*)msg_open;
+ msg.data_size = sizeof(*msg_open);
break;
case USERINFO_GETUSER:
c->status = userinfo_getuser(c, s);
+
msg.type = rpc_query_user;
- msg.data.rpc_query_user.level = s->queryuserinfo.in.level;
+ msg_query = talloc(s, struct msg_rpc_query_user);
+ msg_query->level = s->queryuserinfo.in.level;
+ msg.data = (void*)msg_query;
+ msg.data_size = sizeof(*msg_query);
break;
case USERINFO_CLOSEUSER:
c->status = userinfo_closeuser(c, s);
+
msg.type = rpc_close_user;
- msg.data.rpc_close_user.rid = s->openuser.in.rid;
+ msg_close = talloc(s, struct msg_rpc_close_user);
+ msg_close->rid = s->openuser.in.rid;
+ msg.data = (void*)msg_close;
+ msg.data_size = sizeof(*msg_close);
break;
}
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index c3d1435dfe..1a40b74352 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -28,6 +28,7 @@
#include "libcli/composite/monitor.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "libnet/composite.h"
+#include "libnet/userman.h"
/*
* Composite user add function
@@ -73,12 +74,17 @@ static void useradd_handler(struct rpc_request *req)
struct composite_context *c = req->async.private;
struct useradd_state *s = talloc_get_type(c->private, struct useradd_state);
struct monitor_msg msg;
+ struct msg_rpc_create_user *rpc_create;
switch (s->stage) {
case USERADD_CREATE:
c->status = useradd_create(c, s);
+
msg.type = rpc_create_user;
- msg.data.rpc_create_user.rid = *s->createuser.out.rid;
+ rpc_create = talloc(s, struct msg_rpc_create_user);
+ rpc_create->rid = *s->createuser.out.rid;
+ msg.data = (void*)rpc_create;
+ msg.data_size = sizeof(*rpc_create);
break;
}