diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-01-17 23:16:09 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-01-17 23:16:09 +0100 |
commit | 9a2c3e7624985e6110634e07d6b216e96b209adb (patch) | |
tree | 3b0edaa59e8b5fbf5eca0912262451f1669fa375 /nss/aliases.c | |
parent | 3ac313144f880db85fdbb6a271451f2f693aab44 (diff) |
ensure that all NSS functions can be generated by the marcos in common.h and spell out the read_..() function for every type
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@227 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/aliases.c')
-rw-r--r-- | nss/aliases.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nss/aliases.c b/nss/aliases.c index 10b562b..3d1a48f 100644 --- a/nss/aliases.c +++ b/nss/aliases.c @@ -2,7 +2,7 @@ aliases.c - NSS lookup functions for aliases database Copyright (C) 2006 West Consulting - Copyright (C) 2006 Arthur de Jong + Copyright (C) 2006, 2007 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -29,12 +29,6 @@ #include "prototypes.h" #include "common.h" -/* macros for expanding the NSLCD_ALIAS macro */ -#define NSLCD_STRING(field) READ_STRING_BUF(fp,field) -#define NSLCD_STRINGLIST(field) READ_STRINGLIST_NUM(fp,field,result->alias_members_len) -#define ALIAS_NAME result->alias_name -#define ALIAS_RCPTS result->alias_members - static enum nss_status read_aliasent( FILE *fp,struct aliasent *result, char *buffer,size_t buflen,int *errnop) @@ -42,7 +36,8 @@ static enum nss_status read_aliasent( int32_t tmpint32,tmp2int32; size_t bufptr=0; /* auto-genereted read code */ - NSLCD_ALIAS; + READ_STRING_BUF(fp,result->alias_name); + READ_STRINGLIST_NUM(fp,result->alias_members,result->alias_members_len); /* fill in remaining gaps in struct */ result->alias_local=0; /* we're done */ @@ -53,7 +48,9 @@ enum nss_status _nss_ldap_getaliasbyname_r( const char *name,struct aliasent *result, char *buffer,size_t buflen,int *errnop) { - NSS_BYNAME(NSLCD_ACTION_ALIAS_BYNAME,name,read_aliasent); + NSS_BYNAME(NSLCD_ACTION_ALIAS_BYNAME, + name, + read_aliasent(fp,result,buffer,buflen,errnop)); } /* thread-local file pointer to an ongoing request */ @@ -66,7 +63,8 @@ enum nss_status _nss_ldap_setaliasent(void) enum nss_status _nss_ldap_getaliasent_r(struct aliasent *result,char *buffer,size_t buflen,int *errnop) { - NSS_GETENT(aliasentfp,read_aliasent); + NSS_GETENT(aliasentfp, + read_aliasent(aliasentfp,result,buffer,buflen,errnop)); } enum nss_status _nss_ldap_endaliasent(void) |