openbsd-ports/net/nsd/patches/patch-nsd_c
2002-09-13 17:09:20 +00:00

40 lines
1.1 KiB
Plaintext

$OpenBSD: patch-nsd_c,v 1.1.1.1 2002/09/13 17:09:20 jakob Exp $
--- nsd.c.orig Thu Jun 13 14:48:22 2002
+++ nsd.c Thu Jul 11 22:11:42 2002
@@ -79,7 +79,7 @@ xrealloc(p, size)
int
usage()
{
- fprintf(stderr, "usage: nsd [-d] [-p port] [-n identity] [-u user|uid] -f database\n");
+ fprintf(stderr, "usage: nsd [-d] [-p port] [-n identity] [-u user|uid] [-t chrootdir] -f database\n");
exit(1);
}
@@ -202,6 +202,7 @@ main(argc, argv)
nsd.identity = CF_IDENTITY;
nsd.version = CF_VERSION;
nsd.username = CF_USERNAME;
+ nsd.chrootdir = NULL;
/* EDNS0 */
nsd.edns.max_msglen = CF_EDNS_MAX_MESSAGE_LEN;
@@ -235,7 +236,7 @@ main(argc, argv)
/* Parse the command line... */
- while((c = getopt(argc, argv, "a:df:p:i:u:")) != -1) {
+ while((c = getopt(argc, argv, "a:df:p:i:u:t:")) != -1) {
switch (c) {
case 'a':
if((nsd.tcp.addr = nsd.udp.addr = inet_addr(optarg)) == -1)
@@ -256,6 +257,9 @@ main(argc, argv)
break;
case 'u':
nsd.username = optarg;
+ break;
+ case 't':
+ nsd.chrootdir = optarg;
break;
case '?':
default: