[SSSD] [PATCH] Two patches with more debugging for the LDAP provider
Pavel Reichl
preichl at redhat.com
Fri Jul 18 14:50:55 UTC 2014
On 07/18/2014 04:23 PM, Jakub Hrozek wrote:
Hi,
I think it's always good to add more logs. Code LGTM so ACK++
> +
> + ret = getnameinfo((struct sockaddr *) &ss, ss_len,
> + ip, sizeof(ip), NULL, 0, NI_NUMERICHOST);
> + ip[NI_MAXHOST-1] = '\0';
I was just wondering why to set explicitly '\0' at end of the string,
man page says:
"On success 0 is returned, and node and service names, if requested,
are filled with *null-terminated strings*, possibly truncated to fit the
specified buffer lengths."
I guess you are just being careful, which is OK with me.
> + if (ret != 0) {
> + DEBUG(SSSDBG_MINOR_FAILURE, "getnameinfo failed\n");
> + return;
> + }
More information about the sssd-devel
mailing list