From 6b6068ef4d5332628ef59b5350eef2c91d1d598f Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 10 Nov 2006 15:36:05 +0000 Subject: rename nss/exports.h to nss/prototypes.h git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@82 ef36b2f9-881f-0410-afb5-c4e39611909c --- nss/Makefile.am | 2 +- nss/aliases.c | 2 +- nss/ethers.c | 2 +- nss/exports.h | 136 ------------------------------------------------------- nss/group.c | 2 +- nss/hosts.c | 2 +- nss/passwd.c | 2 +- nss/prototypes.h | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ nss/shadow.c | 2 +- 9 files changed, 143 insertions(+), 143 deletions(-) delete mode 100644 nss/exports.h create mode 100644 nss/prototypes.h (limited to 'nss') diff --git a/nss/Makefile.am b/nss/Makefile.am index 9f44f12..6f671f9 100644 --- a/nss/Makefile.am +++ b/nss/Makefile.am @@ -20,7 +20,7 @@ noinst_LIBRARIES = libnss.a -libnss_a_SOURCES = common.c common.h exports.h ../nslcd-client.h \ +libnss_a_SOURCES = common.c common.h prototypes.h ../nslcd-client.h \ ../nslcd.h ../nslcd-common.h \ aliases.c ethers.c group.c hosts.c passwd.c \ shadow.c diff --git a/nss/aliases.c b/nss/aliases.c index dfc05d3..2674d9c 100644 --- a/nss/aliases.c +++ b/nss/aliases.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" diff --git a/nss/ethers.c b/nss/ethers.c index 2ce6450..6a475cf 100644 --- a/nss/ethers.c +++ b/nss/ethers.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" diff --git a/nss/exports.h b/nss/exports.h deleted file mode 100644 index a860da5..0000000 --- a/nss/exports.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - exports.h - all functions exported by the NSS library - - Copyright (C) 2006 West Consulting - Copyright (C) 2006 Arthur de Jong - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301 USA -*/ - -#ifndef _NSS_EXPORTS_H -#define _NSS_EXPORTS_H 1 - -#include -#include -#include -#include -#include -#include -#include -#include - -/* We define struct etherent here because it does not seem to - be defined in any publicly available header file exposed - by glibc. This is taken from include/netinet/ether.h - of the glibc source. */ -struct etherent -{ - const char *e_name; - struct ether_addr e_addr; -}; - -/* - These are prototypes for functions exported from the ldap NSS module. - For more complete definitions of these functions check the GLIBC - documentation. - - Other services than those mentioned here are currently not implemented. -*/ - -/* aliases - mail aliases */ -enum nss_status _nss_ldap_getaliasbyname_r(const char *name,struct aliasent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setaliasent(void); -enum nss_status _nss_ldap_getaliasent_r(struct aliasent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endaliasent(void); - -/* automount - automounter maps */ -enum nss_status _nss_ldap_getautomntbyname_r(void *private,const char *key,const char **canon_key,const char **value,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setautomntent(const char *mapname,void **private); -enum nss_status _nss_ldap_getautomntent_r(void *private,const char **key,const char **value,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endautomntent(void **private); - -/* ethers - ethernet numbers */ -enum nss_status _nss_ldap_gethostton_r(const char *name,struct etherent *resut,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getntohost_r(const struct ether_addr *addr,struct etherent *eth,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setetherent(int stayopen); -enum nss_status _nss_ldap_getetherent_r(struct etherent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endetherent(void); - -/* group - groups of users */ -enum nss_status _nss_ldap_getgrnam_r(const char *name,struct group *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getgrgid_r(gid_t gid,struct group *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_initgroups_dyn(const char *user,gid_t group,long int *start,long int *size,gid_t **groupsp,long int limit,int *errnop); -enum nss_status _nss_ldap_setgrent(int stayopen); -enum nss_status _nss_ldap_getgrent_r(struct group *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endgrent(void); - -/* hosts - host names and numbers */ -enum nss_status _nss_ldap_gethostbyname_r(const char *name,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); -enum nss_status _nss_ldap_gethostbyname2_r(const char *name,int af,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); -enum nss_status _nss_ldap_gethostbyaddr_r(const void *addr,socklen_t len,int af,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); -enum nss_status _nss_ldap_sethostent(int stayopen); -enum nss_status _nss_ldap_gethostent_r(struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); -enum nss_status _nss_ldap_endhostent(void); - -/* netgroup - list of host and users */ -/* DISABLED FOR NOW -enum nss_status _nss_ldap_setnetgrent(const char *group,struct __netgrent *result); -enum nss_status _nss_ldap_getnetgrent_r(struct __netgrent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endnetgrent(struct __netgrent *result); -*/ - -/* networks - network names and numbers */ -enum nss_status _nss_ldap_getnetbyname_r(const char *name,struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); -enum nss_status _nss_ldap_getnetbyaddr_r(uint32_t addr,int type,struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); -enum nss_status _nss_ldap_setnetent(int stayopen); -enum nss_status _nss_ldap_getnetent_r(struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); -enum nss_status _nss_ldap_endnetent(void); - -/* passwd - user database and passwords */ -enum nss_status _nss_ldap_getpwnam_r(const char *name,struct passwd *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getpwuid_r(uid_t uid,struct passwd *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setpwent(int stayopen); -enum nss_status _nss_ldap_getpwent_r(struct passwd *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endpwent(void); - -/* protocols - network protocols */ -enum nss_status _nss_ldap_getprotobyname_r(const char *name,struct protoent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getprotobynumber_r(int number,struct protoent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setprotoent(int stayopen); -enum nss_status _nss_ldap_getprotoent_r(struct protoent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endprotoent(void); - -/* rpc - remote procedure call names and numbers */ -enum nss_status _nss_ldap_getrpcbyname_r(const char *name,struct rpcent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getrpcbynumber_r(int number,struct rpcent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setrpcent(int stayopen); -enum nss_status _nss_ldap_getrpcent_r(struct rpcent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endrpcent(void); - -/* services - network services */ -enum nss_status _nss_ldap_getservbyname_r(const char *name,const char *protocol,struct servent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_getservbyport_r(int port,const char *protocol,struct servent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setservent(int stayopen); -enum nss_status _nss_ldap_getservent_r(struct servent *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endservent(void); - -/* shadow - extended user information */ -enum nss_status _nss_ldap_getspnam_r(const char *name,struct spwd *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_setspent(int stayopen); -enum nss_status _nss_ldap_getspent_r(struct spwd *result,char *buffer,size_t buflen,int *errnop); -enum nss_status _nss_ldap_endspent(void); - -#endif /* not NSS_EXPORTS */ diff --git a/nss/group.c b/nss/group.c index 01e4913..b25ae81 100644 --- a/nss/group.c +++ b/nss/group.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" diff --git a/nss/hosts.c b/nss/hosts.c index d0b2c86..062763f 100644 --- a/nss/hosts.c +++ b/nss/hosts.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" diff --git a/nss/passwd.c b/nss/passwd.c index c3db753..4862ad5 100644 --- a/nss/passwd.c +++ b/nss/passwd.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" diff --git a/nss/prototypes.h b/nss/prototypes.h new file mode 100644 index 0000000..4ac5eba --- /dev/null +++ b/nss/prototypes.h @@ -0,0 +1,136 @@ +/* + prototypes.h - all functions exported by the NSS library + + Copyright (C) 2006 West Consulting + Copyright (C) 2006 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA +*/ + +#ifndef _NSS_EXPORTS_H +#define _NSS_EXPORTS_H 1 + +#include +#include +#include +#include +#include +#include +#include +#include + +/* We define struct etherent here because it does not seem to + be defined in any publicly available header file exposed + by glibc. This is taken from include/netinet/ether.h + of the glibc source. */ +struct etherent +{ + const char *e_name; + struct ether_addr e_addr; +}; + +/* + These are prototypes for functions exported from the ldap NSS module. + For more complete definitions of these functions check the GLIBC + documentation. + + Other services than those mentioned here are currently not implemented. +*/ + +/* aliases - mail aliases */ +enum nss_status _nss_ldap_getaliasbyname_r(const char *name,struct aliasent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setaliasent(void); +enum nss_status _nss_ldap_getaliasent_r(struct aliasent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endaliasent(void); + +/* automount - automounter maps */ +enum nss_status _nss_ldap_getautomntbyname_r(void *private,const char *key,const char **canon_key,const char **value,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setautomntent(const char *mapname,void **private); +enum nss_status _nss_ldap_getautomntent_r(void *private,const char **key,const char **value,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endautomntent(void **private); + +/* ethers - ethernet numbers */ +enum nss_status _nss_ldap_gethostton_r(const char *name,struct etherent *resut,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getntohost_r(const struct ether_addr *addr,struct etherent *eth,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setetherent(int stayopen); +enum nss_status _nss_ldap_getetherent_r(struct etherent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endetherent(void); + +/* group - groups of users */ +enum nss_status _nss_ldap_getgrnam_r(const char *name,struct group *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getgrgid_r(gid_t gid,struct group *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_initgroups_dyn(const char *user,gid_t group,long int *start,long int *size,gid_t **groupsp,long int limit,int *errnop); +enum nss_status _nss_ldap_setgrent(int stayopen); +enum nss_status _nss_ldap_getgrent_r(struct group *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endgrent(void); + +/* hosts - host names and numbers */ +enum nss_status _nss_ldap_gethostbyname_r(const char *name,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); +enum nss_status _nss_ldap_gethostbyname2_r(const char *name,int af,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); +enum nss_status _nss_ldap_gethostbyaddr_r(const void *addr,socklen_t len,int af,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); +enum nss_status _nss_ldap_sethostent(int stayopen); +enum nss_status _nss_ldap_gethostent_r(struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop); +enum nss_status _nss_ldap_endhostent(void); + +/* netgroup - list of host and users */ +/* DISABLED FOR NOW +enum nss_status _nss_ldap_setnetgrent(const char *group,struct __netgrent *result); +enum nss_status _nss_ldap_getnetgrent_r(struct __netgrent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endnetgrent(struct __netgrent *result); +*/ + +/* networks - network names and numbers */ +enum nss_status _nss_ldap_getnetbyname_r(const char *name,struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); +enum nss_status _nss_ldap_getnetbyaddr_r(uint32_t addr,int type,struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); +enum nss_status _nss_ldap_setnetent(int stayopen); +enum nss_status _nss_ldap_getnetent_r(struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop); +enum nss_status _nss_ldap_endnetent(void); + +/* passwd - user database and passwords */ +enum nss_status _nss_ldap_getpwnam_r(const char *name,struct passwd *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getpwuid_r(uid_t uid,struct passwd *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setpwent(int stayopen); +enum nss_status _nss_ldap_getpwent_r(struct passwd *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endpwent(void); + +/* protocols - network protocols */ +enum nss_status _nss_ldap_getprotobyname_r(const char *name,struct protoent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getprotobynumber_r(int number,struct protoent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setprotoent(int stayopen); +enum nss_status _nss_ldap_getprotoent_r(struct protoent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endprotoent(void); + +/* rpc - remote procedure call names and numbers */ +enum nss_status _nss_ldap_getrpcbyname_r(const char *name,struct rpcent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getrpcbynumber_r(int number,struct rpcent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setrpcent(int stayopen); +enum nss_status _nss_ldap_getrpcent_r(struct rpcent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endrpcent(void); + +/* services - network services */ +enum nss_status _nss_ldap_getservbyname_r(const char *name,const char *protocol,struct servent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_getservbyport_r(int port,const char *protocol,struct servent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setservent(int stayopen); +enum nss_status _nss_ldap_getservent_r(struct servent *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endservent(void); + +/* shadow - extended user information */ +enum nss_status _nss_ldap_getspnam_r(const char *name,struct spwd *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_setspent(int stayopen); +enum nss_status _nss_ldap_getspent_r(struct spwd *result,char *buffer,size_t buflen,int *errnop); +enum nss_status _nss_ldap_endspent(void); + +#endif /* not NSS_EXPORTS */ diff --git a/nss/shadow.c b/nss/shadow.c index 70bdaff..62f55b3 100644 --- a/nss/shadow.c +++ b/nss/shadow.c @@ -26,7 +26,7 @@ #include #include -#include "exports.h" +#include "prototypes.h" #include "nslcd-client.h" #include "common.h" -- cgit v1.2.3