Creates a new LDAP partition.
#include <ldapx.h> int ldap_create_partition ( LDAP *ld, char *dn, int flags);
(IN) Points to the handle for the LDAP session.
(IN) Specifies the distinguished name, in LDAP format, of the child container where the new partition is created.
(IN) Specifies whether all the servers in the replica ring must be up before proceeding. When set to zero, the status of the servers is not checked. When set to LDAP_ENSURE_SERVERS_UP, all the servers must be up for the operation to proceed.
0x00 |
LDAP_SUCCESS |
0x01 |
LDAP_OPERATIONS_ERROR: A string is returned with this error code that indicates the source of the error. |
0x53 |
LDAP_ENCODING_ERROR |
0x5A |
LDAP_NO_MEMORY |
0x5C |
LDAP_NOT_SUPPORTED |
Non-zero |
Non-zero values indicate errors. See |
In eDirectory terminology, creating a partition splits a partition into a parent partition and a child partition at the child container specified in the call.
This operation is performed on the server with the master replica of the parent replica. The server with the parent's master replica must be running or this operation fails.
The caller must have supervisor rights to the parent's master replica.
For sample code, see splitpart.c.
The requestName is set to the OID (2.16.840.1.113719.1.27.100.3) and the requestValue is a BER encoding of the following:
RequestBer flags INTEGER dn LDAPDN
The responseName is set to the OID (2.16.840.1.113719.1.27.100.4) and there is no responseValue.
ResponseBer NULL