[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: internal_modify in overlays



On 28/02/13 14:56, Howard Chu wrote:
Tim Watts wrote:
Hi,

Does anyone know of a bit of code I can look at that does an *internal*
(completed inline) LDAP_MOD_REPLACE operation on one attribute without
chaining (ie it does a return 0)?

I've found Sun docs for doing this in a slapi plugin but not an openldap
slapd plugin.


Reason:

Basically, I've been hacking on smbkrb5pwd.c and discovered if I do a
"return 0;" at the end, I can prevent chaining (not documented but found
some openldap hacking - denyop.c - that demonstrated this).

Documented. slapd/overlays/slapover.txt.

You should not be attempting to write code here without having actually
read what's in front of you. If your first instinct is *not* naturally
to read the source tree, your programming habits need sharpening.


Hi Howard,

Nope - had not noticed that - which is ironic as I've just been in that directory running grep over at the .c files ;-|

Yeah - I'm not really a programmer (except in perl) , I'm properly a sysadmin who very occasionally dabbles - and the openldap tree is not small, so I can be forgiven for not reading all of it ;-> Anyway, have to start somewhere!

And yes - I just found the bit in the txt file that says about calling frontend functions - also nice to have some confirmation about the return values of overlays.

I'll see if I can figure it out now based on a thorough reading of the document.

Cheers - and thanks for the pointer.

Tim

--
Tim Watts
Personal Blog:                          http://squiddy.blog.dionic.net/

http://www.sensorly.com/ Crowd mapping of 2G/3G/4G mobile signal coverage