s4:rpc_server: set auth_invalid = true on disconnect
authorStefan Metzmacher <metze@samba.org>
Thu, 6 Dec 2018 16:03:25 +0000 (17:03 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:37 +0000 (03:13 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/dcerpc_server.c

index ee53a7f..7cb8e11 100644 (file)
@@ -669,6 +669,8 @@ static void dcesrv_call_disconnect_after(struct dcesrv_call_state *call,
        call->conn->allow_auth3 = false;
        call->conn->allow_request = false;
 
+       call->conn->default_auth_state->auth_invalid = true;
+
        call->terminate_reason = talloc_strdup(call, reason);
        if (call->terminate_reason == NULL) {
                call->terminate_reason = __location__;
@@ -2478,6 +2480,8 @@ static void dcesrv_terminate_connection(struct dcesrv_connection *dce_conn, cons
        dce_conn->allow_alter = false;
        dce_conn->allow_request = false;
 
+       dce_conn->default_auth_state->auth_invalid = true;
+
        if (dce_conn->pending_call_list == NULL) {
                char *full_reason = talloc_asprintf(dce_conn, "dcesrv: %s", reason);