diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2008-02-01 19:59:28 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2008-02-01 19:59:28 +0000 |
commit | ca917ca5e75335ea476120b57305b3d3395064d6 (patch) | |
tree | aa7f9991ebd8bc6a0dd038408cfaa4b0b23e0daa | |
parent | ee574758629ca78ccb4589763be2b10ab032fd18 (diff) |
remove the nslcd2nss() function because it's not needed with the current protocol
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@597 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nss/common.c | 12 | ||||
-rw-r--r-- | nss/common.h | 6 | ||||
-rw-r--r-- | nss/group.c | 2 | ||||
-rw-r--r-- | nss/hosts.c | 2 | ||||
-rw-r--r-- | nss/netgroup.c | 2 | ||||
-rw-r--r-- | nss/networks.c | 2 |
6 files changed, 5 insertions, 21 deletions
diff --git a/nss/common.c b/nss/common.c index 2ee3941..00aebf2 100644 --- a/nss/common.c +++ b/nss/common.c @@ -39,18 +39,6 @@ #include "common.h" #include "common/tio.h" -/* translates a nsklcd return code (as defined in nslcd.h) to - a nss code (as defined in nss.h) */ -enum nss_status nslcd2nss(int32_t code) -{ - switch (code) - { - case NSLCD_RESULT_END: return NSS_STATUS_NOTFOUND; - case NSLCD_RESULT_SUCCESS: return NSS_STATUS_SUCCESS; - default: return NSS_STATUS_UNAVAIL; - } -} - /* returns a socket to the server or NULL on error (see errno), socket should be closed with fclose() */ TFILE *nslcd_client_open() diff --git a/nss/common.h b/nss/common.h index 5159c81..8287a87 100644 --- a/nss/common.h +++ b/nss/common.h @@ -31,10 +31,6 @@ #include "compat/attrs.h" #include "common/tio.h" -/* This function maps an nslcd return code (as defined in nslcd.h) - to an nss code (as defined in nss.h). */ -enum nss_status nslcd2nss(int32_t code); - /* returns a socket to the server or NULL on error (see errno), socket should be closed with tio_close() */ TFILE *nslcd_client_open(void) @@ -108,7 +104,7 @@ TFILE *nslcd_client_open(void) (void)tio_close(fp); \ fp=NULL; \ *errnop=ENOENT; \ - return nslcd2nss(retv); + return NSS_STATUS_NOTFOUND; /* The following macros to automatically generate get..byname(), get..bynumber(), setent(), getent() and endent() function diff --git a/nss/group.c b/nss/group.c index abb16e5..3ab875d 100644 --- a/nss/group.c +++ b/nss/group.c @@ -76,7 +76,7 @@ static enum nss_status read_gids( READ_TYPE(fp,res,int32_t); } /* return the proper status code */ - return (res==(int32_t)NSLCD_RESULT_END)?NSS_STATUS_SUCCESS:nslcd2nss(res); + return (res==(int32_t)NSLCD_RESULT_END)?NSS_STATUS_SUCCESS:NSS_STATUS_NOTFOUND; } enum nss_status _nss_ldap_getgrnam_r(const char *name,struct group *result,char *buffer,size_t buflen,int *errnop) diff --git a/nss/hosts.c b/nss/hosts.c index fc8c508..bfff918 100644 --- a/nss/hosts.c +++ b/nss/hosts.c @@ -64,7 +64,7 @@ fp=NULL; \ *errnop=ENOENT; \ *h_errnop=HOST_NOT_FOUND; \ - return nslcd2nss(retv); + return NSS_STATUS_NOTFOUND; /* read a single host entry from the stream, filtering on the specified address family, result is stored in result diff --git a/nss/netgroup.c b/nss/netgroup.c index 9d81784..fe824f5 100644 --- a/nss/netgroup.c +++ b/nss/netgroup.c @@ -40,7 +40,7 @@ if (result->first) \ { \ *errnop=ENOENT; \ - return nslcd2nss(retv); \ + return NSS_STATUS_NOTFOUND; \ } \ else \ return NSS_STATUS_RETURN; diff --git a/nss/networks.c b/nss/networks.c index d052bc6..0cb0b2c 100644 --- a/nss/networks.c +++ b/nss/networks.c @@ -64,7 +64,7 @@ fp=NULL; \ *errnop=ENOENT; \ *h_errnop=HOST_NOT_FOUND; \ - return nslcd2nss(retv); + return NSS_STATUS_NOTFOUND; /* read a single network entry from the stream, ignoring entries that are not AF_INET (IPv4), result is stored in result */ |