git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3389cfb
)
r6616: First (and totally untested) approach to monitoring userinfo
author
Rafal Szczesniak
<mimir@samba.org>
Wed, 4 May 2005 19:16:22 +0000
(19:16 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:16:31 +0000
(13:16 -0500)
composite call.
rafal
source/libnet/userinfo.c
patch
|
blob
|
history
diff --git
a/source/libnet/userinfo.c
b/source/libnet/userinfo.c
index 86dcb9429cc507f1bc1ba5eeba9e83d61fc18cab..ed3affdb6d32c43c24183658e14e762604053d09 100644
(file)
--- a/
source/libnet/userinfo.c
+++ b/
source/libnet/userinfo.c
@@
-25,6
+25,7
@@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
#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"
#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 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);
/* 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);
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);
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;
}
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) {
if (c->state >= SMBCLI_REQUEST_DONE &&
c->async.fn) {