[PATCH] Fix incorrect order of arguments in error string

Ralph Böhme rb at sernet.de
Tue Apr 14 10:18:31 MDT 2015


On Tue, Apr 14, 2015 at 05:04:00PM +0200, Roel van Meer wrote:
> 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

> >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

rb-by: me. Can I get a second team review please?

-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de


More information about the samba-technical mailing list