summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-06-06 19:28:05 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-06-06 19:28:05 -0400
commit817cbf9aeec553b11cf20a51cc0d79e126ecb43f (patch)
treeb2865e6da70dba2dfe4a2c05333d04cd8465bea6 /src
parentf6f243bda9f23a750c8b5622a5df70d445aaaf9a (diff)
downloadslapi-nis-817cbf9aeec553b11cf20a51cc0d79e126ecb43f.tar.gz
slapi-nis-817cbf9aeec553b11cf20a51cc0d79e126ecb43f.tar.xz
slapi-nis-817cbf9aeec553b11cf20a51cc0d79e126ecb43f.zip
- make more configuration attributes compile-time defines
Diffstat (limited to 'src')
-rw-r--r--src/backend.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/backend.c b/src/backend.c
index bcaa64c..2f87b2d 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -39,6 +39,10 @@
#include <rpc/xdr.h>
#include <rpcsvc/yp_prot.h>
+#ifdef HAVE_TCPD_H
+#include <tcpd.h>
+#endif
+
#include "backend.h"
#include "defaults.h"
#include "format.h"
@@ -603,13 +607,15 @@ backend_read_params(struct plugin_state *state)
Slapi_Entry *our_entry;
Slapi_ValueSet *values;
Slapi_Value *value;
- char *actual_attr, *cvalue;
+ char *actual_attr;
+ const char *cvalue;
int disposition, buffer_flags, ivalue, i, j;
unsigned int uvalue;
char *attrs[] = {
- "nis-plugin-max-value-size",
- "nis-plugin-max-dgram-size",
- "nis-plugin-securenet",
+ PLUGIN_CONFIGURATION_MAXVALUE_ATTR,
+ PLUGIN_CONFIGURATION_MAXDGRAM_ATTR,
+ PLUGIN_CONFIGURATION_SECURENET_ATTR,
+ PLUGIN_CONFIGURATION_TCPWRAPNAME_ATTR,
NULL,
};
/* Try to read our name from the top-level configuration node. */
@@ -673,9 +679,17 @@ backend_read_params(struct plugin_state *state)
break;
case 2: /* securenet entry */
while (j != -1) {
+ /* XXX */
j = slapi_valueset_next_value(values, j, &value);
}
break;
+ case 3: /* tcp-wrappers name */
+#ifdef HAVE_TCPD_H
+ cvalue = slapi_value_get_string(value);
+ request_set(state->request_info,
+ RQ_DAEMON, cvalue);
+#endif
+ break;
default:
break;
}