nsswitch/winbind_nss_freebsd.c

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003 
00004    AIX loadable authentication module, providing identification 
00005    routines against Samba winbind/Windows NT Domain
00006 
00007    Copyright (C) Aaron Collins 2003
00008    
00009    This library is free software; you can redistribute it and/or
00010    modify it under the terms of the GNU Library General Public
00011    License as published by the Free Software Foundation; either
00012    version 2 of the License, or (at your option) any later version.
00013    
00014    This library is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017    Library General Public License for more details.
00018    
00019    You should have received a copy of the GNU Library General Public
00020    License along with this library; if not, write to the
00021    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00022    Boston, MA  02111-1307, USA.   
00023 */
00024 
00025 #include "winbind_client.h"
00026 
00027 /* Make sure that the module gets registered needed by freebsd 5.1 */
00028 
00029 extern enum nss_status _nss_winbind_getgrent_r(struct group *, char *, size_t,
00030     int *);
00031 extern enum nss_status _nss_winbind_getgrnam_r(const char *, struct group *,
00032     char *, size_t, int *);
00033 extern enum nss_status _nss_winbind_getgrgid_r(gid_t gid, struct group *, char *,
00034     size_t, int *);
00035 extern enum nss_status _nss_winbind_setgrent(void);
00036 extern enum nss_status _nss_winbind_endgrent(void);
00037 
00038 extern enum nss_status _nss_winbind_getpwent_r(struct passwd *, char *, size_t,
00039     int *);
00040 extern enum nss_status _nss_winbind_getpwnam_r(const char *, struct passwd *,
00041     char *, size_t, int *);
00042 extern enum nss_status _nss_winbind_getpwuid_r(gid_t gid, struct passwd *, char *,
00043     size_t, int *);
00044 extern enum nss_status _nss_winbind_setpwent(void);
00045 extern enum nss_status _nss_winbind_endpwent(void);
00046 
00047 NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r);
00048 NSS_METHOD_PROTOTYPE(__nss_compat_getgrgid_r);
00049 NSS_METHOD_PROTOTYPE(__nss_compat_getgrent_r);
00050 NSS_METHOD_PROTOTYPE(__nss_compat_setgrent);
00051 NSS_METHOD_PROTOTYPE(__nss_compat_endgrent);
00052 
00053 NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r);
00054 NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r);
00055 NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r);
00056 NSS_METHOD_PROTOTYPE(__nss_compat_setpwent);
00057 NSS_METHOD_PROTOTYPE(__nss_compat_endpwent);
00058 
00059 static ns_mtab methods[] = {
00060 { NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, _nss_winbind_getgrnam_r },
00061 { NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, _nss_winbind_getgrgid_r },
00062 { NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, _nss_winbind_getgrent_r },
00063 { NSDB_GROUP, "endgrent",   __nss_compat_setgrent,   _nss_winbind_setgrent },
00064 { NSDB_GROUP, "setgrent",   __nss_compat_endgrent,   _nss_winbind_endgrent },
00065 
00066 { NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, _nss_winbind_getpwnam_r },
00067 { NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, _nss_winbind_getpwuid_r },
00068 { NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, _nss_winbind_getpwent_r },
00069 { NSDB_PASSWD, "endpwent",   __nss_compat_setpwent,   _nss_winbind_setpwent },
00070 { NSDB_PASSWD, "setpwent",   __nss_compat_endpwent,   _nss_winbind_endpwent },
00071 
00072 };
00073 
00074 ns_mtab *
00075 nss_module_register(const char *source, unsigned int *mtabsize,
00076     nss_module_unregister_fn *unreg)
00077 {
00078         *mtabsize = sizeof(methods)/sizeof(methods[0]);
00079         *unreg = NULL;
00080         return (methods);
00081 }

Sambaに対してSat Aug 29 21:23:09 2009に生成されました。  doxygen 1.4.7