s3-winbindd/winbindd_cm.c: remove cli_nt_error()
authorBjörn Baumbach <bb@sernet.de>
Wed, 16 Nov 2011 15:52:38 +0000 (16:52 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Nov 2011 18:02:12 +0000 (19:02 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/winbindd_cm.c

index 67eea56d1a72ab6dd7ca5899990668ddce0b0fff..7cfcaba545f16d5af6fe3b8b9ca5de1915809ecc 100644 (file)
@@ -942,8 +942,8 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
                "connection for DC %s\n",
                controller ));
 
-       if (NT_STATUS_IS_OK(cli_session_setup(*cli, "", NULL, 0,
-                                             NULL, 0, ""))) {
+       result = cli_session_setup(*cli, "", NULL, 0, NULL, 0, "");
+       if (NT_STATUS_IS_OK(result)) {
                DEBUG(5, ("Connected anonymously\n"));
                result = cli_init_creds(*cli, "", "", "");
                if (!NT_STATUS_IS_OK(result)) {
@@ -952,13 +952,7 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
                goto session_setup_done;
        }
 
-       result = cli_nt_error(*cli);
-
-       if (NT_STATUS_IS_OK(result))
-               result = NT_STATUS_UNSUCCESSFUL;
-
        /* We can't session setup */
-
        goto done;
 
  session_setup_done: