this makes it possible to use a raw OID string on the command line or
in python scripts
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
return ctrl;
}
+
+ /* support a raw OID */
+ if (isdigit(control_strings[0])) {
+ const char *p = strchr(control_strings, ':');
+ if (p == NULL) {
+ goto failed;
+ }
+ if (strspn(control_strings, "0123456789.") != (p-control_strings)) {
+ goto failed;
+ }
+ ctrl->oid = talloc_strndup(ctrl, control_strings, p-control_strings);
+ ctrl->critical = (p[1]=='1'?1:0);
+ ctrl->data = NULL;
+ return ctrl;
+ }
+
/*
* When no matching control has been found.
*/
+failed:
+ talloc_free(ctrl);
return NULL;
}
#include "replace.h"
#include "system/filesys.h"
#include "system/time.h"
+#include "system/locale.h"
#include "ldb.h"
#include "ldb_module.h"