Commit Diff
Diff:
bca69f48da4007880d457ab55639e86ae283ba48
187cc902dc24060c5884ff901f2cd87cfe239d82
Commit:
187cc902dc24060c5884ff901f2cd87cfe239d82
Tree:
58732409666013e80e5196274d5b562715921896
Author:
pbug <pbug@delphinusdns.org>
Committer:
pbug <pbug@delphinusdns.org>
Date:
Fri Apr 22 16:43:34 2011 UTC
Message:
* fix the configure script so that it produces a config.h * main.c will now require a config.h to exist which requeires a configure to be done before compiling * update README we're changing default privileges from user named to wdnsd
blob - 826ba15add3ba037c48a033d896e3cdfe70b2d8b
blob + 009f8f69e3c361e07375ae8315820de3e465c635
--- README
+++ README
@@ -1,4 +1,4 @@
-$Id: README,v 1.19 2011/04/19 16:33:46 pbug Exp $
+$Id: README,v 1.20 2011/04/22 16:43:34 pbug Exp $
1. README
2. WHY WILDCARDNS?
@@ -37,7 +37,7 @@ can send patches to the author who may implement them
To install, type sh ./configure on BSD and just ./configure on Linux. This
will copy the proper Makefile to ./Makefile. Then you would type make,
followed by su'ing and make install. Wildcarddnsd installs to /usr/local/sbin.
-(In Linux make a user named "named" for the chroot to work, the pwd of named
+(In Linux make a user named "wdnsd" for the chroot to work, the pwd of wdnsd
is where the chroot is set).
Under OpenSuse 10.3 and Ubuntu I noticed the following files missing:
blob - ed028658c72c67d3c658f55a7f470bf1ea66c1ba
blob + a56db903cc5b2cf6ebe78aa5a6a6a26826319f4a
--- configure
+++ configure
@@ -1,15 +1,17 @@
#!/bin/sh
+
+echo "/* config.h - autogenerated by configure */" > config.h
+
until [ -z $1 ]
do
case $1 in
--user=*)
- echo "/\* config.h - autogenerated by configure \*/" > config.h
+ user=`echo $1 | sed -e 's/--user=//g'`
echo "#define DEFAULT_PRIVILEGE \"$user\"" >> config.h
- exit
;;
*)
- echo "usage: configure [--user=]"
+ echo "usage: configure [--user=USERNAME]"
exit
;;
esac
blob - c7090c73e240207f39cc3eb128d7aebc8557daa6
blob + 4d91918ec28d227fb9194c62a6fd6516ecb6a581
--- main.c
+++ main.c
@@ -28,6 +28,7 @@
#include "include.h"
#include "dns.h"
#include "db.h"
+#include "config.h"
/* prototypes */
@@ -73,7 +74,10 @@ void slave_signal(int);
/* aliases */
-#define DEFAULT_PRIVILEGE "named"
+#ifndef DEFAULT_PRIVILEGE
+#define DEFAULT_PRIVILEGE "wdnsd"
+#endif
+
#define DEFAULT_SOCKET 64
#define PIDFILE "/var/run/wildcarddnsd.pid"
@@ -123,7 +127,7 @@ struct tcps {
} *tn1, *tn2, *tnp;
-static const char rcsid[] = "$Id: main.c,v 1.63 2011/04/12 19:07:28 pbug Exp $";
+static const char rcsid[] = "$Id: main.c,v 1.64 2011/04/22 16:43:34 pbug Exp $";
/*
* MAIN - set up arguments, set up database, set up sockets, call mainloop
repomaster@centroid.eu