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

slapi_sdn_get_backend_parent()

Gets the DN of the parent of an entry within a specific backend.

Syntax

#include "slapi-plugin.h"
void slapi_sdn_get_backend_parent(const Slapi_DN *sdn,
    Slapi_DN *sdn_parent,const Slapi_Backend *backend);

Parameters

This function takes the following parameters:

sdn

DN of the entry whose parent is searched.

sdn_parent

Parent DN of sdn.

backend

Backend of which the parent of sdn is to be searched.

Description

This function gets the parent DN of an entry within a given backend. The parent DN is returned is sdn_parent, unless sdn is empty or is a suffix of the backend itself. In this case, sdn_parent is empty.

Memory Concerns

A Slapi_DN structure for sdn_parent must be allocated before calling this function.

See Also

slapi_sdn_get_parent()