It's still weird that adding and deleting works with the index but the replace not. No consistent usage there. Probably the devs had better things to do ;)
Anyway. Thanks for clarifying indexes and where I can and can't use them ;)
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2115-f 0 viruses found. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=oa-2115-f <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
2016-03-15 17:19 GMT+01:00 Quanah Gibson-Mount quanah@zimbra.com:
--On Tuesday, March 15, 2016 1:58 PM +0200 Cole cole@opteqint.net wrote:
To replace the 12th index, you could do:
changetype: modify delete: olcAccess olcAccess: {11}
^ deletes the 12th index, since it is ZERO based. If you want the 13th index ({12}), adjust appropriately.
changetype: modify add: olcAccess olcAccess: {11} <new rule>
So in order to modify olcAccess: {11}, you first have to delete it and then re-add it? There is no way to modify it in place and change its contents?
No. What I generally do is read the value, store that, tweak it how I want, and then write it back (delete, add modified value). What's handed with the way things are ordered in cn=config is that you don't have to run the delete command against the full exact value, but only the index.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc.
Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc
--On Wednesday, March 16, 2016 12:40 AM +0100 "PenguinWhispererThe ." th3penguinwhisperer@gmail.com wrote:
It's still weird that adding and deleting works with the index but the replace not. No consistent usage there. Probably the devs had better things to do ;)
Anyway. Thanks for clarifying indexes and where I can and can't use them ;)
There is nothing wierd about it at all. Replace has a very specific meaning. It replaces all values. It does not do individual attribute value replacement. As I noted, the only supported way to replace a specific value is to delete it and then add the new value. This has nothign to do with devs, but with the RFC specification that defined this behavior decades ago.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc
openldap-technical@openldap.org