Back to index

glibc  2.9
nss-nis.c
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #include "nss-nis.h"
00020 #include "nsswitch.h"
00021 
00022 
00023 /* Convert YP error number to NSS error number.  */
00024 const enum nss_status __yperr2nss_tab[] =
00025 {
00026   [YPERR_SUCCESS] = NSS_STATUS_SUCCESS,
00027   [YPERR_BADARGS] = NSS_STATUS_UNAVAIL,
00028   [YPERR_RPC]     = NSS_STATUS_UNAVAIL,
00029   [YPERR_DOMAIN]  = NSS_STATUS_UNAVAIL,
00030   [YPERR_MAP]     = NSS_STATUS_UNAVAIL,
00031   [YPERR_KEY]     = NSS_STATUS_NOTFOUND,
00032   [YPERR_YPERR]   = NSS_STATUS_UNAVAIL,
00033   [YPERR_RESRC]   = NSS_STATUS_TRYAGAIN,
00034   [YPERR_NOMORE]  = NSS_STATUS_NOTFOUND,
00035   [YPERR_PMAP]    = NSS_STATUS_UNAVAIL,
00036   [YPERR_YPBIND]  = NSS_STATUS_UNAVAIL,
00037   [YPERR_YPSERV]  = NSS_STATUS_UNAVAIL,
00038   [YPERR_NODOM]   = NSS_STATUS_UNAVAIL,
00039   [YPERR_BADDB]   = NSS_STATUS_UNAVAIL,
00040   [YPERR_VERS]    = NSS_STATUS_UNAVAIL,
00041   [YPERR_ACCESS]  = NSS_STATUS_UNAVAIL,
00042   [YPERR_BUSY]    = NSS_STATUS_TRYAGAIN
00043 };
00044 const unsigned int __yperr2nss_count = (sizeof (__yperr2nss_tab)
00045                                     / sizeof (__yperr2nss_tab[0]));