[PATCH] Fix incorrect order of arguments in error string

Roel van Meer roel at 1afa.com
Tue Apr 14 09:04:00 MDT 2015


Hi all,

this small patch fixes two swapped arguments in an error string, leading to  
the peculiar message:

  SAMR connection to machine NT_STATUS_ACCESS_DENIED failed. Error was  
  127.0.0.1, but LANMAN password changes are disabled

Thanks,

Roel
-------------- next part --------------
>From 4cec237dba9845c2bf0ee842e0cba473a132ef3d Mon Sep 17 00:00:00 2001
From: Roel van Meer <roel at 1afa.com>
Date: Tue, 14 Apr 2015 16:59:13 +0200
Subject: [PATCH] Fix incorrect order of arguments in error string

---
 source3/libsmb/passchange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index e0a5935..4676b72 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -262,7 +262,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
 			if (asprintf(err_str, "SAMR connection to machine %s "
 				 "failed. Error was %s, but LANMAN password "
 				 "changes are disabled\n",
-				nt_errstr(result), remote_machine) == -1) {
+				remote_machine, nt_errstr(result)) == -1) {
 				*err_str = NULL;
 			}
 			cli_shutdown(cli);
-- 
1.7.1



More information about the samba-technical mailing list