Lines Matching defs:ln

149 static struct local_names *ln = NULL;
169 if (ln != NULL) {
171 return (ln);
174 ln = calloc(1, sizeof (*ln));
175 if (ln == NULL) {
179 ln->principal_map = NULL;
181 if (sysinfo(SI_SRPC_DOMAIN, ln->domain, LN_BUFSIZE) < 0)
182 return (ln);
184 if (ln->domain[strlen(ln->domain)-1] != '.')
185 (void) strcat(ln->domain, ".");
186 if (sysinfo(SI_HOSTNAME, ln->host, LN_BUFSIZE) < 0)
187 return (ln);
194 t = strchr(ln->host, '.');
197 if (ln->domain[0] != '.')
198 (void) strcat(ln->host, ".");
199 ln->rpcdomain = strdup(ln->domain);
200 (void) strcat(ln->host, ln->domain);
204 ln->group[0] = '\0';
215 (void) strncpy(ln->group, t, maxlen);
216 if (strcmp(ln->group, "") == 0) {
217 return (ln);
219 ln->group[maxlen] = '\0';
222 temp = strrchr(ln->group, '.');
228 ln->group[maxlen - (strlen(ln->domain)+1)] = '\0';
231 if (ln->domain[0] != '.') {
232 (void) strcat(ln->group, ".");
234 (void) strcat(ln->group, ln->domain);
237 return (ln);
248 struct local_names *ln = __get_local_names();
250 /* LOCK NOTE: Warning, after initialization, "ln" is expected */
253 if (!ln)
255 return (ln->group);
389 struct local_names *ln = __get_local_names();
396 if ((!s) || (!ln))
399 d = &(ln->domain[0]);
400 dl = strlen(ln->domain); /* _always dot terminated_ */
454 struct local_names *ln = __get_local_names();
456 /* LOCK NOTE: Warning, after initialization, "ln" is expected */
459 if (ln == NULL)
461 return (ln->domain);
472 struct local_names *ln = __get_local_names();
474 /* LOCK NOTE: Warning, after initialization, "ln" is expected */
477 if (ln == NULL)
479 return (ln->rpcdomain);
491 struct local_names *ln = __get_local_names();
493 /* LOCK NOTE: Warning, after initialization, "ln" is expected */
496 if (ln == NULL)
499 return (ln->host);