[SSSD] [PATCH] sudo: provide automatic configuration of machine hostnames

Pavel Březina pbrezina at redhat.com
Thu Jul 19 17:28:18 UTC 2012


On 19.7.2012 13:18, Jan Zelený wrote:
> Dne pondělí 16 července 2012 16:01:46, Pavel Březina napsal(a):
>> Expects that patch from "resolv_gethostbyname_send: talloc_strdup
>> hostname on state" thread is applied.
>
> Nack,
> please don't use talloc_realloc () in sdap_sudo_get_hostnames_send(), it's
> confusing. Allocating an array for three elements with talloc_zero_array()
> will save you couple lines of code (all those reallocs and NULL assignments).
>
> This is of course based on two observations I've made in the code are that
> before allocation:
> - the state->hostnames is NULL when calling sdap_sudo_get_hostnames_send()
> - in there is no error, the state->hostnames will contain two records and NULL
>
> You are not checking if talloc_strdup() calls returned non-NULL pointer.

Thanks. New patch is attached.

> I suspect you should use CONFDB_DOMAIN_RESOLV_OP_TIMEOUT instead of
> CONFDB_DOMAIN_RESOLV_TIMEOUT. I'm not sure though, please take a look at
> data_provider_fo.c:106 and provide a comment.

Well, I don't know. What's the difference between those two? I was
following ipa_dyndns.c and the shorter version is used there (see line
148).

> Functionally the patch is fine, I tried both with hostname being fqdn and
> simple name.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sudo-ldap-provider-support-autoconfiguration-of-host.patch
Type: text/x-patch
Size: 10518 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120719/5948b306/attachment.bin>


More information about the sssd-devel mailing list