summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldapd
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2016-02-04 12:48:06 +0000
committerjca <jca@openbsd.org>2016-02-04 12:48:06 +0000
commit2f9fe121b3a9415c1640c3288323bfb0c7ef6b33 (patch)
tree41d8a6af61dfb5bd410255801e89e4bc522d0280 /usr.sbin/ldapd
parentWhen deleting a message, remove associated envelopes from the cache, (diff)
downloadwireguard-openbsd-2f9fe121b3a9415c1640c3288323bfb0c7ef6b33.tar.xz
wireguard-openbsd-2f9fe121b3a9415c1640c3288323bfb0c7ef6b33.zip
Minor ldapd -r tweaks
- fix style - the string pointed to by datadir shouldn't be modified, use const - initialize datadir at compile time - in namespace.c, move the extern datadir decl above local decls
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r--usr.sbin/ldapd/ldapd.c5
-rw-r--r--usr.sbin/ldapd/namespace.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ldapd/ldapd.c b/usr.sbin/ldapd/ldapd.c
index 49baa296bf4..d8c723d87cc 100644
--- a/usr.sbin/ldapd/ldapd.c
+++ b/usr.sbin/ldapd/ldapd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldapd.c,v 1.18 2016/02/02 14:59:20 gsoares Exp $ */
+/* $OpenBSD: ldapd.c,v 1.19 2016/02/04 12:48:06 jca Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -51,7 +51,7 @@ static void ldapd_cleanup(char *);
struct ldapd_stats stats;
pid_t ldape_pid;
-char * datadir;
+const char *datadir = DATADIR;
void
usage(void)
@@ -120,7 +120,6 @@ main(int argc, char *argv[])
struct event ev_sighup;
struct stat sb;
- datadir = DATADIR;
log_init(1); /* log to stderr until daemonized */
while ((c = getopt(argc, argv, "dhvD:f:nr:s:")) != -1) {
diff --git a/usr.sbin/ldapd/namespace.c b/usr.sbin/ldapd/namespace.c
index e400509b501..052e24de257 100644
--- a/usr.sbin/ldapd/namespace.c
+++ b/usr.sbin/ldapd/namespace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: namespace.c,v 1.15 2016/02/01 20:00:18 landry Exp $ */
+/* $OpenBSD: namespace.c,v 1.16 2016/02/04 12:48:06 jca Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -28,6 +28,8 @@
#include "ldapd.h"
+extern const char *datadir;
+
/* Maximum number of requests to queue per namespace during compaction.
* After this many requests, we return LDAP_BUSY.
*/
@@ -38,7 +40,6 @@ static void namespace_queue_replay(int fd, short event, void *arg);
static int namespace_set_fd(struct namespace *ns,
struct btree **bt, int fd, unsigned int flags);
-extern char *datadir;
int
namespace_begin_txn(struct namespace *ns, struct btree_txn **data_txn,
struct btree_txn **indx_txn, int rdonly)