Update.
[glibc.git] / resolv / nss_dns / dns-host.c
blobf7b1007f29bc89a2c738f509eda0258af37411c2
1 /* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 /* Parts of this file are plain copies of the file `gethtnamadr.c' from
21 the bind package and it has the following copyright. */
24 * ++Copyright++ 1985, 1988, 1993
25 * -
26 * Copyright (c) 1985, 1988, 1993
27 * The Regents of the University of California. All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 4. Neither the name of the University nor the names of its contributors
38 * may be used to endorse or promote products derived from this software
39 * without specific prior written permission.
41 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 * -
53 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
55 * Permission to use, copy, modify, and distribute this software for any
56 * purpose with or without fee is hereby granted, provided that the above
57 * copyright notice and this permission notice appear in all copies, and that
58 * the name of Digital Equipment Corporation not be used in advertising or
59 * publicity pertaining to distribution of the document or software without
60 * specific, written prior permission.
62 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
63 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
64 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
65 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
66 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
67 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
68 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
69 * SOFTWARE.
70 * -
71 * --Copyright--
74 #include <ctype.h>
75 #include <errno.h>
76 #include <netdb.h>
77 #include <stdio.h>
78 #include <stdlib.h>
79 #include <stddef.h>
80 #include <string.h>
81 #include <sys/syslog.h>
83 #include "nsswitch.h"
85 /* Get implementation for some internal functions. */
86 #include <resolv/mapv4v6addr.h>
87 #include <resolv/mapv4v6hostent.h>
89 /* Maximum number of aliases we allow. */
90 #define MAX_NR_ALIASES 48
91 #define MAX_NR_ADDRS 48
93 #if PACKETSZ > 1024
94 # define MAXPACKET PACKETSZ
95 #else
96 # define MAXPACKET 1024
97 #endif
98 /* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */
99 #ifdef MAXHOSTNAMELEN
100 # undef MAXHOSTNAMELEN
101 #endif
102 #define MAXHOSTNAMELEN 256
104 static const char AskedForGot[] = "\
105 gethostby*.getanswer: asked for \"%s\", got \"%s\"";
108 /* We need this time later. */
109 typedef union querybuf
111 HEADER hdr;
112 u_char buf[MAXPACKET];
113 } querybuf;
115 /* These functions are defined in res_comp.c. */
116 #define NS_MAXCDNAME 255 /* maximum compressed domain name */
117 extern int __ns_name_ntop (const u_char *, char *, size_t);
118 extern int __ns_name_unpack (const u_char *, const u_char *,
119 const u_char *, u_char *, size_t);
122 static enum nss_status getanswer_r (const querybuf *answer, int anslen,
123 const char *qname, int qtype,
124 struct hostent *result, char *buffer,
125 size_t buflen, int *errnop, int *h_errnop,
126 int map);
128 enum nss_status
129 _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
130 char *buffer, size_t buflen, int *errnop,
131 int *h_errnop)
133 querybuf host_buffer;
134 char tmp[NS_MAXDNAME];
135 int size, type, n;
136 const char *cp;
137 int map = 0;
139 if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
140 return NSS_STATUS_UNAVAIL;
142 switch (af) {
143 case AF_INET:
144 size = INADDRSZ;
145 type = T_A;
146 break;
147 case AF_INET6:
148 size = IN6ADDRSZ;
149 type = T_AAAA;
150 break;
151 default:
152 *h_errnop = NO_DATA;
153 *errnop = EAFNOSUPPORT;
154 return NSS_STATUS_UNAVAIL;
157 result->h_addrtype = af;
158 result->h_length = size;
161 * if there aren't any dots, it could be a user-level alias.
162 * this is also done in res_query() since we are not the only
163 * function that looks up host names.
165 if (strchr (name, '.') == NULL
166 && (cp = res_hostalias (&_res, name, tmp, sizeof (tmp))) != NULL)
167 name = cp;
169 n = res_nsearch (&_res, name, C_IN, type, host_buffer.buf,
170 sizeof (host_buffer.buf));
171 if (n < 0)
173 enum nss_status status = (errno == ECONNREFUSED
174 ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND);
175 *h_errnop = h_errno;
176 *errnop = h_errno == TRY_AGAIN ? EAGAIN : ENOENT;
178 /* If we are looking for a IPv6 address and mapping is enabled
179 by having the RES_USE_INET6 bit in _res.options set, we try
180 another lookup. */
181 if (af == AF_INET6 && (_res.options & RES_USE_INET6))
182 n = res_nsearch (&_res, name, C_IN, T_A, host_buffer.buf,
183 sizeof (host_buffer.buf));
185 if (n < 0)
186 return status;
188 map = 1;
190 result->h_addrtype = AF_INET;
191 result->h_length = INADDRSZ;;
194 return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
195 errnop, h_errnop, map);
199 enum nss_status
200 _nss_dns_gethostbyname_r (const char *name, struct hostent *result,
201 char *buffer, size_t buflen, int *errnop,
202 int *h_errnop)
204 enum nss_status status = NSS_STATUS_NOTFOUND;
206 if (_res.options & RES_USE_INET6)
207 status = _nss_dns_gethostbyname2_r (name, AF_INET6, result, buffer,
208 buflen, errnop, h_errnop);
209 if (status == NSS_STATUS_NOTFOUND)
210 status = _nss_dns_gethostbyname2_r (name, AF_INET, result, buffer,
211 buflen, errnop, h_errnop);
213 return status;
217 enum nss_status
218 _nss_dns_gethostbyaddr_r (const char *addr, size_t len, int af,
219 struct hostent *result, char *buffer, size_t buflen,
220 int *errnop, int *h_errnop)
222 static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
223 static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
224 static const u_char v6local[] = { 0,0, 0,1 };
225 const u_char *uaddr = (const u_char *)addr;
226 struct host_data
228 char *aliases[MAX_NR_ALIASES];
229 unsigned char host_addr[16]; /* IPv4 or IPv6 */
230 char *h_addr_ptrs[MAX_NR_ADDRS + 1];
231 char linebuffer[0];
232 } *host_data = (struct host_data *) buffer;
233 querybuf host_buffer;
234 char qbuf[MAXDNAME+1], *qp;
235 size_t size;
236 int n, status;
238 if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
239 return NSS_STATUS_UNAVAIL;
241 if (af == AF_INET6 && len == IN6ADDRSZ
242 && (memcmp (uaddr, mapped, sizeof mapped) == 0
243 || (memcmp (uaddr, tunnelled, sizeof tunnelled) == 0
244 && memcmp (&uaddr[sizeof tunnelled], v6local, sizeof v6local))))
246 /* Unmap. */
247 addr += sizeof mapped;
248 uaddr += sizeof mapped;
249 af = AF_INET;
250 len = INADDRSZ;
253 switch (af)
255 case AF_INET:
256 size = INADDRSZ;
257 break;
258 case AF_INET6:
259 size = IN6ADDRSZ;
260 break;
261 default:
262 *errnop = EAFNOSUPPORT;
263 *h_errnop = NETDB_INTERNAL;
264 return NSS_STATUS_UNAVAIL;
266 if (size > len)
268 *errnop = EAFNOSUPPORT;
269 *h_errnop = NETDB_INTERNAL;
270 return NSS_STATUS_UNAVAIL;
273 switch (af)
275 case AF_INET:
276 sprintf (qbuf, "%u.%u.%u.%u.in-addr.arpa", (uaddr[3] & 0xff),
277 (uaddr[2] & 0xff), (uaddr[1] & 0xff), (uaddr[0] & 0xff));
278 break;
279 case AF_INET6:
280 qp = qbuf;
281 for (n = IN6ADDRSZ - 1; n >= 0; n--)
282 qp += sprintf (qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf);
283 strcpy (qp, "ip6.int");
284 break;
285 default:
286 /* Cannot happen. */
289 n = res_nquery (&_res, qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
290 sizeof host_buffer);
291 if (n < 0)
293 *h_errnop = h_errno;
294 *errnop = errno;
295 return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
298 status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
299 errnop, h_errnop, 0 /* XXX */);
300 if (status != NSS_STATUS_SUCCESS)
302 *h_errnop = h_errno;
303 *errnop = errno;
304 return status;
307 #ifdef SUNSECURITY
308 This is not implemented because it is not possible to use the current
309 source from bind in a multi-threaded program.
310 #endif
312 result->h_addrtype = af;
313 result->h_length = len;
314 memcpy (host_data->host_addr, addr, len);
315 host_data->h_addr_ptrs[0] = (char *) host_data->host_addr;
316 host_data->h_addr_ptrs[1] = NULL;
317 #if 0
318 /* XXX I think this is wrong. Why should an IPv4 address be
319 converted to IPv6 if the user explicitly asked for IPv4? */
320 if (af == AF_INET && (_res.options & RES_USE_INET6))
322 map_v4v6_address ((char *) host_data->host_addr,
323 (char *) host_data->host_addr);
324 result->h_addrtype = AF_INET6;
325 result->h_length = IN6ADDRSZ;
327 #endif
328 *h_errnop = NETDB_SUCCESS;
329 return NSS_STATUS_SUCCESS;
333 static enum nss_status
334 getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype,
335 struct hostent *result, char *buffer, size_t buflen,
336 int *errnop, int *h_errnop, int map)
338 struct host_data
340 char *aliases[MAX_NR_ALIASES];
341 unsigned char host_addr[16]; /* IPv4 or IPv6 */
342 char *h_addr_ptrs[MAX_NR_ADDRS + 1];
343 char linebuffer[0];
344 } *host_data = (struct host_data *) buffer;
345 int linebuflen = buflen - offsetof (struct host_data, linebuffer);
346 register const HEADER *hp;
347 const u_char *end_of_message, *cp;
348 int n, ancount, qdcount;
349 int haveanswer, had_error;
350 char *bp, **ap, **hap;
351 char tbuf[MAXDNAME];
352 const char *tname;
353 int (*name_ok) (const char *);
354 u_char packtmp[NS_MAXCDNAME];
355 int have_to_map = 0;
357 if (__builtin_expect (linebuflen, 0) < 0)
359 /* The buffer is too small. */
360 too_small:
361 *errnop = ERANGE;
362 *h_errnop = NETDB_INTERNAL;
363 return NSS_STATUS_TRYAGAIN;
366 tname = qname;
367 result->h_name = NULL;
368 end_of_message = answer->buf + anslen;
369 switch (qtype)
371 case T_A:
372 case T_AAAA:
373 name_ok = res_hnok;
374 break;
375 case T_PTR:
376 name_ok = res_dnok;
377 break;
378 default:
379 *errnop = ENOENT;
380 return NSS_STATUS_UNAVAIL; /* XXX should be abort(); */
384 * find first satisfactory answer
386 hp = &answer->hdr;
387 bp = host_data->linebuffer;
388 ancount = ntohs (hp->ancount);
389 qdcount = ntohs (hp->qdcount);
390 cp = answer->buf + HFIXEDSZ;
391 if (__builtin_expect (qdcount, 1) != 1)
393 *h_errnop = NO_RECOVERY;
394 *errnop = ENOENT;
395 return NSS_STATUS_UNAVAIL;
398 n = __ns_name_unpack (answer->buf, end_of_message, cp,
399 packtmp, sizeof packtmp);
400 if (n != -1 && __ns_name_ntop (packtmp, bp, linebuflen) == -1)
402 if (__builtin_expect (errno, 0) == EMSGSIZE)
403 goto too_small;
405 n = -1;
408 if (n > 0 && bp[0] == '.')
409 bp[0] = '\0';
411 if (n < 0 || (*name_ok) (bp) == 0)
413 *errnop = errno;
414 *h_errnop = NO_RECOVERY;
415 return NSS_STATUS_UNAVAIL;
417 cp += n + QFIXEDSZ;
419 if (qtype == T_A || qtype == T_AAAA)
421 /* res_send() has already verified that the query name is the
422 * same as the one we sent; this just gets the expanded name
423 * (i.e., with the succeeding search-domain tacked on).
425 n = strlen (bp) + 1; /* for the \0 */
426 if (n >= MAXHOSTNAMELEN)
428 *h_errnop = NO_RECOVERY;
429 *errnop = ENOENT;
430 return NSS_STATUS_TRYAGAIN;
432 result->h_name = bp;
433 bp += n;
434 linebuflen -= n;
435 if (linebuflen < 0)
436 goto too_small;
437 /* The qname can be abbreviated, but h_name is now absolute. */
438 qname = result->h_name;
441 ap = host_data->aliases;
442 *ap = NULL;
443 result->h_aliases = host_data->aliases;
444 hap = host_data->h_addr_ptrs;
445 *hap = NULL;
446 result->h_addr_list = host_data->h_addr_ptrs;
447 haveanswer = 0;
448 had_error = 0;
450 while (ancount-- > 0 && cp < end_of_message && had_error == 0)
452 int type, class;
454 n = __ns_name_unpack (answer->buf, end_of_message, cp,
455 packtmp, sizeof packtmp);
456 if (n != -1 && __ns_name_ntop (packtmp, bp, linebuflen) == -1)
458 if (__builtin_expect (errno, 0) == EMSGSIZE)
459 goto too_small;
461 n = -1;
464 if (n < 0 || (*name_ok) (bp) == 0)
466 ++had_error;
467 continue;
469 cp += n; /* name */
470 type = ns_get16 (cp);
471 cp += INT16SZ; /* type */
472 class = ns_get16 (cp);
473 cp += INT16SZ + INT32SZ; /* class, TTL */
474 n = ns_get16 (cp);
475 cp += INT16SZ; /* len */
476 if (class != C_IN)
478 /* XXX - debug? syslog? */
479 cp += n;
480 continue; /* XXX - had_error++ ? */
483 if ((qtype ==T_A || qtype == T_AAAA) && type == T_CNAME)
485 if (ap >= &host_data->aliases[MAX_NR_ALIASES - 1])
486 continue;
487 n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
488 if (n < 0 || (*name_ok) (tbuf) == 0)
490 ++had_error;
491 continue;
493 cp += n;
494 /* Store alias. */
495 *ap++ = bp;
496 n = strlen (bp) + 1; /* For the \0. */
497 if (__builtin_expect (n, 0) >= MAXHOSTNAMELEN)
499 ++had_error;
500 continue;
502 bp += n;
503 linebuflen -= n;
504 /* Get canonical name. */
505 n = strlen (tbuf) + 1; /* For the \0. */
506 if (__builtin_expect (n > linebuflen, 0))
507 goto too_small;
508 if (__builtin_expect (n, 0) >= MAXHOSTNAMELEN)
510 ++had_error;
511 continue;
513 result->h_name = bp;
514 bp = __mempcpy (bp, tbuf, n); /* Cannot overflow. */
515 linebuflen -= n;
516 continue;
519 if (qtype == T_PTR && type == T_CNAME)
521 n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
522 if (n < 0 || res_dnok (tbuf) == 0)
524 ++had_error;
525 continue;
527 cp += n;
528 /* Get canonical name. */
529 n = strlen (tbuf) + 1; /* For the \0. */
530 if (__builtin_expect (n > linebuflen, 0))
531 goto too_small;
532 if (__builtin_expect (n, 0) >= MAXHOSTNAMELEN)
534 ++had_error;
535 continue;
537 tname = bp;
538 bp = __mempcpy (bp, tbuf, n); /* Cannot overflow. */
539 linebuflen -= n;
540 continue;
542 if (__builtin_expect (type == T_SIG, 0)
543 || __builtin_expect (type == T_KEY, 0)
544 || __builtin_expect (type == T_NXT, 0))
546 /* We don't support DNSSEC yet. For now, ignore the record
547 and send a low priority message to syslog. */
548 syslog (LOG_DEBUG | LOG_AUTH,
549 "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
550 qname, p_class (C_IN), p_type(qtype), p_type (type));
551 cp += n;
552 continue;
555 if (type == T_A && qtype == T_AAAA && map)
556 have_to_map = 1;
557 else if (__builtin_expect (type != qtype, 0))
559 syslog (LOG_NOTICE | LOG_AUTH,
560 "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
561 qname, p_class (C_IN), p_type (qtype), p_type (type));
562 cp += n;
563 continue; /* XXX - had_error++ ? */
566 switch (type)
568 case T_PTR:
569 if (__strcasecmp (tname, bp) != 0)
571 syslog (LOG_NOTICE | LOG_AUTH, AskedForGot, qname, bp);
572 cp += n;
573 continue; /* XXX - had_error++ ? */
576 n = __ns_name_unpack (answer->buf, end_of_message, cp,
577 packtmp, sizeof packtmp);
578 if (n != -1 && __ns_name_ntop (packtmp, bp, linebuflen) == -1)
580 if (__builtin_expect (errno, 0) == EMSGSIZE)
581 goto too_small;
583 n = -1;
586 if (n < 0 || res_hnok (bp) == 0)
588 ++had_error;
589 break;
591 #if MULTI_PTRS_ARE_ALIASES
592 cp += n;
593 if (haveanswer == 0)
594 result->h_name = bp;
595 else if (ap < &host_data->aliases[MAXALIASES-1])
596 *ap++ = bp;
597 else
598 n = -1;
599 if (n != -1)
601 n = strlen (bp) + 1; /* for the \0 */
602 if (__builtin_expect (n, 0) >= MAXHOSTNAMELEN)
604 ++had_error;
605 break;
607 bp += n;
608 linebuflen -= n;
610 break;
611 #else
612 result->h_name = bp;
613 if (have_to_map)
615 n = strlen (bp) + 1; /* for the \0 */
616 if (n >= MAXHOSTNAMELEN)
618 ++had_error;
619 break;
621 bp += n;
622 linebuflen -= n;
623 map_v4v6_hostent (result, &bp, &linebuflen);
625 *h_errnop = NETDB_SUCCESS;
626 return NSS_STATUS_SUCCESS;
627 #endif
628 case T_A:
629 case T_AAAA:
630 if (__builtin_expect (strcasecmp (result->h_name, bp), 0) != 0)
632 syslog (LOG_NOTICE | LOG_AUTH, AskedForGot, result->h_name, bp);
633 cp += n;
634 continue; /* XXX - had_error++ ? */
636 if (n != result->h_length)
638 cp += n;
639 continue;
641 if (!haveanswer)
643 register int nn;
645 result->h_name = bp;
646 nn = strlen (bp) + 1; /* for the \0 */
647 bp += nn;
648 linebuflen -= nn;
651 linebuflen -= sizeof (align) - ((u_long) bp % sizeof (align));
652 bp += sizeof (align) - ((u_long) bp % sizeof (align));
654 if (__builtin_expect (n > linebuflen, 0))
655 goto too_small;
656 if (hap >= &host_data->h_addr_ptrs[MAX_NR_ADDRS-1])
658 cp += n;
659 continue;
661 bp = __mempcpy (*hap++ = bp, cp, n);
662 cp += n;
663 linebuflen -= n;
664 break;
665 default:
666 abort ();
668 if (had_error == 0)
669 ++haveanswer;
672 if (haveanswer > 0)
674 *ap = NULL;
675 *hap = NULL;
676 #if defined RESOLVSORT
678 * Note: we sort even if host can take only one address
679 * in its return structures - should give it the "best"
680 * address in that case, not some random one
682 if (_res.nsort && haveanswer > 1 && qtype == T_A)
683 addrsort (host_data->h_addr_ptrs, haveanswer);
684 #endif /*RESOLVSORT*/
686 if (result->h_name == NULL)
688 n = strlen (qname) + 1; /* For the \0. */
689 if (n > linebuflen)
690 goto too_small;
691 if (n >= MAXHOSTNAMELEN)
692 goto no_recovery;
693 result->h_name = bp;
694 bp = __mempcpy (bp, qname, n); /* Cannot overflow. */
695 linebuflen -= n;
698 if (have_to_map)
699 map_v4v6_hostent (result, &bp, &linebuflen);
700 *h_errnop = NETDB_SUCCESS;
701 return NSS_STATUS_SUCCESS;
703 no_recovery:
704 *h_errnop = NO_RECOVERY;
705 *errnop = ENOENT;
706 return NSS_STATUS_TRYAGAIN;