[PATCH] Fix bug 11509 - libsmbclient : crash when the DFS targets are disabled

Ira Cooper ira at wakeful.net
Thu Sep 10 22:33:33 UTC 2015


Jeremy Allison <jra at samba.org> writes:

Reviewed-by: Ira Cooper <ira at samba.org>

-Ira

> Very clear fix from Har Gagan Sahai <SHarGagan at novell.com>
> when a server returns no refs or a refs path of NULL.
>
> Second Team reviewer requested !
>
> Cheers,
>
> 	Jeremy.
> From df5a266a4f7c8aa453455aefb9b94f3b63c22f06 Mon Sep 17 00:00:00 2001
> From: Har Gagan Sahai <SHarGagan at novell.com>
> Date: Thu, 10 Sep 2015 16:04:27 +0530
> Subject: [PATCH] s3: dfs: Fix a crash when the dfs targets are disabled.
>
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11509
>
> Signed-off-by: Har Gagan Sahai <SHarGagan at novell.com>
> Reviewed-by: Jeremy Allison <jra at samba.org>
> ---
>  source3/libsmb/clidfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
> index bd587bc..2121ad0 100644
> --- a/source3/libsmb/clidfs.c
> +++ b/source3/libsmb/clidfs.c
> @@ -958,11 +958,11 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
>  
>  	status = cli_dfs_get_referral(ctx, cli_ipc, dfs_path, &refs,
>  				      &num_refs, &consumed);
> -	if (!NT_STATUS_IS_OK(status) || !num_refs) {
> +	if (!NT_STATUS_IS_OK(status)) {
>  		return status;
>  	}
>  
> -	if (!refs[0].dfspath) {
> +	if (!num_refs || !refs[0].dfspath) {
>  		return NT_STATUS_NOT_FOUND;
>  	}
>  
> -- 
> 2.6.0.rc0.131.gf624c3d



More information about the samba-technical mailing list