summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-10 07:14:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:37 -0500
commit1512030832b9f6a172c1ddcda489a1282bda3257 (patch)
tree3ee06b262faaf173f88c63ab42a555dd1223bd7d
parent68fbed64d500d8eb2464497893145a58b1177b97 (diff)
downloadsamba-1512030832b9f6a172c1ddcda489a1282bda3257.tar.gz
samba-1512030832b9f6a172c1ddcda489a1282bda3257.tar.bz2
samba-1512030832b9f6a172c1ddcda489a1282bda3257.zip
r2275: don't crash on a rpc BIND_NAK response ...
(This used to be commit 22a6e5d50d2d40c2dfc5e36bce1132b92723dd81)
-rw-r--r--source4/librpc/rpc/dcerpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 715a680fde..0595d5eade 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -465,10 +465,15 @@ NTSTATUS dcerpc_bind(struct dcerpc_pipe *p,
return status;
}
+ if (pkt.ptype == DCERPC_PKT_BIND_NAK) {
+ DEBUG(2,("dcerpc: bind_nak reason %d\n", pkt.u.bind_nak.reject_reason));
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
if ((pkt.ptype != DCERPC_PKT_BIND_ACK) ||
pkt.u.bind_ack.num_results == 0 ||
pkt.u.bind_ack.ctx_list[0].result != 0) {
- status = NT_STATUS_UNSUCCESSFUL;
+ return NT_STATUS_UNSUCCESSFUL;
}
if (pkt.ptype == DCERPC_PKT_BIND_ACK) {