diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/netinet/ether.h | 9 | ||||
-rw-r--r-- | include/rpc/auth.h | 14 | ||||
-rw-r--r-- | include/rpc/auth_des.h | 17 |
3 files changed, 39 insertions, 1 deletions
diff --git a/include/netinet/ether.h b/include/netinet/ether.h index c0b1e2beee..fc3460df8e 100644 --- a/include/netinet/ether.h +++ b/include/netinet/ether.h @@ -1,7 +1,14 @@ #ifndef _NETINET_ETHER_H #include <inet/netinet/ether.h> -struct etherent; +/* Because the `ethers' lookup does not fit so well in the scheme we + define a dummy struct here which helps us to use the available + functions. */ +struct etherent +{ + const char *e_name; + struct ether_addr e_addr; +}; #define DECLARE_NSS_PROTOTYPES(service) \ extern enum nss_status _nss_ ## service ## _setetherent (void); \ diff --git a/include/rpc/auth.h b/include/rpc/auth.h index 5721091a56..40e95011d6 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -1 +1,15 @@ +#ifndef _RPC_AUTH_H #include <sunrpc/rpc/auth.h> + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ##service ## _netname2user \ + (char netname[MAXNETNAMELEN + 1], uid_t *uidp, \ + gid_t *gidp, int *gidlenp, gid_t *gidlist, \ + int *errnop); + +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + +#endif diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h index 02736aa03b..fa3622728b 100644 --- a/include/rpc/auth_des.h +++ b/include/rpc/auth_des.h @@ -1 +1,18 @@ +#ifndef _RPC_AUTH_DES_H + #include <sunrpc/rpc/auth_des.h> + +#define DECLARE_NSS_PROTOTYPES(service) \ +extern enum nss_status _nss_ ## service ## _getpublickey \ + (const char *netname, char *pkey, int *errnop); \ +extern enum nss_status _nss_ ## service ## _getsecretkey \ + (const char *netname, char *skey, char *passwd, \ + int *errnop); + +DECLARE_NSS_PROTOTYPES (files) +DECLARE_NSS_PROTOTYPES (nis) +DECLARE_NSS_PROTOTYPES (nisplus) + +#undef DECLARE_NSS_PROTOTYPES + +#endif |