diff options
author | Rafal Szczesniak <mimir@samba.org> | 2006-06-26 21:17:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:09:33 -0500 |
commit | 3ef6f35ddee6a48ea04358c180772bb040f64652 (patch) | |
tree | 19aa45bb8412d2d9ed0e6f853a6228cebabddbbe /source4 | |
parent | fb3afe422fca7fe162b6b87cd5fb5aa7edbc820d (diff) | |
download | samba-3ef6f35ddee6a48ea04358c180772bb040f64652.tar.gz samba-3ef6f35ddee6a48ea04358c180772bb040f64652.tar.bz2 samba-3ef6f35ddee6a48ea04358c180772bb040f64652.zip |
r16530: Send monitor messages only after successful receiving result of a stage.
rafal
(This used to be commit e5dc6311633146e44063ba5eb20488468af75914)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/userman.c | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index cd12ece0e8..08b0a2f1e2 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -767,45 +767,53 @@ static void usermod_handler(struct rpc_request *req) case USERMOD_LOOKUP: c->status = usermod_lookup(c, s); - /* monitor message */ - msg.type = rpc_lookup_name; - msg_lookup = talloc(s, struct msg_rpc_lookup_name); - - msg_lookup->rid = s->lookupname.out.rids.ids; - msg_lookup->count = s->lookupname.out.rids.count; - msg.data = (void*)msg_lookup; - msg.data_size = sizeof(*msg_lookup); + if (NT_STATUS_IS_OK(c->status)) { + /* monitor message */ + msg.type = rpc_lookup_name; + msg_lookup = talloc(s, struct msg_rpc_lookup_name); + + msg_lookup->rid = s->lookupname.out.rids.ids; + msg_lookup->count = s->lookupname.out.rids.count; + msg.data = (void*)msg_lookup; + msg.data_size = sizeof(*msg_lookup); + } break; case USERMOD_OPEN: c->status = usermod_open(c, s); - /* monitor message */ - msg.type = rpc_open_user; - msg_open = talloc(s, struct msg_rpc_open_user); - - msg_open->rid = s->openuser.in.rid; - msg_open->access_mask = s->openuser.in.rid; - msg.data = (void*)msg_open; - msg.data_size = sizeof(*msg_open); + if (NT_STATUS_IS_OK(c->status)) { + /* monitor message */ + msg.type = rpc_open_user; + msg_open = talloc(s, struct msg_rpc_open_user); + + msg_open->rid = s->openuser.in.rid; + msg_open->access_mask = s->openuser.in.rid; + msg.data = (void*)msg_open; + msg.data_size = sizeof(*msg_open); + } break; case USERMOD_QUERY: c->status = usermod_query(c, s); - /* monitor message */ - msg.type = rpc_query_user; - msg.data = NULL; - msg.data_size = 0; + if (NT_STATUS_IS_OK(c->status)) { + /* monitor message */ + msg.type = rpc_query_user; + msg.data = NULL; + msg.data_size = 0; + } break; case USERMOD_MODIFY: c->status = usermod_modify(c, s); - - /* monitor message */ - msg.type = rpc_set_user; - msg.data = NULL; - msg.data_size = 0; + + if (NT_STATUS_IS_OK(c->status)) { + /* monitor message */ + msg.type = rpc_set_user; + msg.data = NULL; + msg.data_size = 0; + } break; } |