summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nscd
diff options
context:
space:
mode:
authorbushman <bushman@FreeBSD.org>2007-08-09 13:06:12 +0000
committerbushman <bushman@FreeBSD.org>2007-08-09 13:06:12 +0000
commit134f3ad3d31d78a7dad40bc6160d9048c1b82552 (patch)
tree1589409ef0b53b096b886613488415a250bf359d /usr.sbin/nscd
parent84d5db62db7fae363e820c77d44cb82d8e7716ee (diff)
downloadFreeBSD-src-134f3ad3d31d78a7dad40bc6160d9048c1b82552.zip
FreeBSD-src-134f3ad3d31d78a7dad40bc6160d9048c1b82552.tar.gz
- Renaming repocopied cached to nscd
Approved by: re (kensmith), brooks (mentor)
Diffstat (limited to 'usr.sbin/nscd')
-rw-r--r--usr.sbin/nscd/Makefile8
-rw-r--r--usr.sbin/nscd/agent.h4
-rw-r--r--usr.sbin/nscd/cachelib.h4
-rw-r--r--usr.sbin/nscd/cacheplcs.h4
-rw-r--r--usr.sbin/nscd/config.h8
-rw-r--r--usr.sbin/nscd/debug.h4
-rw-r--r--usr.sbin/nscd/log.c4
-rw-r--r--usr.sbin/nscd/log.h4
-rw-r--r--usr.sbin/nscd/mp_rs_query.c2
-rw-r--r--usr.sbin/nscd/mp_rs_query.h4
-rw-r--r--usr.sbin/nscd/mp_ws_query.c2
-rw-r--r--usr.sbin/nscd/mp_ws_query.h4
-rw-r--r--usr.sbin/nscd/nscd.820
-rw-r--r--usr.sbin/nscd/nscd.c26
-rw-r--r--usr.sbin/nscd/nscd.conf.522
-rw-r--r--usr.sbin/nscd/nscdcli.c48
-rw-r--r--usr.sbin/nscd/nscdcli.h24
-rw-r--r--usr.sbin/nscd/parser.h4
-rw-r--r--usr.sbin/nscd/protocol.h4
-rw-r--r--usr.sbin/nscd/query.c8
-rw-r--r--usr.sbin/nscd/query.h4
-rw-r--r--usr.sbin/nscd/singletons.h4
22 files changed, 108 insertions, 108 deletions
diff --git a/usr.sbin/nscd/Makefile b/usr.sbin/nscd/Makefile
index 4dfd514..f743797 100644
--- a/usr.sbin/nscd/Makefile
+++ b/usr.sbin/nscd/Makefile
@@ -1,13 +1,13 @@
# $FreeBSD$
-PROG= cached
-MAN= cached.conf.5 cached.8
+PROG= nscd
+MAN= nscd.conf.5 nscd.8
WARNS?= 2
-SRCS= agent.c cached.c cachedcli.c cachelib.c cacheplcs.c debug.c log.c \
+SRCS= agent.c nscd.c nscdcli.c cachelib.c cacheplcs.c debug.c log.c \
config.c query.c mp_ws_query.c mp_rs_query.c singletons.c protocol.c \
parser.c
-CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/cached.conf\""
+CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/nscd.conf\""
DPADD= ${LIBM} ${LIBPTHREAD} ${LIBUTIL}
LDADD= -lm -lpthread -lutil
diff --git a/usr.sbin/nscd/agent.h b/usr.sbin/nscd/agent.h
index 5dc368d..ebe8974 100644
--- a/usr.sbin/nscd/agent.h
+++ b/usr.sbin/nscd/agent.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_AGENT_H__
-#define __CACHED_AGENT_H__
+#ifndef __NSCD_AGENT_H__
+#define __NSCD_AGENT_H__
/*
* Agents are used to perform the actual lookups from the caching daemon.
diff --git a/usr.sbin/nscd/cachelib.h b/usr.sbin/nscd/cachelib.h
index d67e830..b1c8af8 100644
--- a/usr.sbin/nscd/cachelib.h
+++ b/usr.sbin/nscd/cachelib.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_CACHELIB_H__
-#define __CACHED_CACHELIB_H__
+#ifndef __NSCD_CACHELIB_H__
+#define __NSCD_CACHELIB_H__
#include <sys/queue.h>
#include <sys/time.h>
diff --git a/usr.sbin/nscd/cacheplcs.h b/usr.sbin/nscd/cacheplcs.h
index 36997f5..8eba15f 100644
--- a/usr.sbin/nscd/cacheplcs.h
+++ b/usr.sbin/nscd/cacheplcs.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_CACHEPLCS_H__
-#define __CACHED_CACHEPLCS_H__
+#ifndef __NSCD_CACHEPLCS_H__
+#define __NSCD_CACHEPLCS_H__
#include <sys/queue.h>
#include <sys/time.h>
diff --git a/usr.sbin/nscd/config.h b/usr.sbin/nscd/config.h
index b54dc9b..a3205c9 100644
--- a/usr.sbin/nscd/config.h
+++ b/usr.sbin/nscd/config.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_CONFIG_H__
-#define __CACHED_CONFIG_H__
+#ifndef __NSCD_CONFIG_H__
+#define __NSCD_CONFIG_H__
#include <sys/stat.h>
#include <sys/types.h>
@@ -44,8 +44,8 @@
#define DEFAULT_CACHE_HT_SIZE 257
#define INITIAL_ENTRIES_CAPACITY 8
-#define DEFAULT_SOCKET_PATH "/var/run/cached"
-#define DEFAULT_PIDFILE_PATH "/var/run/cached.pid"
+#define DEFAULT_SOCKET_PATH "/var/run/nscd"
+#define DEFAULT_PIDFILE_PATH "/var/run/nscd.pid"
#define DEFAULT_POSITIVE_ELEMENTS_SIZE (2048)
#define DEFAULT_POSITIVE_LIFETIME (3600)
diff --git a/usr.sbin/nscd/debug.h b/usr.sbin/nscd/debug.h
index 320e10f..71f5300 100644
--- a/usr.sbin/nscd/debug.h
+++ b/usr.sbin/nscd/debug.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_DEBUG_H__
-#define __CACHED_DEBUG_H__
+#ifndef __NSCD_DEBUG_H__
+#define __NSCD_DEBUG_H__
#define TRACE_WANTED 32
diff --git a/usr.sbin/nscd/log.c b/usr.sbin/nscd/log.c
index 053930a..adfc5bf 100644
--- a/usr.sbin/nscd/log.c
+++ b/usr.sbin/nscd/log.c
@@ -50,7 +50,7 @@ __log_msg(int level, const char *sender, const char *message, ...)
printf("M%d from %s: %s\n", level, sender, fmessage);
#ifndef NO_SYSLOG
if (level == 0)
- syslog(LOG_INFO, "cached message (from %s): %s", sender,
+ syslog(LOG_INFO, "nscd message (from %s): %s", sender,
fmessage);
#endif
free(fmessage);
@@ -72,7 +72,7 @@ __log_err(int level, const char *sender, const char *error, ...)
#ifndef NO_SYSLOG
if (level == 0)
- syslog(LOG_ERR, "cached error (from %s): %s", sender, ferror);
+ syslog(LOG_ERR, "nscd error (from %s): %s", sender, ferror);
#endif
free(ferror);
}
diff --git a/usr.sbin/nscd/log.h b/usr.sbin/nscd/log.h
index 8d665a4..e02efb5 100644
--- a/usr.sbin/nscd/log.h
+++ b/usr.sbin/nscd/log.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_LOG_H__
-#define __CACHED_LOG_H__
+#ifndef __NSCD_LOG_H__
+#define __NSCD_LOG_H__
#define LOG_MSG_1(sender, msg, ...) __log_msg(1, sender, msg, ##__VA_ARGS__)
#define LOG_MSG_2(sender, msg, ...) __log_msg(2, sender, msg, ##__VA_ARGS__)
diff --git a/usr.sbin/nscd/mp_rs_query.c b/usr.sbin/nscd/mp_rs_query.c
index ae0f3bb..3375cc3 100644
--- a/usr.sbin/nscd/mp_rs_query.c
+++ b/usr.sbin/nscd/mp_rs_query.c
@@ -200,7 +200,7 @@ on_mp_read_session_request_process(struct query_state *qstate)
dec_cache_entry_name = strdup(
qstate->config_entry->mp_cache_params.entry_name);
else {
-#ifdef NS_CACHED_EID_CHECKING
+#ifdef NS_NSCD_EID_CHECKING
if (check_query_eids(qstate) != 0) {
c_mp_rs_response->error_code = EPERM;
goto fin;
diff --git a/usr.sbin/nscd/mp_rs_query.h b/usr.sbin/nscd/mp_rs_query.h
index f468afa..91f13cc 100644
--- a/usr.sbin/nscd/mp_rs_query.h
+++ b/usr.sbin/nscd/mp_rs_query.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_MP_RS_QUERY_H__
-#define __CACHED_MP_RS_QUERY_H__
+#ifndef __NSCD_MP_RS_QUERY_H__
+#define __NSCD_MP_RS_QUERY_H__
extern int on_mp_read_session_request_read1(struct query_state *);
diff --git a/usr.sbin/nscd/mp_ws_query.c b/usr.sbin/nscd/mp_ws_query.c
index d7aeb49..7eae1d8 100644
--- a/usr.sbin/nscd/mp_ws_query.c
+++ b/usr.sbin/nscd/mp_ws_query.c
@@ -203,7 +203,7 @@ on_mp_write_session_request_process(struct query_state *qstate)
"can't write to it", c_mp_ws_request->entry);
goto fin;
} else {
-#ifdef NS_CACHED_EID_CHECKING
+#ifdef NS_NSCD_EID_CHECKING
if (check_query_eids(qstate) != 0) {
c_mp_ws_response->error_code = EPERM;
goto fin;
diff --git a/usr.sbin/nscd/mp_ws_query.h b/usr.sbin/nscd/mp_ws_query.h
index ba77665..ead1d35 100644
--- a/usr.sbin/nscd/mp_ws_query.h
+++ b/usr.sbin/nscd/mp_ws_query.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_MP_WS_QUERY_H__
-#define __CACHED_MP_WS_QUERY_H__
+#ifndef __NSCD_MP_WS_QUERY_H__
+#define __NSCD_MP_WS_QUERY_H__
extern int on_mp_write_session_request_read1(struct query_state *);
extern cache_entry register_new_mp_cache_entry(struct query_state *,
diff --git a/usr.sbin/nscd/nscd.8 b/usr.sbin/nscd/nscd.8
index 519338e..1def32c 100644
--- a/usr.sbin/nscd/nscd.8
+++ b/usr.sbin/nscd/nscd.8
@@ -25,11 +25,11 @@
.\" $FreeBSD$
.\"
.Dd October 20, 2005
-.Dt CACHED 8
+.Dt NSCD 8
.Os
.Sh NAME
-.Nm cached
-.Nd "caching server daemon"
+.Nm nscd
+.Nd "name service caching daemon"
.Sh SYNOPSIS
.Nm
.Op Fl dnst
@@ -82,7 +82,7 @@ lookups by itself.
To enable this feature, use the
.Va perform-actual-lookups
parameter in
-.Xr cached.conf 5 .
+.Xr nscd.conf 5 .
.Pp
The
.Nm
@@ -100,7 +100,7 @@ Forces using only one thread for all processing purposes (it overrides
the
.Va threads
parameter in the
-.Xr cached.conf 5
+.Xr nscd.conf 5
file).
.It Fl t
Trace mode.
@@ -150,16 +150,16 @@ to invalidate the whole cache.
Only the root can use this option.
.El
.Sh FILES
-.Bl -tag -width ".Pa /etc/cached.conf" -compact
-.It Pa /etc/cached.conf
+.Bl -tag -width ".Pa /etc/nscd.conf" -compact
+.It Pa /etc/nscd.conf
The default configuration file.
.El
.Sh SEE ALSO
.Xr nsdispatch 3 ,
-.Xr cached.conf 5 ,
+.Xr nscd.conf 5 ,
.Xr nsswitch.conf 5
.Sh AUTHORS
-.An Michael Bushkov Aq bushman@rsu.ru
+.An Michael Bushkov Aq bushman@freebsd.org
.Sh BUGS
Please send bug reports and suggestions to
-.Aq bushman@rsu.ru .
+.Aq bushman@freebsd.org .
diff --git a/usr.sbin/nscd/nscd.c b/usr.sbin/nscd/nscd.c
index 3a8e97c..00bc1dd 100644
--- a/usr.sbin/nscd/nscd.c
+++ b/usr.sbin/nscd/nscd.c
@@ -49,19 +49,19 @@ __FBSDID("$FreeBSD$");
#include "agents/passwd.h"
#include "agents/group.h"
#include "agents/services.h"
-#include "cachedcli.h"
#include "cachelib.h"
#include "config.h"
#include "debug.h"
#include "log.h"
+#include "nscdcli.h"
#include "parser.h"
#include "query.h"
#include "singletons.h"
#ifndef CONFIG_PATH
-#define CONFIG_PATH "/etc/cached.conf"
+#define CONFIG_PATH "/etc/nscd.conf"
#endif
-#define DEFAULT_CONFIG_PATH "cached.conf"
+#define DEFAULT_CONFIG_PATH "nscd.conf"
#define MAX_SOCKET_IO_SIZE 4096
@@ -93,7 +93,7 @@ static void
print_version_info(void)
{
TRACE_IN(print_version_info);
- printf("cached v0.2 (20 Oct 2005)\nwas developed during SoC 2005\n");
+ printf("nscd v0.2 (20 Oct 2005)\nwas developed during SoC 2005\n");
TRACE_OUT(print_version_info);
}
@@ -101,7 +101,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: cached [-dnst] [-i cachename] [-I cachename]\n");
+ "usage: nscd [-dnst] [-i cachename] [-I cachename]\n");
exit(1);
}
@@ -683,8 +683,8 @@ main(int argc, char *argv[])
FILE *pidfin = fopen(DEFAULT_PIDFILE_PATH, "r");
char pidbuf[256];
- struct cached_connection_params connection_params;
- cached_connection connection;
+ struct nscd_connection_params connection_params;
+ nscd_connection connection;
int result;
@@ -704,14 +704,14 @@ main(int argc, char *argv[])
memset(&connection_params, 0,
- sizeof(struct cached_connection_params));
+ sizeof(struct nscd_connection_params));
connection_params.socket_path = DEFAULT_SOCKET_PATH;
- connection = open_cached_connection__(&connection_params);
- if (connection == INVALID_CACHED_CONNECTION)
+ connection = open_nscd_connection__(&connection_params);
+ if (connection == INVALID_NSCD_CONNECTION)
errx(EXIT_FAILURE, "Can't connect to the daemon.");
if (clear_user_cache_entries != 0) {
- result = cached_transform__(connection,
+ result = nscd_transform__(connection,
user_config_entry_name, TT_USER);
if (result != 0)
LOG_MSG_1("main",
@@ -727,7 +727,7 @@ main(int argc, char *argv[])
errx(EXIT_FAILURE, "Only root can initiate "
"global cache transformation.");
- result = cached_transform__(connection,
+ result = nscd_transform__(connection,
global_config_entry_name, TT_ALL);
if (result != 0)
LOG_MSG_1("main",
@@ -739,7 +739,7 @@ main(int argc, char *argv[])
"succeeded");
}
- close_cached_connection__(connection);
+ close_nscd_connection__(connection);
free(user_config_entry_name);
free(global_config_entry_name);
diff --git a/usr.sbin/nscd/nscd.conf.5 b/usr.sbin/nscd/nscd.conf.5
index 6e5bec1..f729202 100644
--- a/usr.sbin/nscd/nscd.conf.5
+++ b/usr.sbin/nscd/nscd.conf.5
@@ -25,17 +25,17 @@
.\" $FreeBSD$
.\"
.Dd April 30, 2006
-.Dt CACHED.CONF 5
+.Dt NSCD.CONF 5
.Os
.Sh NAME
-.Nm cached.conf
-.Nd "caching daemon configuration file"
+.Nm nscd.conf
+.Nd "nscd configuration file"
.Sh DESCRIPTION
The
.Nm
file
is used by the
-.Xr cached 8
+.Xr nscd 8
daemon and is read on its startup.
Its syntax is mostly similar to the
.Pa nscd.conf
@@ -114,12 +114,12 @@ When it is exceeded, the policy will be applied.
The default value is 2048.
.It Va perform-actual-lookups Oo Ar cachename Oc Op Cm yes | no
If enabled, the
-.Xr cached 8
+.Xr nscd 8
does not simply receive and cache the NSS-requests results, but performs
all the lookups by itself and only returns the responses.
If this feature is enabled, then for the given
.Ar cachename
-.Xr cached 8
+.Xr nscd 8
will act similarly to the NSCD.
.Pp
.Sy NOTE :
@@ -135,14 +135,14 @@ You can use the
.Ql #
symbol at the beginning of the line for comments.
.Sh FILES
-.Bl -tag -width ".Pa /etc/cached.conf" -compact
-.It Pa /etc/cached.conf
+.Bl -tag -width ".Pa /etc/nscd.conf" -compact
+.It Pa /etc/nscd.conf
.El
.Sh SEE ALSO
-.Xr cached 8
+.Xr nscd 8
.Sh AUTHORS
.An Michael Bushkov
-.Aq bushman@rsu.ru
+.Aq bushman@freebsd.org
.Sh BUGS
Please send bug reports and suggestions to
-.Aq bushman@rsu.ru .
+.Aq bushman@freebsd.org .
diff --git a/usr.sbin/nscd/nscdcli.c b/usr.sbin/nscd/nscdcli.c
index c78c875..e7459e7 100644
--- a/usr.sbin/nscd/nscdcli.c
+++ b/usr.sbin/nscd/nscdcli.c
@@ -41,17 +41,17 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include "debug.h"
-#include "cachedcli.h"
+#include "nscdcli.h"
#include "protocol.h"
-#define DEFAULT_CACHED_IO_TIMEOUT 4
+#define DEFAULT_NSCD_IO_TIMEOUT 4
-static int safe_write(struct cached_connection_ *, const void *, size_t);
-static int safe_read(struct cached_connection_ *, void *, size_t);
-static int send_credentials(struct cached_connection_ *, int);
+static int safe_write(struct nscd_connection_ *, const void *, size_t);
+static int safe_read(struct nscd_connection_ *, void *, size_t);
+static int send_credentials(struct nscd_connection_ *, int);
static int
-safe_write(struct cached_connection_ *connection, const void *data,
+safe_write(struct nscd_connection_ *connection, const void *data,
size_t data_size)
{
struct kevent eventlist;
@@ -63,7 +63,7 @@ safe_write(struct cached_connection_ *connection, const void *data,
if (data_size == 0)
return (0);
- timeout.tv_sec = DEFAULT_CACHED_IO_TIMEOUT;
+ timeout.tv_sec = DEFAULT_NSCD_IO_TIMEOUT;
timeout.tv_nsec = 0;
result = 0;
do {
@@ -88,7 +88,7 @@ safe_write(struct cached_connection_ *connection, const void *data,
}
static int
-safe_read(struct cached_connection_ *connection, void *data, size_t data_size)
+safe_read(struct nscd_connection_ *connection, void *data, size_t data_size)
{
struct kevent eventlist;
size_t result;
@@ -99,7 +99,7 @@ safe_read(struct cached_connection_ *connection, void *data, size_t data_size)
if (data_size == 0)
return (0);
- timeout.tv_sec = DEFAULT_CACHED_IO_TIMEOUT;
+ timeout.tv_sec = DEFAULT_NSCD_IO_TIMEOUT;
timeout.tv_nsec = 0;
result = 0;
do {
@@ -124,7 +124,7 @@ safe_read(struct cached_connection_ *connection, void *data, size_t data_size)
}
static int
-send_credentials(struct cached_connection_ *connection, int type)
+send_credentials(struct nscd_connection_ *connection, int type)
{
struct kevent eventlist;
int nevents;
@@ -173,16 +173,16 @@ send_credentials(struct cached_connection_ *connection, int type)
}
}
-struct cached_connection_ *
-open_cached_connection__(struct cached_connection_params const *params)
+struct nscd_connection_ *
+open_nscd_connection__(struct nscd_connection_params const *params)
{
- struct cached_connection_ *retval;
+ struct nscd_connection_ *retval;
struct kevent eventlist;
struct sockaddr_un client_address;
int client_address_len, client_socket;
int res;
- TRACE_IN(open_cached_connection);
+ TRACE_IN(open_nscd_connection);
assert(params != NULL);
client_socket = socket(PF_LOCAL, SOCK_STREAM, 0);
@@ -196,14 +196,14 @@ open_cached_connection__(struct cached_connection_params const *params)
client_address_len);
if (res == -1) {
close(client_socket);
- TRACE_OUT(open_cached_connection);
+ TRACE_OUT(open_nscd_connection);
return (NULL);
}
fcntl(client_socket, F_SETFL, O_NONBLOCK);
- retval = malloc(sizeof(struct cached_connection_));
+ retval = malloc(sizeof(struct nscd_connection_));
assert(retval != NULL);
- memset(retval, 0, sizeof(struct cached_connection_));
+ memset(retval, 0, sizeof(struct nscd_connection_));
retval->sockfd = client_socket;
@@ -221,33 +221,33 @@ open_cached_connection__(struct cached_connection_params const *params)
0, 0, NULL);
res = kevent(retval->read_queue, &eventlist, 1, NULL, 0, NULL);
- TRACE_OUT(open_cached_connection);
+ TRACE_OUT(open_nscd_connection);
return (retval);
}
void
-close_cached_connection__(struct cached_connection_ *connection)
+close_nscd_connection__(struct nscd_connection_ *connection)
{
- TRACE_IN(close_cached_connection);
+ TRACE_IN(close_nscd_connection);
assert(connection != NULL);
close(connection->sockfd);
close(connection->read_queue);
close(connection->write_queue);
free(connection);
- TRACE_OUT(close_cached_connection);
+ TRACE_OUT(close_nscd_connection);
}
int
-cached_transform__(struct cached_connection_ *connection,
+nscd_transform__(struct nscd_connection_ *connection,
const char *entry_name, int transformation_type)
{
size_t name_size;
int error_code;
int result;
- TRACE_IN(cached_transform);
+ TRACE_IN(nscd_transform);
error_code = -1;
result = 0;
@@ -279,6 +279,6 @@ cached_transform__(struct cached_connection_ *connection,
error_code = -1;
fin:
- TRACE_OUT(cached_transform);
+ TRACE_OUT(nscd_transform);
return (error_code);
}
diff --git a/usr.sbin/nscd/nscdcli.h b/usr.sbin/nscd/nscdcli.h
index 58d9ccc..cfbd7e6 100644
--- a/usr.sbin/nscd/nscdcli.h
+++ b/usr.sbin/nscd/nscdcli.h
@@ -26,32 +26,32 @@
* $FreeBSD$
*/
-#ifndef __CACHED_CACHEDCLI_H__
-#define __CACHED_CACHEDCLI_H__
+#ifndef __NSCD_NSCDCLI_H__
+#define __NSCD_NSCDCLI_H__
-struct cached_connection_params {
+struct nscd_connection_params {
char *socket_path;
struct timeval timeout;
};
-struct cached_connection_ {
+struct nscd_connection_ {
int sockfd;
int read_queue;
int write_queue;
};
/* simple abstractions for not to write "struct" every time */
-typedef struct cached_connection_ *cached_connection;
-typedef struct cached_connection_ *cached_mp_write_session;
-typedef struct cached_connection_ *cached_mp_read_session;
+typedef struct nscd_connection_ *nscd_connection;
+typedef struct nscd_connection_ *nscd_mp_write_session;
+typedef struct nscd_connection_ *nscd_mp_read_session;
-#define INVALID_CACHED_CONNECTION (NULL)
+#define INVALID_NSCD_CONNECTION (NULL)
/* initialization/destruction routines */
-extern cached_connection open_cached_connection__(
- struct cached_connection_params const *);
-extern void close_cached_connection__(cached_connection);
+extern nscd_connection open_nscd_connection__(
+ struct nscd_connection_params const *);
+extern void close_nscd_connection__(nscd_connection);
-extern int cached_transform__(cached_connection, const char *, int);
+extern int nscd_transform__(nscd_connection, const char *, int);
#endif
diff --git a/usr.sbin/nscd/parser.h b/usr.sbin/nscd/parser.h
index 54cc898..413b784 100644
--- a/usr.sbin/nscd/parser.h
+++ b/usr.sbin/nscd/parser.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_PARSER_H__
-#define __CACHED_PARSER_H__
+#ifndef __NSCD_PARSER_H__
+#define __NSCD_PARSER_H__
extern int parse_config_file(struct configuration *,
const char *, char const **, int *);
diff --git a/usr.sbin/nscd/protocol.h b/usr.sbin/nscd/protocol.h
index 7fadbfc..6894d3c 100644
--- a/usr.sbin/nscd/protocol.h
+++ b/usr.sbin/nscd/protocol.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_PROTOCOL_H__
-#define __CACHED_PROTOCOL_H__
+#ifndef __NSCD_PROTOCOL_H__
+#define __NSCD_PROTOCOL_H__
#include <stdlib.h>
diff --git a/usr.sbin/nscd/query.c b/usr.sbin/nscd/query.c
index 947e93f..2714386 100644
--- a/usr.sbin/nscd/query.c
+++ b/usr.sbin/nscd/query.c
@@ -191,13 +191,13 @@ on_query_startup(struct query_state *qstate)
qstate->uid = cred->cmcred_uid;
qstate->gid = cred->cmcred_gid;
-#if defined(NS_CACHED_EID_CHECKING) || defined(NS_STRICT_CACHED_EID_CHECKING)
+#if defined(NS_NSCD_EID_CHECKING) || defined(NS_STRICT_NSCD_EID_CHECKING)
/*
* This check is probably a bit redundant - per-user cache is always separated
* by the euid/egid pair
*/
if (check_query_eids(qstate) != 0) {
-#ifdef NS_STRICT_CACHED_EID_CHECKING
+#ifdef NS_STRICT_NSCD_EID_CHECKING
TRACE_OUT(on_query_startup);
return (-1);
#else
@@ -511,7 +511,7 @@ on_negative_write_request_process(struct query_state *qstate)
"can't write to it", write_request->entry);
goto fin;
} else {
-#ifdef NS_CACHED_EID_CHECKING
+#ifdef NS_NSCD_EID_CHECKING
if (check_query_eids(qstate) != 0) {
write_response->error_code = EPERM;
goto fin;
@@ -705,7 +705,7 @@ on_read_request_process(struct query_state *qstate)
if (qstate->config_entry->perform_actual_lookups != 0)
memset(read_request->cache_key, 0, qstate->eid_str_length);
else {
-#ifdef NS_CACHED_EID_CHECKING
+#ifdef NS_NSCD_EID_CHECKING
if (check_query_eids(qstate) != 0) {
/* if the lookup is not self-performing, we check for clients euid/egid */
read_response->error_code = EPERM;
diff --git a/usr.sbin/nscd/query.h b/usr.sbin/nscd/query.h
index 5c4e918..383d806 100644
--- a/usr.sbin/nscd/query.h
+++ b/usr.sbin/nscd/query.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_QUERY_H__
-#define __CACHED_QUERY_H__
+#ifndef __NSCD_QUERY_H__
+#define __NSCD_QUERY_H__
#include <sys/types.h>
#include <stdlib.h>
diff --git a/usr.sbin/nscd/singletons.h b/usr.sbin/nscd/singletons.h
index 918519c..dfd891f 100644
--- a/usr.sbin/nscd/singletons.h
+++ b/usr.sbin/nscd/singletons.h
@@ -26,8 +26,8 @@
* $FreeBSD$
*/
-#ifndef __CACHED_SINGLETONS_H__
-#define __CACHED_SINGLETONS_H__
+#ifndef __NSCD_SINGLETONS_H__
+#define __NSCD_SINGLETONS_H__
#include "cachelib.h"
#include "config.h"
OpenPOWER on IntegriCloud