[Freeipa-devel] [PATCH 0156] trusts: Remove usage of deprecated LDAP API

Petr Viktorin pviktori at redhat.com
Thu Feb 27 11:55:13 UTC 2014


On 02/27/2014 12:51 PM, Alexander Bokovoy wrote:
> On Thu, 27 Feb 2014, Tomas Babej wrote:
>> Hi,
>>
>> Remove a reference to the old deprecated LDAP API invoked by
>> the usage of trust_add method.
>>
>> https://fedorahosted.org/freeipa/ticket/4204
>>
>> --
>> Tomas Babej
>> Associate Software Engeneer | Red Hat | Identity Management
>> RHCE | Brno Site | IRC: tbabej | freeipa.org
>>
>>
>
>>> From ee59e86f5ee91da97de0484fdcc9b40590844f76 Mon Sep 17 00:00:00 2001
>> From: Tomas Babej <tbabej at redhat.com>
>> Date: Thu, 27 Feb 2014 10:33:50 +0100
>> Subject: [PATCH] trusts: Remove usage of deprecated LDAP API
>>
>> Remove a reference to the old deprecated LDAP API invoked by
>> the usage of trust_add method.
>>
>> https://fedorahosted.org/freeipa/ticket/4204
>> ---
>> ipaserver/dcerpc.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
>> index
>> 5cc168be4717bf40d5ae31532828488e3a3a819e..c3ae00ef3d089d3617809b4cc81153e0704890b7
>> 100644
>> --- a/ipaserver/dcerpc.py
>> +++ b/ipaserver/dcerpc.py
>> @@ -1102,9 +1102,9 @@ class TrustDomainJoins(object):
>>
>>         realm_domains = self.api.Command.realmdomains_show()['result']
>>         # Use realmdomains' modification timestamp to judge records
>> last update time
>> -        (dn, entry_attrs) =
>> self.api.Backend.ldap2.get_entry(realm_domains['dn'],
>> ['modifyTimestamp'])
>> +        entry = self.api.Backend.ldap2.get_entry(realm_domains['dn'],
>> ['modifyTimestamp'])
>>         # Convert the timestamp to Windows 64-bit timestamp format
>> -        trust_timestamp =
>> long(time.mktime(time.strptime(entry_attrs['modifytimestamp'][0][:14],
>> "%Y%m%d%H%M%S"))*1e7+116444736000000000)
>> +        trust_timestamp =
>> long(time.mktime(time.strptime(entry['modifytimestamp'][0][:14],
>> "%Y%m%d%H%M%S"))*1e7+116444736000000000)
>>
>>         for dom in realm_domains['associateddomain']:
>>             ftinfo = dict()
> ACK.
>
>

Pushed to master: 96f87e548af5107e33f33cdb3af9fd542d0aa413


-- 
Petr³




More information about the Freeipa-devel mailing list