Networking Services Library Functions nislocalnames(3NSL)
NAME
nislocalnames, nislocaldirectory, nislocalhost,
nislocalgroup, nislocalprincipal - NIS] local names
SYNOPSIS
cc [ flag ... ] file ... -lnsl [ library ... ]
#include
nisname nislocaldirectory(void);
nisname nislocalhost(void);
nisname nislocalgroup(void);
nisname nislocalprincipal(void);
DESCRIPTION
These functions return several default NIS] names associated
with the current process.
nislocaldirectory() returns the name of the NIS] domain
for this machine. This is currently the same as the Secure
RPC domain returned by the sysinfo(2) system call.
nislocalhost() returns the NIS] name of the current
machine. This is the fully qualified name for the host and
is either the value returned by the gethostname(3C) func-
tion or, if the host name is only partially qualified, the
concatenation of that value and the name of the NIS] direc-
tory. Note that if a machine's name and address cannot be
found in the local NIS] directory, its hostname must be
fully qualified.
nislocalgroup() returns the name of the current NIS] group
name. This is currently set by setting the environment vari-
able NISGROUP to the groupname.
nislocalprincipal() returns the NIS] principal name for
the user associated with the effective UID of the calling
process. This function maps the effective uid into a princi-
pal name by looking for a LOCAL type credential in the table
named cred.orgdir in the default domain. See
SunOS 5.11 Last change: 10 Nov 2005 1
Networking Services Library Functions nislocalnames(3NSL)
nisaddcred(1M).
The result returned by these routines is a pointer to a data
structure with the NIS] library, and should be considered a
"read-only" result and should not be modified.
ENVIRONMENT VARIABLES
NISGROUP This variable contains the name of the local
NIS] group. If the name is not fully qualified,
the value returned by nislocaldirectory()
will be concatenated to it.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO
nisdefaults(1), nisaddcred(1M), sysinfo(2), gethostname(3C),
nisnames(3NSL), nisobjects(3NSL), attributes(5)
NOTES
NIS] might not be supported in future releases of the
Solaris operating system. Tools to aid the migration from
NIS] to LDAP are available in the current Solaris release.
For more information, visit
http:/www.sun.com/directory/nisplus/transition.html.
SunOS 5.11 Last change: 10 Nov 2005 2
|