[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
SLAPI and add requests
- To: openldap-devel@OpenLDAP.org
- Subject: SLAPI and add requests
- From: Luke Howard <lukeh@PADL.COM>
- Date: Mon, 27 Jan 2003 20:36:08 +1100
- Organization: PADL Software Pty Ltd
- Versions: dmail (bsd44) 2.4c/makemail 2.9d
I notice that the preoperation plugin only has access to a
skeletal entry, ie. without any attributes filled in. The
complete entry should be available as SLAPI_ADD_ENTRY.
For example, it is often useful to have a preoperation add
plugin set a default for an attribute:
...
if (slapi_entry_attr_find(entry, "someAttribute", ...)) {
/* entry already has attribute; do nothing */
} else {
/* set the attribute to some reasonable default */
slapi_entry_attr_set_charptr(e, "someAttribute", "someDefault");
}
...
I would like to fix this, but it's going to involve shuffling
some code around in servers/slapd/add.c (the modification list
will need to be turned into an entry much earlier on).
Thoughts? I am very reluctant to disturb the code path for when
SLAPI is disabled. I think it should be possible to implement this
without changing the code path too much (at the expense of some
additinal code whe SLAPI is enabled).
-- Luke
~i
--
Luke Howard | PADL Software Pty Ltd | www.padl.com