LIBNIT_UIDToName

This function returns the user name associated with the specified UID.

Syntax

#include <nitlibext.h>
int LIBNIT_UIDToName (
                       uid_t uid,
                       char **name
                     )

Parameters

uid

(IN) Specifies the UID value for the name that is requested.

name

(OUT) Returns the name of the specified eDirectory or Active Directory user. For eDirectory user, the value returned is in FQDN format and for Active Directory user, it is in DomainName/SAMAccountName format.

Return Values

0

NIT_SUCCESS

Success

-9001

NITERR_ENTRY_NOTFOUND

Search returned unexpected results.

-9002

NITERR_ATTRIBUTE_NOTFOUND

Specified UID attribute is not found in the eDirectory or Active Directory.

-9003

NITERR_UIDRANGE_EXHAUSTED

The UID range has been exhausted.

-9004

NITERR_IO_ERROR

Unable to write the NIT configuration file.

-9005

NITERR_PERMISSION_DENIED

Request comes from a non-root user, permission is denied to perform the operation.

-9006

NITERR_NITD_UNAVAILABLE

NIT daemon is not running.

-9007

NITERR_AD_LDAP_TIMEOUT

NIT did not receive an answer from the LDAP server before the timeout interval.

-9008

NITERR_EDIR_ONLY_MODE

NIT runs in eDirectory mode, cannot perform Active Directory search operations.

-9009

NITERR_INSUFFICIENT_BUFFER

The caller has not allocated enough memory.

-9010

NITERR_INSUFFICIENT_MEMORY

There is no enough memory to allocate.

-9011

NITERR_UNKNOWN_ERROR

Cause is unknown.

-9012

NITERR_NO_USER_ACCESS_GROUP

Active Directory universal access group OESAccessGrp is not found.

-9013

NITERR_MANY_USER_ACCESS_GROUP

More than one Active Directory license universal group is found.

-9014

NITERR_INVALID_PARAMETER

The parameters passed are NULL or invalid.

-9016

NITERR_AD_NOT_REACHABLE

Active Directory server is not reachable.

-9017

NITERR_EDIR_NOT_REACHABLE

eDirectory server is not reachable.

NOTE:Caller has to free the memory pointed by name when no longer required by the application.