summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-04-28 12:03:38 +0000
committerume <ume@FreeBSD.org>2006-04-28 12:03:38 +0000
commite14f1c3b3b31e7f6c28cef5acc87f4c7373d288c (patch)
treed796503361cc28eb3b9eaa593876abd826a2cf81 /include
parent4b38e5bbca25f143cbf615b8c7fe1f7873ba1e6c (diff)
downloadFreeBSD-src-e14f1c3b3b31e7f6c28cef5acc87f4c7373d288c.zip
FreeBSD-src-e14f1c3b3b31e7f6c28cef5acc87f4c7373d288c.tar.gz
- Extend the nsswitch to support Services, Protocols and Rpc
databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
Diffstat (limited to 'include')
-rw-r--r--include/nsswitch.h10
-rw-r--r--include/rpc/rpcent.h7
2 files changed, 7 insertions, 10 deletions
diff --git a/include/nsswitch.h b/include/nsswitch.h
index 22e482c..5e7ee0c 100644
--- a/include/nsswitch.h
+++ b/include/nsswitch.h
@@ -68,6 +68,7 @@
#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */
#define NSSRC_NIS "nis" /* YP/NIS */
#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */
+#define NSSRC_CACHE "cache" /* cache daemon */
/*
* currently implemented databases
@@ -80,6 +81,11 @@
#define NSDB_PASSWD "passwd"
#define NSDB_PASSWD_COMPAT "passwd_compat"
#define NSDB_SHELLS "shells"
+#define NSDB_SERVICES "services"
+#define NSDB_SERVICES_COMPAT "services_compat"
+#define NSDB_SSH_HOSTKEYS "ssh_hostkeys"
+#define NSDB_PROTOCOLS "protocols"
+#define NSDB_RPC "rpc"
/*
* suggested databases to implement
@@ -93,11 +99,8 @@
#define NSDB_NETMASKS "netmasks"
#define NSDB_PHONES "phones"
#define NSDB_PRINTCAP "printcap"
-#define NSDB_PROTOCOLS "protocols"
#define NSDB_REMOTE "remote"
-#define NSDB_RPC "rpc"
#define NSDB_SENDMAILVARS "sendmailvars"
-#define NSDB_SERVICES "services"
#define NSDB_TERMCAP "termcap"
#define NSDB_TTYS "ttys"
@@ -193,7 +196,6 @@ enum nss_lookup_type {
};
#ifdef _NS_PRIVATE
-
/*
* private data structures for back-end nsswitch implementation
*/
diff --git a/include/rpc/rpcent.h b/include/rpc/rpcent.h
index 4388d8b..64858b1 100644
--- a/include/rpc/rpcent.h
+++ b/include/rpc/rpcent.h
@@ -53,12 +53,7 @@ struct rpcent {
};
__BEGIN_DECLS
-extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
- char *, int);
-extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
-extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
-
-/* Old interfaces that return a pointer to a static area; MT-unsafe */
+/* These interfaces are currently implemented through nsswitch and MT-safe */
extern struct rpcent *getrpcbyname(char *);
extern struct rpcent *getrpcbynumber(int);
extern struct rpcent *getrpcent(void);
OpenPOWER on IntegriCloud