[PATCH] Fix a CID and a typo

Jeremy Allison jra at samba.org
Wed Apr 4 22:11:39 UTC 2018


On Wed, Apr 04, 2018 at 10:29:48AM +0200, Volker Lendecke via samba-technical wrote:
> Hi!
> 
> Review appreciated!

RB+ and pushed.

> -- 
> 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 at sernet.de

> From 4fe5fc32ba36617cc71523666f6a4d32b152dd37 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 4 Apr 2018 10:26:14 +0200
> Subject: [PATCH 1/2] credentials: Fix CID 1414796 Explicit null dereferenced
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  auth/credentials/credentials_secrets.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
> index ae1d23b51c1..25c1fddf2ec 100644
> --- a/auth/credentials/credentials_secrets.c
> +++ b/auth/credentials/credentials_secrets.c
> @@ -106,6 +106,11 @@ static NTSTATUS cli_credentials_set_secrets_lct(struct cli_credentials *cred,
>  	}
>  
>  	password = ldb_msg_find_attr_as_string(msg, "secret", NULL);
> +	if (password == NULL) {
> +		/* This attribute is mandatory */
> +		talloc_free(mem_ctx);
> +		return NT_STATUS_NOT_FOUND;
> +	}
>  
>  	whenChanged = ldb_msg_find_ldb_val(msg, "whenChanged");
>  	if (!whenChanged || ldb_val_to_time(whenChanged, &lct) != LDB_SUCCESS) {
> -- 
> 2.11.0
> 
> 
> From 177c6e977bc69fa1036c2fb29cd1f9d932ab9675 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 4 Apr 2018 10:27:21 +0200
> Subject: [PATCH 2/2] credentials: Fix a typo
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  auth/credentials/credentials_secrets.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
> index 25c1fddf2ec..2ae384fdb18 100644
> --- a/auth/credentials/credentials_secrets.c
> +++ b/auth/credentials/credentials_secrets.c
> @@ -114,7 +114,7 @@ static NTSTATUS cli_credentials_set_secrets_lct(struct cli_credentials *cred,
>  
>  	whenChanged = ldb_msg_find_ldb_val(msg, "whenChanged");
>  	if (!whenChanged || ldb_val_to_time(whenChanged, &lct) != LDB_SUCCESS) {
> -		/* This attribute is mandetory */
> +		/* This attribute is mandatory */
>  		talloc_free(mem_ctx);
>  		return NT_STATUS_NOT_FOUND;
>  	}
> -- 
> 2.11.0
> 




More information about the samba-technical mailing list