[Freeipa-devel] [PATCH] 932 Add support for storing MAC address in host entries.

Rob Crittenden rcritten at redhat.com
Mon Jan 23 17:07:30 UTC 2012


Jan Cholasta wrote:
> Dne 20.1.2012 21:15, Rob Crittenden napsal(a):
>> macaddress is a multi-valued attribute and we allow multiple entries.
>> This is from the objectclass ieee802device. This is added manually when
>> doing a mod or add and not as a default to support existing host entries
>> that do not have this objectclass. If this were added to the defaults
>> then existing hosts missing this objectclass would not be found by
>> host-find.
>>
>> It is possible to get ethers data out of nss by configuring
>> nsswitch.conf to use ldap for ethers and running getent ethers <hostname>
>>
>> I tested nslcd and it only returned one macaddress value. I don't know
>> if this is a deficiency in nslcd or expected behavior.
>>
>> https://fedorahosted.org/freeipa/ticket/1132
>>
>> rob
>>
>
> @@ -442,6 +448,7 @@ class host_add(LDAPCreate):
> x509.verify_cert_subject(ldap, keys[-1], cert)
> entry_attrs['usercertificate'] = cert
> entry_attrs['managedby'] = dn
> + entry_attrs['objectclass'].append('ieee802device')
> return dn
>
> def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
>
> Why do you add the objectclass here instead of adding it to host
> plugin's object_class attribute?

For upgrades. If there are existing hosts that don't have this 
objectclass in the list then host-find won't find them.

The alternative was to create a new class variable, search_objectclass 
but it seemed like overkill for this one-off.

rob




More information about the Freeipa-devel mailing list