Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2006-11-10 16:31:23 +0100
committerArthur de Jong <arthur@arthurdejong.org>2006-11-10 16:31:23 +0100
commit0828d65bf3e39c23a7fad25b2eda4a641b265907 (patch)
treec824e146d16d3622c52c655b97816c458bf0e9f2
parent50b0352f159d603065084a58be63b0d56a89dc0b (diff)
switch to using prototypes that are defined in glibc 2.3.6
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@81 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nss/exports.h28
-rw-r--r--nss/group.c2
-rw-r--r--nss/hosts.c4
-rw-r--r--nss/passwd.c2
-rw-r--r--nss/shadow.c2
5 files changed, 19 insertions, 19 deletions
diff --git a/nss/exports.h b/nss/exports.h
index d782dd5..a860da5 100644
--- a/nss/exports.h
+++ b/nss/exports.h
@@ -72,64 +72,64 @@ 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_setgrent(void);
+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);
-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);
/* 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 struct in_addr *addr,int len,int type,struct hostent *result,char *buffer,size_t buflen,int *errnop,int *h_errnop);
-enum nss_status _nss_ldap_sethostent(void);
+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(char *group,struct __netgrent *result);
+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(unsigned long addr,int type,struct netent *result,char *buffer,size_t buflen,int *errnop,int *herrnop);
-enum nss_status _nss_ldap_setnetent(void);
+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(void);
+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(void);
+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(void);
+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 *proto,struct servent *result,char *buffer,size_t buflen,int *errnop);
-enum nss_status _nss_ldap_getservbyport_r(int port,const char *proto,struct servent *result,char *buffer,size_t buflen,int *errnop);
-enum nss_status _nss_ldap_setservent(void);
+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(void);
+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);
diff --git a/nss/group.c b/nss/group.c
index 584b633..01e4913 100644
--- a/nss/group.c
+++ b/nss/group.c
@@ -140,7 +140,7 @@ enum nss_status _nss_ldap_initgroups_dyn(
static __thread FILE *grentfp;
#define fp grentfp
-enum nss_status _nss_ldap_setgrent(void)
+enum nss_status _nss_ldap_setgrent(int stayopen)
{
NSS_SETENT(NSLCD_ACTION_GROUP_ALL);
}
diff --git a/nss/hosts.c b/nss/hosts.c
index 8b9f660..d0b2c86 100644
--- a/nss/hosts.c
+++ b/nss/hosts.c
@@ -151,7 +151,7 @@ enum nss_status _nss_ldap_gethostbyname_r(
buffer,buflen - OUT - buffer to store allocated stuff on
errnop,h_errnop - OUT - for reporting errors */
enum nss_status _nss_ldap_gethostbyaddr_r(
- const struct in_addr *addr,int len,int af,struct hostent *result,
+ const void *addr,socklen_t len,int af,struct hostent *result,
char *buffer,size_t buflen,int *errnop,int *h_errnop)
{
FILE *fp;
@@ -182,7 +182,7 @@ enum nss_status _nss_ldap_gethostbyaddr_r(
static __thread FILE *hostentfp;
#define fp hostentfp
-enum nss_status _nss_ldap_sethostent(void)
+enum nss_status _nss_ldap_sethostent(int stayopen)
{
NSS_SETENT(NSLCD_ACTION_HOST_ALL);
}
diff --git a/nss/passwd.c b/nss/passwd.c
index 2ed200f..c3db753 100644
--- a/nss/passwd.c
+++ b/nss/passwd.c
@@ -86,7 +86,7 @@ static __thread FILE *pwentfp;
#define fp pwentfp
/* open a connection to the nslcd and write the request */
-enum nss_status _nss_ldap_setpwent(void)
+enum nss_status _nss_ldap_setpwent(int stayopen)
{
NSS_SETENT(NSLCD_ACTION_PASSWD_ALL);
}
diff --git a/nss/shadow.c b/nss/shadow.c
index aea6dbb..70bdaff 100644
--- a/nss/shadow.c
+++ b/nss/shadow.c
@@ -67,7 +67,7 @@ enum nss_status _nss_ldap_getspnam_r(const char *name,struct spwd *result,char *
static __thread FILE *spentfp;
#define fp spentfp
-enum nss_status _nss_ldap_setspent(void)
+enum nss_status _nss_ldap_setspent(int stayopen)
{
NSS_SETENT(NSLCD_ACTION_SHADOW_ALL);
}