diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-08-07 12:33:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-01-15 15:25:32 +0100 |
commit | 2ee4b118fa72d1dd119dc7b8915307ed86df5b14 (patch) | |
tree | 9d1163068b08c66854c531fbedaf4097374dcedd /src/basic/nss-util.h | |
parent | Merge pull request #14579 from keszybz/docs-index (diff) | |
download | systemd-2ee4b118fa72d1dd119dc7b8915307ed86df5b14.tar.xz systemd-2ee4b118fa72d1dd119dc7b8915307ed86df5b14.zip |
nss-util: add macros for generating getpwent()/getgrent() prototypes
We have similar macros already for getpwuid()/getpwnam(), let's add more
of this.
Diffstat (limited to '')
-rw-r--r-- | src/basic/nss-util.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/basic/nss-util.h b/src/basic/nss-util.h index 2045175d1c..29cf22676a 100644 --- a/src/basic/nss-util.h +++ b/src/basic/nss-util.h @@ -139,6 +139,38 @@ enum nss_status _nss_##module##_getgrgid_r( \ char *buffer, size_t buflen, \ int *errnop) _public_ +#define NSS_PWENT_PROTOTYPES(module) \ +enum nss_status _nss_##module##_endpwent( \ + void) _public_; \ +enum nss_status _nss_##module##_setpwent( \ + int stayopen) _public_; \ +enum nss_status _nss_##module##_getpwent_r( \ + struct passwd *result, \ + char *buffer, \ + size_t buflen, \ + int *errnop) _public_; + +#define NSS_GRENT_PROTOTYPES(module) \ +enum nss_status _nss_##module##_endgrent( \ + void) _public_; \ +enum nss_status _nss_##module##_setgrent( \ + int stayopen) _public_; \ +enum nss_status _nss_##module##_getgrent_r( \ + struct group *result, \ + char *buffer, \ + size_t buflen, \ + int *errnop) _public_; + +#define NSS_INITGROUPS_PROTOTYPE(module) \ +enum nss_status _nss_##module##_initgroups_dyn( \ + const char *user, \ + gid_t group, \ + long int *start, \ + long int *size, \ + gid_t **groupsp, \ + long int limit, \ + int *errnop) _public_; + typedef enum nss_status (*_nss_gethostbyname4_r_t)( const char *name, struct gaih_addrtuple **pat, |