[git] ADNS-g10 - branch, master, updated. adns-1.4-g10-3-5-g2ac0ffc

by Werner Koch cvs at cvs.gnupg.org
Sat Apr 5 11:14:55 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ADNS migrated to autotools/libtool".

The branch, master has been updated
       via  2ac0ffcdbae023dd7d7633700584864d6a33a2a6 (commit)
       via  0369e1966c2d8a5059aa3ca74935e4a33410b426 (commit)
      from  9296627651b662c0bdf19232187501a03ffd89d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ac0ffcdbae023dd7d7633700584864d6a33a2a6
Author: Werner Koch <wk at gnupg.org>
Date:   Sat Apr 5 09:55:02 2014 +0200

    Release adns-1.4-g1-4.

diff --git a/NEWS b/NEWS
index b780a62..a54b74b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
-Noteworthy changes in version 1.4-g10-4 (unreleased)
+Noteworthy changes in version 1.4-g10-4 (2014-04-05)
 ----------------------------------------------------
 
+ * Improved privacy mode for adnslogres.
+
+ * Added IPv6 support to adnslogres.
+
+ * Added FTP log support to adnslogres.
+
 
 Noteworthy changes in version 1.4-g10-3 (2013-04-24)
 ----------------------------------------------------

commit 0369e1966c2d8a5059aa3ca74935e4a33410b426
Author: Werner Koch <wk at gnupg.org>
Date:   Sat Apr 5 09:53:07 2014 +0200

    Add option -f to adnslogres.

diff --git a/client/adnslogres.c b/client/adnslogres.c
index 4c6b1a7..dab3a7a 100644
--- a/client/adnslogres.c
+++ b/client/adnslogres.c
@@ -69,6 +69,7 @@
 #define OPT_POLL 2
 #define OPT_PRIVACY 4
 #define OPT_VHOST 8
+#define OPT_FTP 16
 
 static const char *const progname= "adnslogres";
 static const char *config_text;
@@ -579,7 +580,7 @@ ipaddr2domain(char *start, char **addr, char **rest, char *fullip,
 
   *r_is_v6 = 0;
 
-  /* Better skip leading spaces which might have been create by some
+  /* Better skip leading spaces which might have been created by some
      log processing scripts.  */
   while (sensible_ctype(isspace, *start))
     start++;
@@ -591,6 +592,30 @@ ipaddr2domain(char *start, char **addr, char **rest, char *fullip,
       while (sensible_ctype(isspace, *start))
         start++;
     }
+  if ((opts & OPT_FTP))
+    {
+      /* Sample FTP log line (after the xfer tag):
+
+         Mon Mar 11 05:18:16 2013 1 124.0.0.0 287 /gcrypt/gnupg/foo \
+            b _ o a anonymous ftp 0 * c
+
+         Timestamp, time (rounded up, so that it is never zero),
+         remote host IP,
+         file size, filename, transfer type, special action flag,
+         direction, access mode, username, service name,
+         authentication method, authenticated user ID, completion status.  */
+      if (strlen (start) < 38)
+        {
+          strcpy (buf, "invalid");
+          *addr = *rest = NULL;
+          goto leave;
+        }
+      start += 25;
+      while (!sensible_ctype(isspace, *start))
+        start++;
+      while (sensible_ctype(isspace, *start))
+        start++;
+    }
 
   for (endp = start; !sensible_ctype(isspace, *endp); endp++)
     {
@@ -819,6 +844,7 @@ static void printhelp(FILE *file) {
 	"         -d                turn on debugging\n"
         "         -P                privacy mode\n"
         "         -x                first field is the virtual host\n"
+        "         -f                FTP log mode\n"
         "         -S <salt>         salt for the privacy mode\n"
 	"         -C <config>       use instead of contents of resolv.conf\n"
         "\n"
@@ -851,7 +877,7 @@ int main(int argc, char *argv[]) {
 
   maxpending= DEFMAXPENDING;
   opts= 0;
-  while ((c= getopt(argc, argv, "c:C:dxpPS:")) != -1)
+  while ((c= getopt(argc, argv, "c:C:dxfpPS:")) != -1)
     switch (c) {
     case 'c':
       maxpending= atoi(optarg);
@@ -869,6 +895,9 @@ int main(int argc, char *argv[]) {
     case 'x':
       opts|= OPT_VHOST;
       break;
+    case 'f':
+      opts|= OPT_FTP;
+      break;
     case 'P':
       opts|= OPT_PRIVACY;
       break;

-----------------------------------------------------------------------

Summary of changes:
 NEWS                |    8 +++++++-
 client/adnslogres.c |   33 +++++++++++++++++++++++++++++++--
 2 files changed, 38 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
ADNS migrated to autotools/libtool
http://git.gnupg.org




More information about the Gnupg-commits mailing list