summaryrefslogtreecommitdiff
path: root/src/shared/nss-util.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2015-07-23 09:53:47 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2015-07-23 09:53:47 +0200
commit8cd4eb791aa80e8f9c9d1c4625b411dbe4119b27 (patch)
tree44439c355abd08b8634d5f127a01e87b0f9252dd /src/shared/nss-util.h
parente25aa3453b01820b56f3d4844535607677c3937a (diff)
parent35914919a46ee2b123f4b36b27a2b9d9addc60ef (diff)
Merge pull request #537 from poettering/nss-mymachines-userns
Hook up container userns with nss-mymachines
Diffstat (limited to 'src/shared/nss-util.h')
-rw-r--r--src/shared/nss-util.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/shared/nss-util.h b/src/shared/nss-util.h
index 230a986040..3657aa5d9c 100644
--- a/src/shared/nss-util.h
+++ b/src/shared/nss-util.h
@@ -24,6 +24,9 @@
#include <nss.h>
#include <netdb.h>
#include <resolv.h>
+#include <pwd.h>
+#include <grp.h>
+
#define NSS_GETHOSTBYNAME_PROTOTYPES(module) \
enum nss_status _nss_##module##_gethostbyname4_r( \
@@ -109,7 +112,8 @@ enum nss_status _nss_##module##_gethostbyname_r( \
NULL, \
NULL); \
return ret; \
-}
+} \
+struct __useless_struct_to_allow_trailing_semicolon__
#define NSS_GETHOSTBYADDR_FALLBACKS(module) \
enum nss_status _nss_##module##_gethostbyaddr_r( \
@@ -125,4 +129,29 @@ enum nss_status _nss_##module##_gethostbyaddr_r( \
buffer, buflen, \
errnop, h_errnop, \
NULL); \
-}
+} \
+struct __useless_struct_to_allow_trailing_semicolon__
+
+#define NSS_GETPW_PROTOTYPES(module) \
+enum nss_status _nss_##module##_getpwnam_r( \
+ const char *name, \
+ struct passwd *pwd, \
+ char *buffer, size_t buflen, \
+ int *errnop) _public_; \
+enum nss_status _nss_mymachines_getpwuid_r( \
+ uid_t uid, \
+ struct passwd *pwd, \
+ char *buffer, size_t buflen, \
+ int *errnop) _public_
+
+#define NSS_GETGR_PROTOTYPES(module) \
+enum nss_status _nss_##module##_getgrnam_r( \
+ const char *name, \
+ struct group *gr, \
+ char *buffer, size_t buflen, \
+ int *errnop) _public_; \
+enum nss_status _nss_##module##_getgrgid_r( \
+ gid_t gid, \
+ struct group *gr, \
+ char *buffer, size_t buflen, \
+ int *errnop) _public_