setdomainname

Name

setdomainname -- set NIS domain name (DEPRECATED).

Synopsis

#include <unistd.h>

int setdomainname (const char * name , size_t namelen );

Description

If NIS is in use, set the NIS domain name. Note that this is not the same as the domain name which provides the domain portion of a fully qualified domain name (for example, in DNS). If NIS is not in use, this function may set the domain name anyway, or it may fail.

This call shall fail unless the caller has appropriate privileges.

namelen shall be the length of the string pointed to by name.

Return Value

On success, setdomainname() shall return 0. Otherwise, it shall return -1 and set errno to indicate the error.

Errors

EPERM

The process did not have sufficient privilege to set the domain name.

EINVAL

name is a null pointer.