Hello, from reading the AdminGuide and a quick search through the FAQ-o-Matic I couldn't gather how I'd insert a new ACL between the existing rules 2 and 3...
Do I have to replace the complete olcAccess-Attribute? Or can I somehow instruct an LDIF - "Modify/Add" to insert the Value in a specific place?
If it isn't available now, maybe it could be done with using only even Weights for the rules, and when one adds a rule with an odd weight, it is inserted in the correct place and the remaining entries renumbered accordingly...
bye Christian
Christian Marg wrote:
Hello, from reading the AdminGuide and a quick search through the FAQ-o-Matic I couldn't gather how I'd insert a new ACL between the existing rules 2 and 3...
Reread section 5.3.6 of the Admin Guide. This has been documented for more than a year.
Hello.
Howard Chu wrote:
Christian Marg wrote:
from reading the AdminGuide and a quick search through the FAQ-o-Matic I couldn't gather how I'd insert a new ACL between the existing rules 2 and 3...
Reread section 5.3.6 of the Admin Guide. This has been documented for more than a year.
I took my time to read that section, for a third time. And no, it doesn't answer my question. It does document how to change the second rule - not how to insert a "2.5th" rule.
So it seems like I have to do an LDAPsearch to gather all the olcAccess values, insert a new one between two of them, prepend the weight-numbers to them and put them in an LDIF to replace the whole attribute. How inconvenient.
bye Christian
Christian Marg wrote:
Hello.
Howard Chu wrote:
Christian Marg wrote:
from reading the AdminGuide and a quick search through the FAQ-o-Matic I couldn't gather how I'd insert a new ACL between the existing rules 2 and 3...
Reread section 5.3.6 of the Admin Guide. This has been documented for more than a year.
I took my time to read that section, for a third time. And no, it doesn't answer my question. It does document how to change the second rule - not how to insert a "2.5th" rule.
So it seems like I have to do an LDAPsearch to gather all the olcAccess values, insert a new one between two of them, prepend the weight-numbers to them and put them in an LDIF to replace the whole attribute. How inconvenient.
No. You're right that would be inconvenient, and nobody would want that.
I guess we need to copy more of the examples from http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
If you have an attribute with the values olcaccess: {0}foo olcaccess: {1}bar
and you want to insert a new value, just prepend the number of where you want the new value to go. The others will be pushed down automatically.
add: olcaccess: olcaccess: {1}blah
result: olcaccess: {0}foo olcaccess: {1}blah olcaccess: {2}bar
Howard Chu wrote:
Christian Marg wrote:
Hello.
Howard Chu wrote:
Christian Marg wrote:
from reading the AdminGuide and a quick search through the FAQ-o-Matic I couldn't gather how I'd insert a new ACL between the existing rules 2 and 3...
Reread section 5.3.6 of the Admin Guide. This has been documented for more than a year.
I took my time to read that section, for a third time. And no, it doesn't answer my question. It does document how to change the second rule - not how to insert a "2.5th" rule.
So it seems like I have to do an LDAPsearch to gather all the olcAccess values, insert a new one between two of them, prepend the weight-numbers to them and put them in an LDIF to replace the whole attribute. How inconvenient.
No. You're right that would be inconvenient, and nobody would want that.
I guess we need to copy more of the examples from http://www.highlandsun.com/hyc/drafts/draft-chu-ldap-xordered-xx.html
If you have an attribute with the values olcaccess: {0}foo olcaccess: {1}bar
and you want to insert a new value, just prepend the number of where you want the new value to go. The others will be pushed down automatically.
add: olcaccess: olcaccess: {1}blah
result: olcaccess: {0}foo olcaccess: {1}blah olcaccess: {2}bar
Nice, I'll look into that Howard.
from reading the AdminGuide and a quick search through the
FAQ-o-Matic I
couldn't gather how I'd insert a new ACL between the existing rules
2
and 3...
Reread section 5.3.6 of the Admin Guide. This has been documented for more than a year.
I took my time to read that section, for a third time. And no, it doesn't answer my question. It does document how to change the second rule - not how to insert a "2.5th" rule.
So it seems like I have to do an LDAPsearch to gather all the olcAccess values, insert a new one between two of them, prepend the
weight-numbers
to them and put them in an LDIF to replace the whole attribute. How inconvenient.
It doesn't explicitly say this in section 5.3.6, but somewhere else (forget where I saw it), I think I saw that if you have something like:
Attr: {0}val0 Attr: {1}val1 Attr: {2}val2
If you add Attr: {2}val2.5, existing values at {2} or above get pushed up - i.e. attr: {2}val2 becomes attr: {3}val2 and the new one becomes {2}.
I assume the same mechanism is used throughout.
I seem to remember seeing this someplace, but can't find the reference - is this correct, and if so can anyone provide a reference?
- Jeff
openldap-software@openldap.org