2005-01-14 GOTO Masanori <gotom@debian.or.jp>
[glibc/history.git] / nis / nss-nisplus.c
blobefffda6a324645c756b482810b869a8390540deb
1 /* Copyright (C) 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1997.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the 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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #include <rpcsvc/nis.h>
22 #include "nss-nisplus.h"
23 #include "nsswitch.h"
26 /* Convert NIS+ error number to NSS error number. */
27 const enum nss_status __niserr2nss_tab[] =
29 [NIS_SUCCESS] = NSS_STATUS_SUCCESS,
30 [NIS_S_SUCCESS] = NSS_STATUS_SUCCESS,
31 [NIS_NOTFOUND] = NSS_STATUS_NOTFOUND,
32 [NIS_S_NOTFOUND] = NSS_STATUS_NOTFOUND,
33 [NIS_CACHEEXPIRED] = NSS_STATUS_UNAVAIL,
34 [NIS_NAMEUNREACHABLE] = NSS_STATUS_UNAVAIL,
35 [NIS_UNKNOWNOBJ] = NSS_STATUS_NOTFOUND,
36 [NIS_TRYAGAIN] = NSS_STATUS_TRYAGAIN,
37 [NIS_SYSTEMERROR] = NSS_STATUS_UNAVAIL,
38 [NIS_CHAINBROKEN] = NSS_STATUS_UNAVAIL,
39 [NIS_PERMISSION] = NSS_STATUS_UNAVAIL,
40 [NIS_NOTOWNER] = NSS_STATUS_UNAVAIL,
41 [NIS_NOT_ME] = NSS_STATUS_UNAVAIL,
42 [NIS_NOMEMORY] = NSS_STATUS_TRYAGAIN,
43 [NIS_NAMEEXISTS] = NSS_STATUS_UNAVAIL,
44 [NIS_NOTMASTER] = NSS_STATUS_UNAVAIL,
45 [NIS_INVALIDOBJ] = NSS_STATUS_UNAVAIL,
46 [NIS_BADNAME] = NSS_STATUS_UNAVAIL,
47 [NIS_NOCALLBACK] = NSS_STATUS_UNAVAIL,
48 [NIS_CBRESULTS] = NSS_STATUS_UNAVAIL,
49 [NIS_NOSUCHNAME] = NSS_STATUS_NOTFOUND,
50 [NIS_NOTUNIQUE] = NSS_STATUS_UNAVAIL,
51 [NIS_IBMODERROR] = NSS_STATUS_UNAVAIL,
52 [NIS_NOSUCHTABLE] = NSS_STATUS_UNAVAIL,
53 [NIS_TYPEMISMATCH] = NSS_STATUS_UNAVAIL,
54 [NIS_LINKNAMEERROR] = NSS_STATUS_UNAVAIL,
55 [NIS_PARTIAL] = NSS_STATUS_NOTFOUND,
56 [NIS_TOOMANYATTRS] = NSS_STATUS_UNAVAIL,
57 [NIS_RPCERROR] = NSS_STATUS_UNAVAIL,
58 [NIS_BADATTRIBUTE] = NSS_STATUS_UNAVAIL,
59 [NIS_NOTSEARCHABLE] = NSS_STATUS_UNAVAIL,
60 [NIS_CBERROR] = NSS_STATUS_UNAVAIL,
61 [NIS_FOREIGNNS] = NSS_STATUS_UNAVAIL,
62 [NIS_BADOBJECT] = NSS_STATUS_UNAVAIL,
63 [NIS_NOTSAMEOBJ] = NSS_STATUS_UNAVAIL,
64 [NIS_MODFAIL] = NSS_STATUS_UNAVAIL,
65 [NIS_BADREQUEST] = NSS_STATUS_UNAVAIL,
66 [NIS_NOTEMPTY] = NSS_STATUS_UNAVAIL,
67 [NIS_COLDSTART_ERR] = NSS_STATUS_UNAVAIL,
68 [NIS_RESYNC] = NSS_STATUS_UNAVAIL,
69 [NIS_FAIL] = NSS_STATUS_UNAVAIL,
70 [NIS_UNAVAIL] = NSS_STATUS_UNAVAIL,
71 [NIS_RES2BIG] = NSS_STATUS_UNAVAIL,
72 [NIS_SRVAUTH] = NSS_STATUS_UNAVAIL,
73 [NIS_CLNTAUTH] = NSS_STATUS_UNAVAIL,
74 [NIS_NOFILESPACE] = NSS_STATUS_UNAVAIL,
75 [NIS_NOPROC] = NSS_STATUS_UNAVAIL,
76 [NIS_DUMPLATER] = NSS_STATUS_UNAVAIL
78 const unsigned int __niserr2nss_count = (sizeof (__niserr2nss_tab)
79 / sizeof (__niserr2nss_tab[0]));