Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fb1c84a99b8c6120de55d65708d96cc464f50b54)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fb1c84a99b8c6120de55d65708d96cc464f50b54)
  • Date: Tue, 3 May 2011 15:22:29 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

ChangeLog | 3 ++
net/knock/DEPENDS | 1
net/knock/DETAILS | 20 ----------------
net/knock/HISTORY | 8 ------
security/knock/DEPENDS | 1
security/knock/DETAILS | 27 +++++++++++++++++++++
security/knock/HISTORY | 17 +++++++++++++
security/knock/INSTALL | 6 ++++
security/knock/PRE_BUILD | 5 ++++
security/knock/doc.patch | 30 ++++++++++++++++++++++++
security/knock/init.d/knock.conf | 3 ++
security/knock/init.d/knockd | 10 ++++++++
security/knock/performance.patch | 48
+++++++++++++++++++++++++++++++++++++++
13 files changed, 150 insertions(+), 29 deletions(-)

New commits:
commit fb1c84a99b8c6120de55d65708d96cc464f50b54
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

knock: moved to security section

commit 846f054447b7ea9d97a4b2d5ed8b99011afe243c
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

knock: various fixes

diff --git a/ChangeLog b/ChangeLog
index 1fc460a..a12be07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2011-05-03 Vlad Glagolev <stealth AT sourcemage.org>
+ * net/knock: moved to security section
+
2011-04-28 Vlad Glagolev <stealth AT sourcemage.org>
* python-pypi/pytils: new spell, Russian-specific string utils

diff --git a/net/knock/DEPENDS b/net/knock/DEPENDS
deleted file mode 100755
index a8ec60d..0000000
--- a/net/knock/DEPENDS
+++ /dev/null
@@ -1 +0,0 @@
-depends libpcap
diff --git a/net/knock/DETAILS b/net/knock/DETAILS
deleted file mode 100755
index f1ca691..0000000
--- a/net/knock/DETAILS
+++ /dev/null
@@ -1,20 +0,0 @@
- SPELL=knock
- VERSION=0.5
- SOURCE=$SPELL-$VERSION.tar.gz
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
- SOURCE_URL[0]=http://www.zeroflux.org/proj/knock/files/$SOURCE
- WEB_SITE=http://www.zeroflux.org/cgi-bin/cvstrac.cgi/knock/wiki
- ENTERED=20060529
-
SOURCE_HASH=sha512:c5f7f3320d4d9a41847dba0cda4d66852f983db419b23d3bf9c83d44a41ba437379bf6cee47a096c600841e321740849dac26d5c3afff9b3ae0178a2fcb6c35e
- LICENSE[0]=GPL
- SHORT="knockd is a port-knock server"
-cat << EOF
-knockd is a port-knock server. It listens to all traffic on an ethernet
-(or PPP) interface, looking for special "knock" sequences of port-hits.
-A client makes these port-hits by sending a TCP (or UDP) packet to a
-port on the server. This port need not be open -- since knockd listens
-at the link-layer level, it sees all traffic even if it's destined for a
-closed port. When the server detects a specific sequence of port-hits,
-it runs a command defined in its configuration file. This can be used to
-open up holes in a firewall for quick access.
-EOF
diff --git a/net/knock/HISTORY b/net/knock/HISTORY
deleted file mode 100644
index 51b6239..0000000
--- a/net/knock/HISTORY
+++ /dev/null
@@ -1,8 +0,0 @@
-2006-10-03 Juuso Alasuutari <iuso AT sourcemage.org>
- * DETAILS: [automated] Removed UPDATED.
-
-2006-09-21 Juuso Alasuutari <iuso AT sourcemage.org>
- * DETAILS: [automated] Removed BUILD_API=2.
-
-2006-05-29 Matthew Clark <matthewclark AT inlesserterms.net>
- * DEPENDS, DETAILS, HISTORY: created this spell
diff --git a/security/knock/DEPENDS b/security/knock/DEPENDS
new file mode 100755
index 0000000..a8ec60d
--- /dev/null
+++ b/security/knock/DEPENDS
@@ -0,0 +1 @@
+depends libpcap
diff --git a/security/knock/DETAILS b/security/knock/DETAILS
new file mode 100755
index 0000000..bf31d78
--- /dev/null
+++ b/security/knock/DETAILS
@@ -0,0 +1,27 @@
+ SPELL=knock
+ VERSION=0.5
+ PATCHLEVEL=1
+ SOURCE=$SPELL-$VERSION.tar.gz
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ SOURCE_URL[0]=http://www.zeroflux.org/proj/$SPELL/files/$SOURCE
+ WEB_SITE=http://www.zeroflux.org/projects/knock
+ ENTERED=20060529
+
SOURCE_HASH=sha512:c5f7f3320d4d9a41847dba0cda4d66852f983db419b23d3bf9c83d44a41ba437379bf6cee47a096c600841e321740849dac26d5c3afff9b3ae0178a2fcb6c35e
+ LICENSE[0]=GPL
+ GATHER_DOCS=off
+ SHORT="port-knocking server and client"
+cat << EOF
+Port knocking is a stealthy system for network authentication across closed
+ports.
+
+knockd is a port-knock server. It listens to all traffic on an ethernet (or
PPP)
+interface, looking for special "knock" sequences of port-hits. A client makes
+these port-hits by sending a TCP (or UDP) packet to a port on the server.
+
+This port need not be open -- since knockd listens at the link-layer level,
+it sees all traffic even if it's destined for a closed port. When the server
+detects a specific sequence of port-hits, it runs a command defined in its
+configuration file.
+
+This can be used to open up holes in a firewall for quick access.
+EOF
diff --git a/security/knock/HISTORY b/security/knock/HISTORY
new file mode 100644
index 0000000..a98c432
--- /dev/null
+++ b/security/knock/HISTORY
@@ -0,0 +1,17 @@
+2011-05-03 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: PATCHLEVEL=1; quoting paths; updated descriptions and urls
+ * INSTALL: added, to install init script
+ * PRE_BUILD: added, to apply patches
+ * init.d/knock{d,.conf}: added init system
+ * performance.patch: added, to reduce CPU usage on live capture,
reread
+ logfiles on HUP and remove randomness on a client side, fix build
+ * doc.patch: added, to install knockd manpage to a proper place
+
+2006-10-03 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: [automated] Removed UPDATED.
+
+2006-09-21 Juuso Alasuutari <iuso AT sourcemage.org>
+ * DETAILS: [automated] Removed BUILD_API=2.
+
+2006-05-29 Matthew Clark <matthewclark AT inlesserterms.net>
+ * DEPENDS, DETAILS, HISTORY: created this spell
diff --git a/security/knock/INSTALL b/security/knock/INSTALL
new file mode 100755
index 0000000..e3021a8
--- /dev/null
+++ b/security/knock/INSTALL
@@ -0,0 +1,6 @@
+default_install &&
+
+if [[ $INIT_INSTALLED ]]; then
+ install_config_file "$SPELL_DIRECTORY/init.d/knock.conf" \
+ "$INSTALL_ROOT/etc/sysconfig/knock"
+fi
diff --git a/security/knock/PRE_BUILD b/security/knock/PRE_BUILD
new file mode 100755
index 0000000..4b1de84
--- /dev/null
+++ b/security/knock/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/doc.patch" &&
+patch -p0 < "$SPELL_DIRECTORY/performance.patch"
diff --git a/security/knock/doc.patch b/security/knock/doc.patch
new file mode 100644
index 0000000..f6b1bf7
--- /dev/null
+++ b/security/knock/doc.patch
@@ -0,0 +1,30 @@
+--- Makefile.in.orig 2005-06-27 09:11:34.000000000 +0400
++++ Makefile.in 2011-05-03 23:48:18.147684188 +0400
+@@ -28,6 +28,7 @@
+ BINDIR = @bindir@
+ SBINDIR = @sbindir@
+ MANDIR = @mandir@
++DATADIR = @datadir@
+
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+@@ -70,9 +71,9 @@
+ install: all
+ $(INSTALL) -D -m0755 knockd $(DESTDIR)$(SBINDIR)/knockd
+ $(INSTALL) -D -m0755 knock $(DESTDIR)$(BINDIR)/knock
+- $(INSTALL) -D -m0644 $(MANSRC)knockd.1
$(DESTDIR)$(MANDIR)/man1/knockd.1
++ $(INSTALL) -D -m0644 $(MANSRC)knockd.1
$(DESTDIR)$(MANDIR)/man8/knockd.8
+ $(INSTALL) -D -m0644 $(MANSRC)knock.1 $(DESTDIR)$(MANDIR)/man1/knock.1
+- $(INSTALL) -D -m0644 knockd.conf $(DESTDIR)/etc/knockd.conf
++ $(INSTALL) -D -m0644 knockd.conf
$(DESTDIR)/$(DATADIR)/knockd/knockd.conf
+
+ clean:
+ rm -f *~ $(OBJDIR)*.o $(MANSRC)*.1
+--- doc/knockd.1.in.orig 2005-06-29 22:45:17.000000000 +0400
++++ doc/knockd.1.in 2011-05-03 23:49:01.259684649 +0400
+@@ -1,4 +1,4 @@
+-.TH knockd 1 "June 26, 2005" "knockd #VERSION#" ""
++.TH knockd 8 "June 26, 2005" "knockd #VERSION#" ""
+ .SH NAME
+ knockd \- port-knock server
+ .SH SYNOPSIS
diff --git a/security/knock/init.d/knock.conf
b/security/knock/init.d/knock.conf
new file mode 100644
index 0000000..2924313
--- /dev/null
+++ b/security/knock/init.d/knock.conf
@@ -0,0 +1,3 @@
+# For the arguments and description see knockd(8)
+
+KNOCKD_ARGS=""
diff --git a/security/knock/init.d/knockd b/security/knock/init.d/knockd
new file mode 100755
index 0000000..bed9872
--- /dev/null
+++ b/security/knock/init.d/knockd
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/knock
+
+PROGRAM=/usr/sbin/knockd
+ARGS="-d $KNOCKD_ARGS"
+RUNLEVEL=3
+PIDFILE=/var/run/knockd.pid
+
+. /etc/init.d/smgl_init
diff --git a/security/knock/performance.patch
b/security/knock/performance.patch
new file mode 100644
index 0000000..010de10
--- /dev/null
+++ b/security/knock/performance.patch
@@ -0,0 +1,48 @@
+--- src/knockd.c.orig 2005-06-27 09:11:34.000000000 +0400
++++ src/knockd.c 2011-05-03 23:41:20.133684648 +0400
+@@ -46,6 +46,7 @@
+ #include <syslog.h>
+ #include <pcap.h>
+ #include <errno.h>
++#include <limits.h>
+ #include "list.h"
+
+ static char version[] = "0.5";
+@@ -193,7 +194,7 @@
+ }
+ }
+
+- cap = pcap_open_live(o_int, 65535, 0, 0, pcapErr);
++ cap = pcap_open_live(o_int, 65535, 0, 1000, pcapErr);
+ if(strlen(pcapErr)) {
+ fprintf(stderr, "could not open %s: %s\n", o_int, pcapErr);
+ }
+@@ -371,7 +372,18 @@
+ }
+ list_free(doors);
+
++ if(logfd) {
++ fclose(logfd);
++ logfd = NULL;
++ }
+ parseconfig(o_cfg);
++ if(strlen(o_logfile)) {
++ /* open the log file */
++ logfd = fopen(o_logfile, "a");
++ if(logfd == NULL) {
++ perror("warning: cannot open logfile");
++ }
++ }
+ return;
+ }
+
+--- src/knock.c.orig 2005-06-27 09:11:34.000000000 +0400
++++ src/knock.c 2011-05-03 23:35:39.297684650 +0400
+@@ -128,6 +128,7 @@
+ connect(sd, (struct sockaddr*)&addr, sizeof(struct
sockaddr));
+ }
+ close(sd);
++ usleep(1);
+ }
+
+ return(0);



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (fb1c84a99b8c6120de55d65708d96cc464f50b54), Vlad Glagolev, 05/03/2011

Archive powered by MHonArc 2.6.24.

Top of Page