Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_entry_set_dn()

Sets the distinguished name (DN) of an entry.

Syntax

#include "slapi-plugin.h"
void slapi_entry_set_dn( Slapi_Entry *e, char *dn );

Parameters

This function takes the following parameters:

e

Entry to which you want to assign the DN.

dn

Distinguished name you want assigned to the entry.

Description

This function sets a pointer to the DN supplied in the specified entry.

Memory Concerns

dn is freed when slapi_entry_free() is called.

A copy of dn should be passed, for example:

char *dn = slapi_ch_strdup(some_dn);
slapi_entry_set_dn(e, dn);

The old dn is freed as a result of this call. Do not pass in a NULL value.

See Also

slapi_entry_free()

slapi_entry_get_dn()

slapi_entry_set_dn()