ldbsearch for @REPLCHANGED in test scripts
tridge at samba.org
tridge at samba.org
Wed Jan 27 23:43:25 MST 2010
Hi Fernando,
> I've been trying to make a ldbsearch for @REPLCHANGED through python
> on test scripts, but I don't know how to specify the Naming Context
ahh, I'd answered another mail from Eduardo on this, but I didn't
realise you were trying to do it from python.
I've had a look at this, and it is a bit messy. Normally to make a ldb
request with a control from python you just add the string form of the
control to the request. That relies on ldb_parse_control_strings()
supporting the control you want to use. Right now
ldb_parse_control_strings() doesn't support
DSDB_CONTROL_CURRENT_PARTITION_OID, and it isn't easy to add as the
struct dsdb_control_current_partition definition is private to
samdb.h, and thus not available in ldb_controls.c.
So we have a few choices really:
1) move the struct dsdb_control_current_partition structure to
ldb.h, so it is available in ldb_controls.c. Then add support for
that control in ldb_parse_control_strings(), which will allow you to
use it from python
2) in pyldb.c, allow for private control parsing hooks to be
registered by the s4 code
3) add a python interface directly for dsdb_load_partition_usn() in
scripting/python/pyglue.c. That is certainly quite simple to do, but
it isn't as general.
Simo, do you have a opinion on this?
Cheers, Tridge
More information about the samba-technical
mailing list