-/* $Id: mandocdb.c,v 1.215 2016/01/08 17:48:09 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.219 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
#else
#include "compat_fts.h"
#endif
-#include <getopt.h>
#include <limits.h>
+#if HAVE_SANDBOX_INIT
+#include <sandbox.h>
+#endif
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
uint64_t mask; /* set unless handler returns 0 */
};
+
+int mandocdb(int, char *[]);
+
static void dbclose(int);
static void dbadd(struct mpage *);
static void dbadd_mlink(const struct mlink *mlink);
}
#endif
+#if HAVE_SANDBOX_INIT
+ if (sandbox_init(kSBXProfileNoInternet, SANDBOX_NAMED, NULL) == -1) {
+ warnx("sandbox_init");
+ return (int)MANDOCLEVEL_SYSERR;
+ }
+#endif
+
memset(&conf, 0, sizeof(conf));
memset(stmts, 0, STMT__MAX * sizeof(sqlite3_stmt *));
* or
* [./]cat<section>[/<arch>]/<name>.0
*
- * TODO: accomodate for multi-language directories.
+ * TODO: accommodate for multi-language directories.
*/
static int
treescan(void)