removing previously stored generated attributes

Matthieu Patou mat at samba.org
Sat Jun 5 13:31:04 MDT 2010


On 05/06/2010 19:59, Matthieu Patou wrote:
> On 05/06/2010 03:49, Andrew Bartlett wrote:
>> On Fri, 2010-06-04 at 17:09 +0400, Matthieu Patou wrote:
>>> Hi Andrew,
>>> On 04/06/2010 15:48, Andrew Bartlett wrote:
>>>> On Fri, 2010-06-04 at 09:53 +0400, Matthieu Patou wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> While trying to do it with msds-keyversionnumber I find the pb far 
>>>>> from
>>>>> being trivial.
>>>>>
>>>>> The thing is that with a given provision we have some attributes that
>>>>> are marked as automatically generated and that used to be stored 
>>>>> in the
>>>>> database.
>>>>> A search with an "old" provision but new code will return the 
>>>>> calculated
>>>>> attribute what ever the stored version is.
>>>>> So to access to the stored version I have the impression that I 
>>>>> should
>>>>> go without the modules and access the ldb at the low level.
>>>>>
>>>>> Well accessing at low level is not such big problem I think, but 
>>>>> if we
>>>>> want also to get rid of previously stored values we have also to 
>>>>> remove
>>>>> old version.
>>>>>
>>>>> I can really well remember andrew B. saying that this should not 
>>>>> be done
>>>>> otherwise we have the risk to broke or mess indexes.
>>>>>
>>>> Correct.  It is quite dangerous to access the DB for write access
>>>> without the schema loaded.
>>>>
>>> Well loading the schema is useless without the modules I guess. What is
>>> the risk when messing with not anymore used attribute ?
>> If a reindex is somehow triggered, yes.
> After digging in the code I found that it could be possible to add a 
> special rule in objectclass to authorize the deletion of a constructed 
> attribute when the relax control is used.
>
> What do you think of this idea, it allow to clean our databases 
> without going raw access.
>

Well in fact it turns out that I can remove the attribute from the db 
with a small change on objectclass.c but the side effect is that after 
the attribute is not searchable anymore even without any controls. I 
suppose that it is written has removed in the replPropertyMetaData and 
so not returned to the caller.

Matthieu.

-- 
Matthieu Patou
Samba Team        http://samba.org



More information about the samba-technical mailing list