aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-09-21 06:14:58 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-09-21 06:14:58 +0000
commit49d66bcce5aa57acc5fb71efe93f531cae9d7402 (patch)
tree63505224b6579ad8de2559e3f1519c6590649c4a /src/include
parent711f816b22c09fc9fb0947c041e6a95a933930d4 (diff)
downloadnsss-49d66bcce5aa57acc5fb71efe93f531cae9d7402.tar.gz
Remove tainnow dependency in configure too
Diffstat (limited to 'src/include')
-rw-r--r--src/include/grp.h1
-rw-r--r--src/include/nsss/grp-all.h1
-rw-r--r--src/include/nsss/grp-switch.h1
-rw-r--r--src/include/nsss/grp-unix.h1
-rw-r--r--src/include/nsss/grp.h12
-rw-r--r--src/include/nsss/nsss-switch.h3
-rw-r--r--src/include/nsss/nsss-unix.h2
7 files changed, 20 insertions, 1 deletions
diff --git a/src/include/grp.h b/src/include/grp.h
index 4516a19..a30fe79 100644
--- a/src/include/grp.h
+++ b/src/include/grp.h
@@ -12,7 +12,6 @@
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#include <sys/types.h>
-extern int getgrouplist (char const *, gid_t, gid_t *, int *) ;
extern int setgroups (size_t, gid_t const *) ;
extern int initgroups (char const *, gid_t) ;
#endif
diff --git a/src/include/nsss/grp-all.h b/src/include/nsss/grp-all.h
index 54ea213..9f45310 100644
--- a/src/include/nsss/grp-all.h
+++ b/src/include/nsss/grp-all.h
@@ -16,5 +16,6 @@ extern struct group *nsss_all_getgrgid (gid_t) ;
extern struct group *nsss_all_getgrnam (char const *) ;
extern int nsss_all_getgrgid_r (gid_t, struct group *, char *, size_t, struct group **) ;
extern int nsss_all_getgrnam_r (char const *, struct group *, char *, size_t, struct group **) ;
+extern int nsss_all_getgrouplist (char const *, gid_t, gid_t *, int *) ;
#endif
diff --git a/src/include/nsss/grp-switch.h b/src/include/nsss/grp-switch.h
index 6a9ba10..429ee48 100644
--- a/src/include/nsss/grp-switch.h
+++ b/src/include/nsss/grp-switch.h
@@ -16,5 +16,6 @@ extern struct group *nsss_switch_getgrgid (gid_t) ;
extern struct group *nsss_switch_getgrnam (char const *) ;
extern int nsss_switch_getgrgid_r (gid_t, struct group *, char *, size_t, struct group **) ;
extern int nsss_switch_getgrnam_r (char const *, struct group *, char *, size_t, struct group **) ;
+extern int nsss_switch_getgrouplist (char const *, gid_t, gid_t *, int *) ;
#endif
diff --git a/src/include/nsss/grp-unix.h b/src/include/nsss/grp-unix.h
index fe089f1..3b198c0 100644
--- a/src/include/nsss/grp-unix.h
+++ b/src/include/nsss/grp-unix.h
@@ -16,5 +16,6 @@ extern struct group *nsss_unix_getgrgid (gid_t) ;
extern struct group *nsss_unix_getgrnam (char const *) ;
extern int nsss_unix_getgrgid_r (gid_t, struct group *, char *, size_t, struct group **) ;
extern int nsss_unix_getgrnam_r (char const *, struct group *, char *, size_t, struct group **) ;
+extern int nsss_unix_getgrouplist (char const *, gid_t, gid_t *, int *) ;
#endif
diff --git a/src/include/nsss/grp.h b/src/include/nsss/grp.h
index ea963b6..0d56cbd 100644
--- a/src/include/nsss/grp.h
+++ b/src/include/nsss/grp.h
@@ -20,6 +20,10 @@ extern "C" {
#define getgrnam nsss_unix_getgrnam
#define getgrnam_r nsss_unix_getgrnam_r
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+# define getgrouplist nsss_unix_getgrouplist
+#endif
+
#else
#ifdef NSSS_DISABLE_UNIX
@@ -34,6 +38,10 @@ extern "C" {
#define getgrnam nsss_switch_getgrnam
#define getgrnam_r nsss_switch_getgrnam_r
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+# define getgrouplist nsss_switch_getgrouplist
+#endif
+
#else
#include <nsss/grp-all.h>
@@ -47,6 +55,10 @@ extern "C" {
#define getgrnam nsss_all_getgrnam
#define getgrnam_r nsss_all_getgrnam_r
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+# define getgrouplist nsss_all_getgrouplist
+#endif
+
#endif
#endif
diff --git a/src/include/nsss/nsss-switch.h b/src/include/nsss/nsss-switch.h
index 8ee428e..9e1a850 100644
--- a/src/include/nsss/nsss-switch.h
+++ b/src/include/nsss/nsss-switch.h
@@ -67,6 +67,7 @@ extern int nsss_switch_pwd_getbyuid (nsss_switch_t *, struct passwd *, stralloc
#define NSSS_SWITCH_GRP_GET '\022'
#define NSSS_SWITCH_GRP_GETBYNAME '\023'
#define NSSS_SWITCH_GRP_GETBYGID '\024'
+#define NSSS_SWITCH_GRP_GETLIST '\025'
extern int nsss_switch_grp_end (nsss_switch_t *, tain_t const *, tain_t *) ;
#define nsss_switch_grp_end_g(a, deadline) nsss_switch_grp_end(a, (deadline), &STAMP)
@@ -78,6 +79,8 @@ extern int nsss_switch_grp_getbyname (nsss_switch_t *, struct group *, stralloc
#define nsss_switch_grp_getbyname_g(a, b, sa, ga, name, deadline) nsss_switch_grp_getbyname(a, b, sa, ga, name, (deadline), &STAMP)
extern int nsss_switch_grp_getbygid (nsss_switch_t *, struct group *, stralloc *, genalloc *, gid_t, tain_t const *, tain_t *) ;
#define nsss_switch_grp_getbygid_g(a, b, sa, ga, g, deadline) nsss_switch_grp_getbygid(a, b, sa, ga, g, (deadline), &STAMP)
+extern int nsss_switch_grp_getlist (nsss_switch_t *, char const *, gid_t, genalloc *, tain_t const *, tain_t *) ;
+#define nsss_switch_grp_getlist_g(a, user, g, ga, deadline) nsss_switch_grp_getlist(a, user, g, ga, (deadline), &STAMP)
/* Shadow */
diff --git a/src/include/nsss/nsss-unix.h b/src/include/nsss/nsss-unix.h
index 786bf88..dfb0bde 100644
--- a/src/include/nsss/nsss-unix.h
+++ b/src/include/nsss/nsss-unix.h
@@ -4,6 +4,7 @@
#define NSSS_UNIX_H
#include <sys/types.h>
+
#include <skalibs/buffer.h>
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
@@ -47,6 +48,7 @@ extern int nsss_unix_pwd_getbyuid (nsss_unix_t *, struct passwd *, stralloc *, u
extern int nsss_unix_grp_get (nsss_unix_t *, struct group *, stralloc *, genalloc *) ;
extern int nsss_unix_grp_getbyname (nsss_unix_t *, struct group *, stralloc *, genalloc *, char const *) ;
extern int nsss_unix_grp_getbygid (nsss_unix_t *, struct group *, stralloc *, genalloc *, gid_t) ;
+extern int nsss_unix_grp_getlist (nsss_unix_t *, gid_t *, size_t, size_t *, stralloc *, genalloc *, char const *) ;
/* Shadow */