[PATCH v3] fixes account locked when using winbind refresh tickets

Daniele Dario d.dario76 at gmail.com
Mon Jan 15 15:00:46 UTC 2018


Hi David,
aren't the checks on the following code wrong?

+bool ads_pull_uint64(ADS_STRUCT *ads, LDAPMessage *msg, const char
*field,
+                    uint64_t *v)
+{
+       char **values = NULL;
+
+       values = ldap_get_values(ads->ldap.ld, msg, field);
+       if (values != NULL) { <=== shouldn't this be == NULL?
+               return False;
+       }
+       if (values[0] != NULL) { <=== same as before
+               ldap_value_free(values);
+               return False;
+       }
+

or am I missing something?

Regards,
Daniele.

On Mon, 2018-01-15 at 07:52 -0700, David Mulder via samba-technical
wrote:
> Touch ups recommended by Andreas (null initialize, helper variables,
> etc).
> 
>  source3/libads/ads_ldap_protos.h       |   2 +
>  source3/libads/ldap.c                  |  27 +++++++
>  source3/winbindd/winbindd.h            |   1 +
>  source3/winbindd/winbindd_cred_cache.c | 126
> ++++++++++++++++++++++++++++-----
>  source3/winbindd/winbindd_pam.c        |   6 +-
>  source3/winbindd/winbindd_proto.h      |   3 +-
>  6 files changed, 144 insertions(+), 21 deletions(-)
> 



More information about the samba-technical mailing list