summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-05-04 19:16:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:31 -0500
commit72851111625b6d468f877d3463fc5037f3a1f036 (patch)
tree1e39318a992411aa15696bf52098d57461b33b6e /source4/libnet
parent44f981ad0b5dbc2ae7fed07480e209da0baafa36 (diff)
downloadsamba-72851111625b6d468f877d3463fc5037f3a1f036.tar.gz
samba-72851111625b6d468f877d3463fc5037f3a1f036.tar.bz2
samba-72851111625b6d468f877d3463fc5037f3a1f036.zip
r6616: First (and totally untested) approach to monitoring userinfo
composite call. rafal (This used to be commit 227c9fb45bdba5ac795ee14f7e51ccaa18a2a0e1)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/userinfo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index 86dcb9429c..ed3affdb6d 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
+#include "libcli/composite/monitor.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "libnet/composite.h"
@@ -127,25 +128,37 @@ 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;
/* 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;
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;
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;
break;
}
if (!NT_STATUS_IS_OK(c->status)) {
c->state = SMBCLI_REQUEST_ERROR;
}
+
+ if (c->monitor_fn) {
+ c->monitor_fn(&msg);
+ }
if (c->state >= SMBCLI_REQUEST_DONE &&
c->async.fn) {