diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-13 21:36:15 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-12-13 21:36:15 +0000 |
commit | 669d8ae73e5a56aafa422e76e4179e22c29a99df (patch) | |
tree | d624fe3c5296ad812bf2f29309514e288e99963e /nss | |
parent | 85eefd6f9e2f384f7df2d5c503eb3a75f15bb53f (diff) |
have a more consistent naming convention for static lookup functions
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1331 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss')
-rw-r--r-- | nss/ethers.c | 14 | ||||
-rw-r--r-- | nss/group.c | 30 | ||||
-rw-r--r-- | nss/hosts.c | 26 | ||||
-rw-r--r-- | nss/netgroup.c | 26 | ||||
-rw-r--r-- | nss/networks.c | 26 | ||||
-rw-r--r-- | nss/passwd.c | 26 | ||||
-rw-r--r-- | nss/protocols.c | 26 | ||||
-rw-r--r-- | nss/rpc.c | 26 | ||||
-rw-r--r-- | nss/services.c | 26 | ||||
-rw-r--r-- | nss/shadow.c | 22 |
10 files changed, 124 insertions, 124 deletions
diff --git a/nss/ethers.c b/nss/ethers.c index 35bb4ff..2f386d6 100644 --- a/nss/ethers.c +++ b/nss/ethers.c @@ -144,7 +144,7 @@ static nss_status_t read_etherstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ /* map a hostname to the corresponding ethernet address */ -static nss_status_t get_gethostton(nss_backend_t UNUSED(*be),void *args) +static nss_status_t ethers_gethostton(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_ETHER_BYNAME, NSS_ARGS(args)->key.name, @@ -152,7 +152,7 @@ static nss_status_t get_gethostton(nss_backend_t UNUSED(*be),void *args) } /* map an ethernet address to the corresponding hostname */ -static nss_status_t get_getntohost(nss_backend_t UNUSED(*be),void *args) +static nss_status_t ethers_getntohost(nss_backend_t UNUSED(*be),void *args) { struct ether_addr *addr=(struct ether_addr *)(NSS_ARGS(args)->key.ether); NSS_BYTYPE(NSLCD_ACTION_ETHER_BYETHER, @@ -160,20 +160,20 @@ static nss_status_t get_getntohost(nss_backend_t UNUSED(*be),void *args) READ_RESULT(fp)); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t ethers_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t ethers_ops[]={ - destructor, - get_gethostton, - get_getntohost + ethers_destructor, + ethers_gethostton, + ethers_getntohost }; nss_backend_t *_nss_ldap_ethers_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/group.c b/nss/group.c index 4dffa75..7427e2d 100644 --- a/nss/group.c +++ b/nss/group.c @@ -233,14 +233,14 @@ static nss_status_t read_groupstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getgrnam_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t group_getgrnam(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_GROUP_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT(fp)); } -static nss_status_t get_getgrgid_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t group_getgrgid(nss_backend_t UNUSED(*be),void *args) { NSS_BYTYPE(NSLCD_ACTION_GROUP_BYGID, NSS_ARGS(args)->key.gid,gid_t, @@ -250,18 +250,18 @@ static nss_status_t get_getgrgid_r(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *grentfp; -static nss_status_t get_setgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t group_setgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(grentfp); } -static nss_status_t get_getgrent_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t group_getgrent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(grentfp,NSLCD_ACTION_GROUP_ALL, READ_RESULT(grentfp)); } -static nss_status_t get_endgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t group_endgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(grentfp); } @@ -271,7 +271,7 @@ static nss_status_t get_initgroups_dyn( const char *user,gid_t skipgroup,long int *start, gid_t **groupsp,long int limit,int *errnop) */ -static nss_status_t get_getgroupsbymember_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t group_getgroupsbymember(nss_backend_t UNUSED(*be),void *args) { struct nss_groupsbymem *argp=(struct nss_groupsbymem *)args; long int start=(long int)argp->numgids; @@ -282,24 +282,24 @@ static nss_status_t get_getgroupsbymember_r(nss_backend_t UNUSED(*be),void *args argp->numgids=(int)start;); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t group_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t group_ops[]={ - destructor, - get_endgrent, - get_setgrent, - get_getgrent_r, - get_getgrnam_r, - get_getgrgid_r, - get_getgroupsbymember_r + group_destructor, + group_endgrent, + group_setgrent, + group_getgrent, + group_getgrnam, + group_getgrgid, + group_getgroupsbymember }; nss_backend_t *_nss_ldap_group_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/hosts.c b/nss/hosts.c index fe83b1d..019e2b5 100644 --- a/nss/hosts.c +++ b/nss/hosts.c @@ -327,14 +327,14 @@ static nss_status_t read_hoststring(TFILE *fp,nss_XbyY_args_t *args,int erronemp /* hack to set the correct errno and h_errno */ #define h_errnop &(NSS_ARGS(args)->h_errno) -static nss_status_t get_gethostbyname(nss_backend_t UNUSED(*be),void *args) +static nss_status_t hosts_gethostbyname(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_HOST_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT_ERRONEMPTY(fp)); } -static nss_status_t get_gethostbyaddr(nss_backend_t UNUSED(*be),void *args) +static nss_status_t hosts_gethostbyaddr(nss_backend_t UNUSED(*be),void *args) { NSS_BYGEN(NSLCD_ACTION_HOST_BYADDR, WRITE_ADDRESS(fp,NSS_ARGS(args)->key.hostaddr.type,NSS_ARGS(args)->key.hostaddr.len,NSS_ARGS(args)->key.hostaddr.addr), @@ -344,39 +344,39 @@ static nss_status_t get_gethostbyaddr(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *hostentfp; -static nss_status_t get_sethostent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t hosts_sethostent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(hostentfp); } -static nss_status_t get_gethostent(nss_backend_t UNUSED(*be),void *args) +static nss_status_t hosts_gethostent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(hostentfp,NSLCD_ACTION_HOST_ALL, READ_RESULT_NEXTONEMPTY(hostentfp)); } -static nss_status_t get_endhostent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t hosts_endhostent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(hostentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t hosts_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t host_ops[]={ - destructor, - get_endhostent, - get_sethostent, - get_gethostent, - get_gethostbyname, - get_gethostbyaddr + hosts_destructor, + hosts_endhostent, + hosts_sethostent, + hosts_gethostent, + hosts_gethostbyname, + hosts_gethostbyaddr }; nss_backend_t *_nss_ldap_hosts_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/netgroup.c b/nss/netgroup.c index 1531cc4..d2a8dd4 100644 --- a/nss/netgroup.c +++ b/nss/netgroup.c @@ -152,7 +152,7 @@ struct nss_ldap_netgr_backend }; typedef struct nss_ldap_netgr_backend nss_ldap_netgr_backend_t; -static nss_status_t _xnss_ldap_setnetgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t netgroup_setnetgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { return NSS_STATUS_SUCCESS; } @@ -200,7 +200,7 @@ static nss_status_t _nss_nslcd_getnetgrent_r(struct __netgrent *result,char *buf read_netgrent(netgrentfp,result,buffer,buflen,errnop)); } -static nss_status_t _xnss_ldap_getnetgrent_r(nss_backend_t *_be,void *_args) +static nss_status_t netgroup_getnetgrent(nss_backend_t *_be,void *_args) { nss_ldap_netgr_backend_t *ngbe=(nss_ldap_netgr_backend_t *)_be; struct nss_getnetgrent_args *args=(struct nss_getnetgrent_args *)_args; @@ -271,12 +271,12 @@ static nss_status_t _xnss_ldap_getnetgrent_r(nss_backend_t *_be,void *_args) return status; } -static nss_status_t _xnss_ldap_endnetgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t netgroup_endnetgrent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(netgrentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t netgroup_destructor(nss_backend_t *be,void UNUSED(*args)) { nss_ldap_netgr_backend_t *ngbe=(nss_ldap_netgr_backend_t *)be; /* free list of nested netgroups */ @@ -286,18 +286,18 @@ static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) return NSS_STATUS_SUCCESS; } -static nss_status_t _xnss_ldap_netgr_set(nss_backend_t *be,void *_args); +static nss_status_t netgroup_set(nss_backend_t *be,void *_args); static nss_backend_op_t netgroup_ops[]={ - destructor, /* NSS_DBOP_DESTRUCTOR */ - _xnss_ldap_endnetgrent, /* NSS_DBOP_ENDENT */ - _xnss_ldap_setnetgrent, /* NSS_DBOP_SETNET */ - _xnss_ldap_getnetgrent_r, /* NSS_DBOP_GETENT */ - NULL,/* TODO:_nss_ldap_netgr_in,*/ /* NSS_DBOP_NETGROUP_IN */ - _xnss_ldap_netgr_set /* NSS_DBOP_NETGROUP_SET */ + netgroup_destructor, + netgroup_endnetgrent, + netgroup_setnetgrent, + netgroup_getnetgrent, + NULL,/* TODO:_nss_ldap_netgr_in,*/ + netgroup_set }; -static nss_status_t _xnss_ldap_netgr_set(nss_backend_t *be,void *_args) +static nss_status_t netgroup_set(nss_backend_t *be,void *_args) { nss_status_t stat; struct nss_setnetgrent_args *args; @@ -326,7 +326,7 @@ static nss_status_t _xnss_ldap_netgr_set(nss_backend_t *be,void *_args) } nss_backend_t *_nss_ldap_netgroup_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_ldap_netgr_backend_t *be; if (!(be=(nss_ldap_netgr_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/networks.c b/nss/networks.c index 114a21b..98b737b 100644 --- a/nss/networks.c +++ b/nss/networks.c @@ -216,14 +216,14 @@ static nss_status_t read_netentstring(TFILE *fp,nss_XbyY_args_t *args) /* more of a dirty hack */ #define h_errnop (&(NSS_ARGS(args)->h_errno)) -static nss_status_t _xnss_ldap_getnetbyname_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t networks_getnetbyname(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_NETWORK_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT(fp)); } -static nss_status_t _xnss_ldap_getnetbyaddr_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t networks_getnetbyaddr(nss_backend_t UNUSED(*be),void *args) { NSS_BYGEN(NSLCD_ACTION_NETWORK_BYADDR, WRITE_ADDRESS(fp,NSS_ARGS(args)->key.netaddr.net), @@ -233,39 +233,39 @@ static nss_status_t _xnss_ldap_getnetbyaddr_r(nss_backend_t UNUSED(*be),void *ar /* thread-local file pointer to an ongoing request */ static __thread TFILE *netentfp; -static nss_status_t _xnss_ldap_setnetent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t networks_setnetent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(netentfp); } -static nss_status_t _xnss_ldap_getnetent_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t networks_getnetent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(netentfp,NSLCD_ACTION_NETWORK_ALL, READ_RESULT(netentfp)); } -static nss_status_t _xnss_ldap_endnetent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t networks_endnetent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(netentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t networks_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t net_ops[]={ - destructor, - _xnss_ldap_endnetent, - _xnss_ldap_setnetent, - _xnss_ldap_getnetent_r, - _xnss_ldap_getnetbyname_r, - _xnss_ldap_getnetbyaddr_r + networks_destructor, + networks_endnetent, + networks_setnetent, + networks_getnetent, + networks_getnetbyname, + networks_getnetbyaddr }; nss_backend_t *_nss_ldap_networks_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/passwd.c b/nss/passwd.c index 80f7159..28022b1 100644 --- a/nss/passwd.c +++ b/nss/passwd.c @@ -141,14 +141,14 @@ static nss_status_t read_passwdstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getpwnam(nss_backend_t UNUSED(*be),void *args) +static nss_status_t passwd_getpwnam(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_PASSWD_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT(fp)); } -static nss_status_t get_getpwuid(nss_backend_t UNUSED(*be),void *args) +static nss_status_t passwd_getpwuid(nss_backend_t UNUSED(*be),void *args) { NSS_BYTYPE(NSLCD_ACTION_PASSWD_BYUID, NSS_ARGS(args)->key.uid,uid_t, @@ -159,41 +159,41 @@ static nss_status_t get_getpwuid(nss_backend_t UNUSED(*be),void *args) static __thread TFILE *pwentfp; /* open a connection to the nslcd and write the request */ -static nss_status_t get_setpwent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t passwd_setpwent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(pwentfp); } /* read password data from an opened stream */ -static nss_status_t get_getpwent(nss_backend_t UNUSED(*be),void *args) +static nss_status_t passwd_getpwent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(pwentfp,NSLCD_ACTION_PASSWD_ALL, READ_RESULT(pwentfp)); } /* close the stream opened with setpwent() above */ -static nss_status_t get_endpwent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t passwd_endpwent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(pwentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t passwd_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t passwd_ops[]={ - destructor, - get_endpwent, /* NSS_DBOP_ENDENT */ - get_setpwent, /* NSS_DBOP_SETENT */ - get_getpwent, /* NSS_DBOP_GETENT */ - get_getpwnam, /* NSS_DBOP_PASSWD_BYNAME */ - get_getpwuid /* NSS_DBOP_PASSWD_BYUID */ + passwd_destructor, + passwd_endpwent, + passwd_setpwent, + passwd_getpwent, + passwd_getpwnam, + passwd_getpwuid }; nss_backend_t *_nss_ldap_passwd_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/protocols.c b/nss/protocols.c index 93e230e..5d61576 100644 --- a/nss/protocols.c +++ b/nss/protocols.c @@ -142,14 +142,14 @@ static nss_status_t read_protostring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getprotobyname(nss_backend_t UNUSED(*be),void *args) +static nss_status_t protocols_getprotobyname(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_PROTOCOL_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT(fp)); } -static nss_status_t get_getprotobynumber(nss_backend_t UNUSED(*be),void *args) +static nss_status_t protocols_getprotobynumber(nss_backend_t UNUSED(*be),void *args) { NSS_BYINT32(NSLCD_ACTION_PROTOCOL_BYNUMBER, NSS_ARGS(args)->key.number, @@ -159,39 +159,39 @@ static nss_status_t get_getprotobynumber(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *protoentfp; -static nss_status_t get_setprotoent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t protocols_setprotoent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(protoentfp); } -static nss_status_t get_getprotoent(nss_backend_t UNUSED(*be),void *args) +static nss_status_t protocols_getprotoent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(protoentfp,NSLCD_ACTION_PROTOCOL_ALL, READ_RESULT(protoentfp)); } -static nss_status_t get_endprotoent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t protocols_endprotoent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(protoentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t protocols_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t proto_ops[]={ - destructor, - get_endprotoent, - get_setprotoent, - get_getprotoent, - get_getprotobyname, - get_getprotobynumber + protocols_destructor, + protocols_endprotoent, + protocols_setprotoent, + protocols_getprotoent, + protocols_getprotobyname, + protocols_getprotobynumber }; nss_backend_t *_nss_ldap_protocols_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; be=(nss_backend_t *)malloc(sizeof(*be)); @@ -142,14 +142,14 @@ static nss_status_t read_rpcstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getrpcbyname_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t rpc_getrpcbyname(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_RPC_BYNAME, NSS_ARGS(args)->key.name, READ_RESULT(fp)); } -static nss_status_t get_getrpcbynumber_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t rpc_getrpcbynumber(nss_backend_t UNUSED(*be),void *args) { NSS_BYINT32(NSLCD_ACTION_RPC_BYNUMBER, NSS_ARGS(args)->key.number, @@ -159,39 +159,39 @@ static nss_status_t get_getrpcbynumber_r(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *rpcentfp; -static nss_status_t get_setrpcent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t rpc_setrpcent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(rpcentfp); } -static nss_status_t get_getrpcent_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t rpc_getrpcent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(rpcentfp,NSLCD_ACTION_RPC_ALL, READ_RESULT(rpcentfp)); } -static nss_status_t get_endrpcent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t rpc_endrpcent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(rpcentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t rpc_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t rpc_ops[]={ - destructor, - get_endrpcent, - get_setrpcent, - get_getrpcent_r, - get_getrpcbyname_r, - get_getrpcbynumber_r + rpc_destructor, + rpc_endrpcent, + rpc_setrpcent, + rpc_getrpcent, + rpc_getrpcbyname, + rpc_getrpcbynumber }; nss_backend_t *_nss_ldap_rpc_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/services.c b/nss/services.c index 24b7491..4583ba7 100644 --- a/nss/services.c +++ b/nss/services.c @@ -146,7 +146,7 @@ static nss_status_t read_servstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getservbyname_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t services_getservbyname(nss_backend_t UNUSED(*be),void *args) { NSS_BYGEN(NSLCD_ACTION_SERVICE_BYNAME, WRITE_STRING(fp,NSS_ARGS(args)->key.serv.serv.name); @@ -154,7 +154,7 @@ static nss_status_t get_getservbyname_r(nss_backend_t UNUSED(*be),void *args) READ_RESULT(fp)); } -static nss_status_t get_getservbyport_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t services_getservbyport(nss_backend_t UNUSED(*be),void *args) { NSS_BYGEN(NSLCD_ACTION_SERVICE_BYNUMBER, WRITE_INT32(fp,ntohs(NSS_ARGS(args)->key.serv.serv.port)); @@ -165,39 +165,39 @@ static nss_status_t get_getservbyport_r(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *serventfp; -static nss_status_t get_setservent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t services_setservent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(serventfp); } -static nss_status_t get_getservent_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t services_getservent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(serventfp,NSLCD_ACTION_SERVICE_ALL, READ_RESULT(serventfp)); } -static nss_status_t get_endservent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t services_endservent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(serventfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t services_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t services_ops[]={ - destructor, - get_endservent, - get_setservent, - get_getservent_r, - get_getservbyname_r, - get_getservbyport_r + services_destructor, + services_endservent, + services_setservent, + services_getservent, + services_getservbyname, + services_getservbyport }; nss_backend_t *_nss_ldap_services_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) diff --git a/nss/shadow.c b/nss/shadow.c index 130ba5a..9bd84fc 100644 --- a/nss/shadow.c +++ b/nss/shadow.c @@ -167,7 +167,7 @@ static nss_status_t read_spwdstring(TFILE *fp,nss_XbyY_args_t *args) #endif /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */ -static nss_status_t get_getspnam_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t shadow_getspnam(nss_backend_t UNUSED(*be),void *args) { NSS_BYNAME(NSLCD_ACTION_SHADOW_BYNAME, NSS_ARGS(args)->key.name, @@ -177,38 +177,38 @@ static nss_status_t get_getspnam_r(nss_backend_t UNUSED(*be),void *args) /* thread-local file pointer to an ongoing request */ static __thread TFILE *spentfp; -static nss_status_t get_setspent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t shadow_setspent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(spentfp); } -static nss_status_t get_getspent_r(nss_backend_t UNUSED(*be),void *args) +static nss_status_t shadow_getspent(nss_backend_t UNUSED(*be),void *args) { NSS_GETENT(spentfp,NSLCD_ACTION_SHADOW_ALL, READ_RESULT(spentfp)); } -static nss_status_t get_endspent(nss_backend_t UNUSED(*be),void UNUSED(*args)) +static nss_status_t shadow_endspent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_ENDENT(spentfp); } -static nss_status_t destructor(nss_backend_t *be,void UNUSED(*args)) +static nss_status_t shadow_destructor(nss_backend_t *be,void UNUSED(*args)) { free(be); return NSS_STATUS_SUCCESS; } static nss_backend_op_t shadow_ops[]={ - destructor, - get_endspent, /* NSS_DBOP_ENDENT */ - get_setspent, /* NSS_DBOP_SETENT */ - get_getspent_r, /* NSS_DBOP_GETENT */ - get_getspnam_r /* NSS_DBOP_SHADOW_BYNAME */ + shadow_destructor, + shadow_endspent, + shadow_setspent, + shadow_getspent, + shadow_getspnam }; nss_backend_t *_nss_ldap_shadow_constr(const char UNUSED(*db_name), - const char UNUSED(*src_name),const char UNUSED(*cfg_args)) + const char UNUSED(*src_name),const char UNUSED(*cfg_args)) { nss_backend_t *be; if (!(be=(nss_backend_t *)malloc(sizeof(*be)))) |