s3-rpc_server: Don't register the same rpc commands twice.
authorAndreas Schneider <asn@samba.org>
Thu, 15 Jul 2010 10:47:19 +0000 (12:47 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 19 Jul 2010 10:59:18 +0000 (12:59 +0200)
source3/rpc_server/srv_pipe_register.c

index 757e4fbe721b338963ea3207bb477f86fae10c3a..c97edb15b54322cbe8b55d33b9c3e1710caa3674 100644 (file)
@@ -166,12 +166,10 @@ NTSTATUS rpc_srv_register(int version, const char *clnt, const char *srv,
                return NT_STATUS_OBJECT_TYPE_MISMATCH;
        }
 
-       /* TODO:
-        *
-        * we still need to make sure that don't register the same commands twice!!!
-        *
-        * --metze
-        */
+       /* Don't register the same command twice */
+       if (rpc_srv_pipe_exists_by_id(&iface->syntax_id)) {
+               return NT_STATUS_OK;
+       }
 
        /*
         * We use a temporary variable because this call can fail and