Package: rinetd
Version: 0.62-5.1ies1
Severity: wishlist
Tags: patch

The attached patch adds a log entry at connection open. I find this very
useful because I want to produce a report from the log showing when a
connection starts and ends, both for security and reporting purposes.

-- System Information:
Debian Release: 5.0.8
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (99, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-4-pve (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages rinetd depends on:
ii  libc6                       2.7-18lenny7 GNU C Library: Shared libraries

rinetd recommends no packages.

rinetd suggests no packages.

-- no debconf information
diff --git a/debian/changelog b/debian/changelog
index 2aa20a1..d6744f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+rinetd (0.62-5.1ies1) unstable; urgency=low
+
+  * Write a log entry at connection open.
+
+ -- Flavio Stanchina <flavio.stanch...@ies.it>  Fri, 04 Feb 2011 18:05:00 +0100
+
 rinetd (0.62-5.1) unstable; urgency=low
 
   * Non-maintainer upload to solve release goal.
diff --git a/rinetd.c b/rinetd.c
index fc71e8a..771c8c0 100755
--- a/rinetd.c
+++ b/rinetd.c
@@ -211,6 +211,8 @@ const char *logMessages[] = {
 	"not-allowed",
 	0,
 	"denied",
+	0,
+	"opened",
 	0
 };
 	
@@ -221,6 +223,7 @@ const char *logMessages[] = {
 #define logLocalConnectFailed 8
 #define logNotAllowed 10
 #define logDenied 12
+#define logOpened 14
 
 #define logLocalClosedFirst 0
 #define logRemoteClosedFirst 1
@@ -1339,6 +1342,7 @@ void openLocalFd(int se, int i)
 			return;
 		}
 	}
+	log(i, coSe[i], logOpened);
 }
 
 int getAddress(char *host, struct in_addr *iaddr)

Reply via email to