s4-rpcserver: set unbind method to NULL in remote server
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 11:50:36 +0000 (21:50 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 13:08:18 +0000 (23:08 +1000)
this prevents a possible crash on disconnect

source4/rpc_server/dcerpc_server.c
source4/rpc_server/remote/dcesrv_remote.c

index 9103923b3e99226d481e0a3e29213c966e6b4c08..09b9b2ac0ab71b890ab76253527117fca834ecee 100644 (file)
@@ -554,7 +554,7 @@ static int dcesrv_connection_context_destructor(struct dcesrv_connection_context
 {
        DLIST_REMOVE(c->conn->contexts, c);
 
-       if (c->iface) {
+       if (c->iface && c->iface->unbind) {
                c->iface->unbind(c, c->iface);
        }
 
index 23c873799bf09c2e9f02b64d6ccdba80b7f1cd14..bdb3693335c61c7341ad185d1866345ca0440db0 100644 (file)
@@ -322,6 +322,7 @@ static bool remote_fill_interface(struct dcesrv_interface *iface, const struct n
        iface->syntax_id = if_tabl->syntax_id;
        
        iface->bind = remote_op_bind;
+       iface->unbind = NULL;
 
        iface->ndr_pull = remote_op_ndr_pull;
        iface->dispatch = remote_op_dispatch;