s3-winbindd: make sure to reset connections when machine account password change...
authorGünther Deschner <gd@samba.org>
Mon, 5 Oct 2009 15:05:38 +0000 (17:05 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 6 Oct 2009 14:50:23 +0000 (16:50 +0200)
Guenther

source3/winbindd/winbindd_dual.c

index edf784cc210ddb466d7865c202e9e0016ed81530..a832451e0848e09a7c3b8e916a0f0fd429ce929a 100644 (file)
@@ -1100,6 +1100,14 @@ static void machine_password_change_handler(struct event_context *ctx,
                DEBUG(10,("machine_password_change_handler: "
                        "failed to change machine password: %s\n",
                         nt_errstr(result)));
+               if (NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) ) {
+                       DEBUG(3,("machine_password_change_handler: password set returned "
+                               "ACCESS_DENIED.  Maybe the trust account "
+                               "password was changed and we didn't know it. "
+                               "Killing connections to domain %s\n",
+                               child->domain->name));
+                       invalidate_cm_connection(&child->domain->conn);
+               }
        } else {
                DEBUG(10,("machine_password_change_handler: "
                        "successfully changed machine password\n"));