1nis_local_names(3NSL)Networking Services Library Functionsnis_local_names(3NSL)
2
3
4

NAME

6       nis_local_names,  nis_local_directory, nis_local_host, nis_local_group,
7       nis_local_principal - NIS+ local names
8

SYNOPSIS

10       cc [ flag ... ] file ... -lnsl [ library ... ]
11       #include <rpcsvc/nis.h>
12
13
14
15       nis_name nis_local_directory(void);
16
17
18       nis_name nis_local_host(void);
19
20
21       nis_name nis_local_group(void);
22
23
24       nis_name nis_local_principal(void);
25
26

DESCRIPTION

28       These functions return several default NIS+ names associated  with  the
29       current process.
30
31
32       nis_local_directory()  returns  the  name  of  the NIS+ domain for this
33       machine. This is currently the same as the Secure RPC  domain  returned
34       by the sysinfo(2) system call.
35
36
37       nis_local_host() returns the  NIS+ name of the current machine. This is
38       the fully qualified name for the host and is either the value  returned
39       by the  gethostname(3C) function or, if the host name is only partially
40       qualified, the concatenation of that value and the  name  of  the  NIS+
41       directory. Note that if a machine's name and address cannot be found in
42       the local NIS+ directory, its hostname must be fully qualified.
43
44
45       nis_local_group() returns the name of the current NIS+ group name. This
46       is  currently  set by setting the environment variable NIS_GROUP to the
47       groupname.
48
49
50       nis_local_principal() returns the  NIS+ principal  name  for  the  user
51       associated with the effective UID of the calling process. This function
52       maps the effective uid into a principal name by  looking  for  a  LOCAL
53       type  credential in the table named cred.org_dir in the default domain.
54       See nisaddcred(1M).
55
56
57       The result returned by these routines is a pointer to a data  structure
58       with  the  NIS+  library, and should be considered a "read-only" result
59       and should not be modified.
60

ENVIRONMENT VARIABLES

62       NIS_GROUP    This variable contains the name of the local  NIS+  group.
63                    If  the name is not fully qualified, the value returned by
64                    nis_local_directory() will be concatenated to it.
65
66

ATTRIBUTES

68       See attributes(5) for descriptions of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │MT-Level                     │MT-Safe                      │
77       └─────────────────────────────┴─────────────────────────────┘
78

SEE ALSO

80       nisdefaults(1),    nisaddcred(1M),     sysinfo(2),     gethostname(3C),
81       nis_names(3NSL), nis_objects(3NSL), attributes(5)
82

NOTES

84       NIS+ might not be supported in future releases of the Solaris operating
85       system. Tools to aid the migration from NIS+ to LDAP are  available  in
86       the    current   Solaris   release.   For   more   information,   visit
87       http://www.sun.com/directory/nisplus/transition.html.
88
89
90
91SunOS 5.11                        10 Nov 2005            nis_local_names(3NSL)
Impressum