Back to index

glibc  2.9
nss-nisplus.c
Go to the documentation of this file.
00001 /* Copyright (C) 1997 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1997.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #include <rpcsvc/nis.h>
00021 
00022 #include "nss-nisplus.h"
00023 #include "nsswitch.h"
00024 
00025 
00026 /* Convert NIS+ error number to NSS error number.  */
00027 const enum nss_status __niserr2nss_tab[] =
00028 {
00029   [NIS_SUCCESS] = NSS_STATUS_SUCCESS,
00030   [NIS_S_SUCCESS] = NSS_STATUS_SUCCESS,
00031   [NIS_NOTFOUND] = NSS_STATUS_NOTFOUND,
00032   [NIS_S_NOTFOUND] = NSS_STATUS_NOTFOUND,
00033   [NIS_CACHEEXPIRED] = NSS_STATUS_UNAVAIL,
00034   [NIS_NAMEUNREACHABLE] = NSS_STATUS_UNAVAIL,
00035   [NIS_UNKNOWNOBJ] = NSS_STATUS_NOTFOUND,
00036   [NIS_TRYAGAIN] = NSS_STATUS_TRYAGAIN,
00037   [NIS_SYSTEMERROR] = NSS_STATUS_UNAVAIL,
00038   [NIS_CHAINBROKEN] = NSS_STATUS_UNAVAIL,
00039   [NIS_PERMISSION] = NSS_STATUS_UNAVAIL,
00040   [NIS_NOTOWNER] = NSS_STATUS_UNAVAIL,
00041   [NIS_NOT_ME] = NSS_STATUS_UNAVAIL,
00042   [NIS_NOMEMORY] = NSS_STATUS_TRYAGAIN,
00043   [NIS_NAMEEXISTS] = NSS_STATUS_UNAVAIL,
00044   [NIS_NOTMASTER] = NSS_STATUS_UNAVAIL,
00045   [NIS_INVALIDOBJ] = NSS_STATUS_UNAVAIL,
00046   [NIS_BADNAME] = NSS_STATUS_UNAVAIL,
00047   [NIS_NOCALLBACK] = NSS_STATUS_UNAVAIL,
00048   [NIS_CBRESULTS] = NSS_STATUS_UNAVAIL,
00049   [NIS_NOSUCHNAME] = NSS_STATUS_NOTFOUND,
00050   [NIS_NOTUNIQUE] = NSS_STATUS_UNAVAIL,
00051   [NIS_IBMODERROR] = NSS_STATUS_UNAVAIL,
00052   [NIS_NOSUCHTABLE] = NSS_STATUS_UNAVAIL,
00053   [NIS_TYPEMISMATCH] = NSS_STATUS_UNAVAIL,
00054   [NIS_LINKNAMEERROR] = NSS_STATUS_UNAVAIL,
00055   [NIS_PARTIAL] = NSS_STATUS_NOTFOUND,
00056   [NIS_TOOMANYATTRS] = NSS_STATUS_UNAVAIL,
00057   [NIS_RPCERROR] = NSS_STATUS_UNAVAIL,
00058   [NIS_BADATTRIBUTE] = NSS_STATUS_UNAVAIL,
00059   [NIS_NOTSEARCHABLE] = NSS_STATUS_UNAVAIL,
00060   [NIS_CBERROR] = NSS_STATUS_UNAVAIL,
00061   [NIS_FOREIGNNS] = NSS_STATUS_UNAVAIL,
00062   [NIS_BADOBJECT] = NSS_STATUS_UNAVAIL,
00063   [NIS_NOTSAMEOBJ] = NSS_STATUS_UNAVAIL,
00064   [NIS_MODFAIL] = NSS_STATUS_UNAVAIL,
00065   [NIS_BADREQUEST] = NSS_STATUS_UNAVAIL,
00066   [NIS_NOTEMPTY] = NSS_STATUS_UNAVAIL,
00067   [NIS_COLDSTART_ERR] = NSS_STATUS_UNAVAIL,
00068   [NIS_RESYNC] = NSS_STATUS_UNAVAIL,
00069   [NIS_FAIL] = NSS_STATUS_UNAVAIL,
00070   [NIS_UNAVAIL] = NSS_STATUS_UNAVAIL,
00071   [NIS_RES2BIG] = NSS_STATUS_UNAVAIL,
00072   [NIS_SRVAUTH] = NSS_STATUS_UNAVAIL,
00073   [NIS_CLNTAUTH] = NSS_STATUS_UNAVAIL,
00074   [NIS_NOFILESPACE] = NSS_STATUS_UNAVAIL,
00075   [NIS_NOPROC] = NSS_STATUS_UNAVAIL,
00076   [NIS_DUMPLATER] = NSS_STATUS_UNAVAIL
00077 };
00078 const unsigned int __niserr2nss_count = (sizeof (__niserr2nss_tab)
00079                                     / sizeof (__niserr2nss_tab[0]));