On 06/22/2010 11:46 AM, Jakub Hrozek wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 06/21/2010 03:32 PM, Stephen Gallagher wrote: >> Nack. If you're going to add the option to upgrade_config.py, you also >> need to check for _srv_ in the ldap_uri, ipa_server and krb5_kdcip. >> >> In the failover code, please don't use "domain". It's too easy to >> confuse with SSSD domains. Please use dns_domain. >> >> + domptr = strchr(fqdn, '.'); >> + domptr++; >> + if (!domptr) { >> + *domain = talloc_strdup(mem_ctx, fqdn); >> >> This is a bug, if there is no '.' in the string, you will return NULL >> and then increase it by one. >> >> Also, you should check if domptr+1 (after the dot) is a NULL-terminator >> before calling talloc_strdup(just to be safe, in case we somehow got >> 'hostname.' back as a reply from a broken DNS server) >> >> Otherwise, this looks pretty good. > > Thanks for the review, a new patch is attached.
Nack. You need to check the dereference of domptr+1, not the pointer address. -- Stephen Gallagher RHCE 804006346421761 Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ _______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel