diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/grp.h | 13 | ||||
-rw-r--r-- | src/include/nsss/grp.h | 19 | ||||
-rw-r--r-- | src/include/nsss/pwd.h | 13 | ||||
-rw-r--r-- | src/include/nsss/shadow.h | 19 | ||||
-rw-r--r-- | src/include/pwd.h | 7 | ||||
-rw-r--r-- | src/include/shadow.h | 13 |
6 files changed, 51 insertions, 33 deletions
diff --git a/src/include/grp.h b/src/include/grp.h index a30fe79..7c5b8f9 100644 --- a/src/include/grp.h +++ b/src/include/grp.h @@ -10,17 +10,4 @@ #include <nsss/grp.h> -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#include <sys/types.h> -extern int setgroups (size_t, gid_t const *) ; -extern int initgroups (char const *, gid_t) ; -#endif - -#ifdef _GNU_SOURCE -#include <stdio.h> -extern struct group *fgetgrent (FILE *) ; -extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ; -extern int putgrent (struct group const *, FILE *) ; -#endif - #endif diff --git a/src/include/nsss/grp.h b/src/include/nsss/grp.h index 0d56cbd..e26ae05 100644 --- a/src/include/nsss/grp.h +++ b/src/include/nsss/grp.h @@ -62,6 +62,25 @@ extern "C" { #endif #endif + /* + The following functions are not implemented by nsss. + However, the libc may implement them, so we still need to + declare them. Of course, we only declare functions that + do not conflict with nsss operation. + */ + +#if defined(_GNU_SOURCE) || defined(_DEFAULT_SOURCE) +#include <sys/types.h> +extern int setgroups (size_t, gid_t const *) ; +extern int initgroups (char const *, gid_t) ; +#endif + +#ifdef _GNU_SOURCE +#include <stdio.h> +extern struct group *fgetgrent (FILE *) ; +extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ; +extern int putgrent (struct group const *, FILE *) ; +#endif #ifdef __cplusplus } diff --git a/src/include/nsss/pwd.h b/src/include/nsss/pwd.h index 950a5ce..f3c7000 100644 --- a/src/include/nsss/pwd.h +++ b/src/include/nsss/pwd.h @@ -50,6 +50,19 @@ extern "C" { #endif #endif + /* + The following functions are not implemented by nsss. + However, the libc may implement them, so we still need to + declare them. Of course, we only declare functions that + do not conflict with nsss operation. + */ + +#ifdef _GNU_SOURCE +#include <stdio.h> +extern struct passwd *fgetpwent (FILE *) ; +extern int fgetpwent_r (FILE *, struct passwd *, char *, size_t, struct passwd **) ; +extern int putpwent (struct passwd const *, FILE *) ; +#endif #ifdef __cplusplus } diff --git a/src/include/nsss/shadow.h b/src/include/nsss/shadow.h index c3357fd..5665fc8 100644 --- a/src/include/nsss/shadow.h +++ b/src/include/nsss/shadow.h @@ -44,6 +44,25 @@ extern "C" { #endif #endif + /* + The following functions are not implemented by nsss. + However, the libc may implement them, so we still need to + declare them. Of course, we only declare functions that + do not conflict with nsss operation. + */ + +#include <stdio.h> + +extern struct spwd *fgetspent (FILE *) ; +extern struct spwd *sgetspent (char const *) ; +extern int putspent (struct spwd const *, FILE *) ; +extern int lckpwdf (void) ; +extern int ulckpwdf (void) ; + +#ifdef _DEFAULT_SOURCE +extern int fgetspent_r(FILE *, struct spwd *, char *, size_t, struct spwd **) ; +extern int sgetspent_r (char const *, struct spwd *, char *, size_t, struct spwd **) ; +#endif #ifdef __cplusplus } diff --git a/src/include/pwd.h b/src/include/pwd.h index 6ad4faf..22aa835 100644 --- a/src/include/pwd.h +++ b/src/include/pwd.h @@ -10,11 +10,4 @@ #include <nsss/pwd.h> -#ifdef _GNU_SOURCE -#include <stdio.h> -extern struct passwd *fgetpwent (FILE *) ; -extern int fgetpwent_r (FILE *, struct passwd *, char *, size_t, struct passwd **) ; -extern int putpwent (struct passwd const *, FILE *) ; -#endif - #endif diff --git a/src/include/shadow.h b/src/include/shadow.h index 00d1944..96a2719 100644 --- a/src/include/shadow.h +++ b/src/include/shadow.h @@ -10,17 +10,4 @@ #include <nsss/shadow.h> -#include <stdio.h> - -extern struct spwd *fgetspent (FILE *) ; -extern struct spwd *sgetspent (char const *) ; -extern int putspent (struct spwd const *, FILE *) ; -extern int lckpwdf (void) ; -extern int ulckpwdf (void) ; - -#ifdef _DEFAULT_SOURCE -extern int fgetspent_r(FILE *, struct spwd *, char *, size_t, struct spwd **) ; -extern int sgetspent_r (char const *, struct spwd *, char *, size_t, struct spwd **) ; -#endif - #endif |