summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-12-11 18:53:48 +0000
committerLennart Poettering <lennart@poettering.net>2003-12-11 18:53:48 +0000
commit8dbe81f1cca01ba056056e09fe3253465131fea4 (patch)
tree1a7f1f3e83bdd645e64ee19b7d52521d2580a75d
parentadba75b38f77f1902777bebcbb1655c659821647 (diff)
may changes
git-svn-id: file:///home/lennart/svn/public/aeswepd/trunk@37 022f378f-78c4-0310-b860-d162c87e6274
-rw-r--r--Makefile.am2
-rwxr-xr-xbootstrap.sh19
-rw-r--r--configure.ac13
-rw-r--r--doc/README.html.in10
-rw-r--r--doc/style.css4
-rw-r--r--man/Makefile.am2
-rw-r--r--man/aeswepd.8.xml.in2
-rw-r--r--src/Makefile.am5
-rw-r--r--src/aes.c4
-rw-r--r--src/aeswepd.c29
-rw-r--r--src/interface.c4
-rw-r--r--src/iwkey.c4
-rw-r--r--src/keyapi.c4
-rw-r--r--src/util.c4
-rw-r--r--src/wireless.h6
15 files changed, 85 insertions, 27 deletions
diff --git a/Makefile.am b/Makefile.am
index 93cee46..b45c91a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,5 +31,5 @@ homepage:
test -d $$HOME/homepage/lennart
mkdir -p $$HOME/homepage/lennart/projects/aeswepd
cp *.tar.gz $$HOME/homepage/lennart/projects/aeswepd
- cp man/aeswepd.8.xml man/xmltoman.css man/xmltoman.xsl doc/style.css doc/README.html $$HOME/homepage/lennart/projects/aeswepd
+ cp man/aeswepd.8.xml man/xmltoman.css man/xmltoman.xsl man/xmltoman.dtd doc/style.css doc/README.html $$HOME/homepage/lennart/projects/aeswepd
cp $$HOME/homepage/lennart/projects/aeswepd/README.html $$HOME/homepage/lennart/projects/aeswepd/index.html
diff --git a/bootstrap.sh b/bootstrap.sh
index c03a0bb..e3d11d2 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -17,22 +17,29 @@
# along with aeswepd; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+run_versioned() {
+ local P
+ type -p "$1-$2" &> /dev/null && P="$1-$2" || local P="$1"
+
+ shift 2
+ "$P" "$@"
+}
+
if [ "x$1" = "xam" ] ; then
set -ex
- automake -a -c
+ run_versioned automake 1.7 -a -c
./config.status
else
set -ex
-
- make maintainer-clean || true
-
rm -rf autom4te.cache
rm -f config.cache
- aclocal
+ run_versioned aclocal 1.7
autoheader
- automake -a -c
+ run_versioned automake 1.7 -a -c
autoconf -Wall
./configure --sysconfdir=/etc "$@"
+
+ make clean
fi
diff --git a/configure.ac b/configure.ac
index d5e0795..f416382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
AC_PREREQ(2.57)
-AC_INIT([aeswepd], [0.3b], [mznrfjrcq (at) 0pointer (dot) de])
+AC_INIT([aeswepd], [0.4], [mznrfjrcq (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([src/aeswepd.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign -Wall])
@@ -37,9 +37,9 @@ if test "x$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -pipe -Wall"
fi
-if test -d /usr/local/stow && type -p stow > /dev/null ; then
- AC_MSG_NOTICE([*** Found /usr/local/stow: installing to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
- AC_PREFIX_DEFAULT([/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}])
+if type -p stow > /dev/null && test -d /usr/local/stow ; then
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
fi
# Checks for libraries.
@@ -47,7 +47,10 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
-AC_CHECK_LIB([daemon], [daemon_fork],, [AC_MSG_ERROR([*** Sorry, you have to install libdaemon ***])])
+PKG_CHECK_MODULES(LIBDAEMON, libdaemon >= 0.4)
+AC_SUBST(LIBDAEMON_CFLAGS)
+AC_SUBST(LIBDAEMON_LIBS)
+
AC_CHECK_LIB([mcrypt], [mcrypt_module_open], [AC_DEFINE(HAVE_MCRYPT, 1, [libmcrypt available])], [AC_MSG_ERROR([*** Sorry, you have to install libmcrypt or use --disable-aeswepd ***])])
AC_C_CONST
diff --git a/doc/README.html.in b/doc/README.html.in
index a79e0b9..daa005e 100644
--- a/doc/README.html.in
+++ b/doc/README.html.in
@@ -42,6 +42,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
<h2><a name="news">News</a></h2>
+<div class="news-date">Sat Dec 6 2003: </div>
+
+<p class="news-text"><a href="@PACKAGE_URL@aeswepd-0.4.tar.gz">Version 0.4</a> released, changed default rekeying time to 24h, updated wireless extension header, small fixes.</p>
+
<div class="news-date">Fri Oct 17 2003: </div>
<p class="news-text"><a href="@PACKAGE_URL@aeswepd-0.3b.tar.gz">Version 0.3b</a> released, small bugfixes.</p>
@@ -75,7 +79,7 @@ it.</p>
<h2><a name="status">Status</a></h2>
-<p>Version 0.3 is more or less stable. It features only a single WEP
+<p>Version @PACKAGE_VERSION@ is more or less stable. It features only a single WEP
key driver for local NICs supporting the Linux wireless extensions
v15. Support for changing WEP keys of remote APs via HTTP is planned
for the next version.</p>
@@ -124,9 +128,9 @@ compilation and <tt>make install</tt> (as root) for installation of
<p>Get <tt>aeswepd</tt>'s development sources from the <a href="http://subversion.tigris.org/">Subversion</a> <a href="https://seth.intheinter.net:8081/svn/aeswepd/">repository</a>.</p>
<hr/>
-<address>Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;, October 2003</address>
+<address class="grey">Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;, December 2003</address>
-<div><i>$Id$</i></div>
+<div class="grey"><i>$Id$</i></div>
</body>
</html>
diff --git a/doc/style.css b/doc/style.css
index e122e35..1470559 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -27,3 +27,7 @@ ul { margin-left: 0.5cm; }
h1 { color: #00009F; }
h2 { color: #00009F; }
h3 { color: #00004F; margin-left: 0.5cm; }
+ul { margin-left: .5cm; }
+ol { margin-left: .5cm; }
+pre { margin-left: .5cm; background-color: #f0f0f0; padding: 0.4cm;}
+.grey { color: #afafaf; }
diff --git a/man/Makefile.am b/man/Makefile.am
index fa010f1..b71439a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -20,7 +20,7 @@ man_MANS = aeswepd.8 aeswepls.8
noinst_DATA = aeswepd.8.xml
-EXTRA_DIST = $(man_MANS) aeswepd.8.xml.in xmltoman.css xmltoman.xsl
+EXTRA_DIST = $(man_MANS) aeswepd.8.xml.in xmltoman.css xmltoman.xsl xmltoman.dtd
CLEANFILES = aeswepd.8.xml aeswepls.8
diff --git a/man/aeswepd.8.xml.in b/man/aeswepd.8.xml.in
index d666da9..a82186b 100644
--- a/man/aeswepd.8.xml.in
+++ b/man/aeswepd.8.xml.in
@@ -85,7 +85,7 @@
<option>
<p><opt>-t | --rekey-time=</opt><arg>SEC</arg></p>
<optdesc><p>Specify the rekeying interval in seconds. (default:
- 900, that is 15 minutes)</p></optdesc>
+ 86400, that is 24 hours)</p></optdesc>
</option>
<option>
diff --git a/src/Makefile.am b/src/Makefile.am
index 8e5d700..e5c0928 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,10 +23,11 @@ aeswepd_SOURCES = aeswepd.c aeswepd.h \
interface.c interface.h \
iwkey.c iwkey.h \
util.c util.h \
- wireless.h wireless.15.h \
+ wireless.h wireless.15.h wireless.16.h \
keyapi.c keyapi.h
-aeswepd_LDADD = -lmcrypt
+aeswepd_LDADD = -lmcrypt $(LIBDAEMON_LIBS)
+aeswepd_CFLAGS = $(LIBDAEMON_CFLAGS)
install-exec-hook:
cd $(DESTDIR)/$(sbindir) && ln -sf aeswepd aeswepls
diff --git a/src/aes.c b/src/aes.c
index 5356e66..b89ef0c 100644
--- a/src/aes.c
+++ b/src/aes.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <mcrypt.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/aeswepd.c b/src/aeswepd.c
index 1f74c64..3c651e1 100644
--- a/src/aeswepd.c
+++ b/src/aeswepd.c
@@ -20,6 +20,10 @@
#define _GNU_SOURCE
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <assert.h>
#include <sys/select.h>
#include <string.h>
@@ -45,11 +49,12 @@
#include "keyapi.h"
uint8_t aes_key[AES_KEY_LEN];
-int rekey_time = 15*60;
-int n_max_keys = 3;
+int rekey_time = 24*60*60, /* prior to 0.4: 15*60*/
+ n_max_keys = 3;
+
int key_map[MAX_WEP_KEYS];
char *interface_name = NULL;
-int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1;
+int daemonize = 1, use_syslog = 1, wait_on_fork = 0, use_status_file = 1, wait_on_kill = 0;
char log_ident[32], pid_ident[32];
FILE *status_file = NULL;
@@ -321,6 +326,7 @@ void usage(char *p) {
" -E --key-env=KEYENV Specify environment variable to read key from\n"
" -m --max-keys=NR Specify the number of keys to use concurrently (%i)\n"
" -w --wait-on-fork Wait until daemon fork finished (%s)\n"
+ " -W --wait-on-kill When run with -k, wait until the daemon died (%s)\n"
" -l --list-keys Show keys of running daemon\n"
" -h --help Show this help\n"
" -k --kill Kill a running daemon\n"
@@ -334,6 +340,7 @@ void usage(char *p) {
rekey_time,
n_max_keys,
wait_on_fork ? "on" : "off",
+ wait_on_kill ? "on" : "off",
AES_KEY_LEN);
}
@@ -345,6 +352,7 @@ void parse_args(int argc, char *argv[]) {
{"rekey-time", required_argument, 0, 't'},
{"max-keys", required_argument, 0, 'm'},
{"wait-on-fork", no_argument, 0, 'w'},
+ {"wait-on-kill", no_argument, 0, 'W'},
{"help", no_argument, 0, 'h'},
{"kill", no_argument, 0, 'k'},
{"check-running", no_argument, 0, 'c'},
@@ -374,7 +382,7 @@ void parse_args(int argc, char *argv[]) {
for (;;) {
int c;
- if ((c = getopt_long(argc, argv, "nsi:t:m:whkcvlK:F:E:", long_options, &option_index)) < 0)
+ if ((c = getopt_long(argc, argv, "nsi:t:m:whkcvlK:F:E:W", long_options, &option_index)) < 0)
break;
switch (c) {
@@ -469,6 +477,10 @@ void parse_args(int argc, char *argv[]) {
break;
}
+ case 'W':
+ wait_on_kill = !wait_on_kill;
+ break;
+
default:
daemon_log(LOG_ERR, "Unknown parameter.\n");
exit(1);
@@ -490,7 +502,14 @@ void parse_args(int argc, char *argv[]) {
}
if (_kill) {
- if (daemon_pid_file_kill(SIGINT) < 0) {
+ int rv;
+
+ if (wait_on_kill)
+ rv = daemon_pid_file_kill_wait(SIGINT, 5);
+ else
+ rv = daemon_pid_file_kill(SIGINT);
+
+ if (rv < 0) {
daemon_log(LOG_ERR, "Failed to kill daemon. (%s)", strerror(errno));
exit(6);
}
diff --git a/src/interface.c b/src/interface.c
index b33472c..6099354 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
diff --git a/src/iwkey.c b/src/iwkey.c
index bebe1bc..ca9572e 100644
--- a/src/iwkey.c
+++ b/src/iwkey.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <assert.h>
#include <string.h>
#include <stdio.h>
diff --git a/src/keyapi.c b/src/keyapi.c
index a67012d..a5b5351 100644
--- a/src/keyapi.c
+++ b/src/keyapi.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "iwkey.h"
const struct key_api * key_api_get(const char *c) {
diff --git a/src/util.c b/src/util.c
index df1f836..f56b0bb 100644
--- a/src/util.c
+++ b/src/util.c
@@ -18,6 +18,10 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <unistd.h>
#include <sys/socket.h>
#include <string.h>
diff --git a/src/wireless.h b/src/wireless.h
index 55262ae..73ff314 100644
--- a/src/wireless.h
+++ b/src/wireless.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
#include <sys/socket.h>
-
-
#include <linux/if.h>
-#include "wireless.15.h"
+#include <net/if_arp.h>
+
+#include "wireless.16.h"
#endif