Skip to content
Snippets Groups Projects
Select Git revision
  • bullseye
  • buster default protected
  • master protected
3 results

0002-Move-the-empty-client-site-check.patch

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    0002-Move-the-empty-client-site-check.patch 1.51 KiB
    From 85146804c219b2d4a62f315a0988536af7a53911 Mon Sep 17 00:00:00 2001
    From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
    Date: Thu, 30 Mar 2017 12:50:33 +0200
    Subject: [PATCH 02/30] Move the empty client site check
    
    Currently this check will SEGV(NULL ptr access) if the parsing
    of Netlogon discovery data fails. Move the empty check to where the
    disco ptr is always valid. Add a log msg too.
    
    Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
    
    https://bugs.freedesktop.org/show_bug.cgi?id=100466
    ---
     library/addisco.c | 16 ++++++++--------
     1 file changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/library/addisco.c b/library/addisco.c
    index 08d2c8e..8cc5bf0 100644
    --- a/library/addisco.c
    +++ b/library/addisco.c
    @@ -376,14 +376,14 @@ parse_disco_data (struct berval *bv)
     		disco = NULL;
     	} else {
     		_adcli_info ("Received NetLogon info from: %s", disco->host_name);
    -	}
    -
    -	/* If the DC cannot determine the client site it will return an empty
    -         * string. Make sure this is handled the same way as a missing client
    -         * site. */
    -	if (disco->client_site[0] == '\0') {
    -		free (disco->client_site);
    -		disco->client_site = NULL;
    +		/* If the DC cannot determine the client site it will return an empty
    +		 * string. Make sure this is handled the same way as a missing client
    +		 * site. */
    +		if (disco->client_site[0] == '\0') {
    +			free (disco->client_site);
    +			disco->client_site = NULL;
    +			_adcli_info ("Empty client site, skipping");
    +		}
     	}
     
     	/* We don't care about these */
    -- 
    2.11.0