INN commit: branches/2.5 (3 files)

INN Commit rra at isc.org
Sat Jun 11 06:48:50 UTC 2011


    Date: Friday, June 10, 2011 @ 23:48:50
  Author: iulius
Revision: 9204

Use "localhost" instead of "stdin" in injection fields when
an article is posted from the local system.

Suggestion from Dieter Stussy and Paolo Amoroso.

Modified:
  branches/2.5/CONTRIBUTORS
  branches/2.5/contrib/auth_pass.c
  branches/2.5/nnrpd/nnrpd.c

---------------------+
 CONTRIBUTORS        |    2 +-
 contrib/auth_pass.c |    2 +-
 nnrpd/nnrpd.c       |    4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS	2011-06-11 06:14:24 UTC (rev 9203)
+++ CONTRIBUTORS	2011-06-11 06:48:50 UTC (rev 9204)
@@ -274,4 +274,4 @@
 S.P. Zeidler, Nix, Florian Schlichting, Torsten Jerzembeck, Harald Dunkel,
 Lars Magne Ingebrigtsen, Sam Varshavchik, Matthew Vernon, Ian Jackson,
 Edmund H. Ramm, Raphael Barrois, Bo Lindbergh, Matthias Meyser,
-Dennis Preiser
+Dennis Preiser, Paolo Amoroso

Modified: contrib/auth_pass.c
===================================================================
--- contrib/auth_pass.c	2011-06-11 06:14:24 UTC (rev 9203)
+++ contrib/auth_pass.c	2011-06-11 06:48:50 UTC (rev 9204)
@@ -108,7 +108,7 @@
             fprintf(stderr, "cant getpeername()::%s:+:!*\n", username);
             exit(1);
         }
-        strlcpy(peername, "stdin", sizeof(peername));
+        strlcpy(peername, "localhost", sizeof(peername));
     } else if (sin.sin_family != AF_INET) {
         fprintf(stderr, "Bad address family %ld::%s:+:!*\n",
                 (long)sin.sin_family, username);

Modified: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c	2011-06-11 06:14:24 UTC (rev 9203)
+++ nnrpd/nnrpd.c	2011-06-11 06:48:50 UTC (rev 9204)
@@ -553,7 +553,9 @@
 	    Reply("%d Can't get your name.  Goodbye!\r\n", NNTP_ERR_ACCESS);
 	    ExitWithStats(1, true);
 	}
-        strlcpy(Client.host, "stdin", sizeof(Client.host));
+        /* For the X-Trace: header field, initialize Client.ip. */
+        strlcpy(Client.host, "localhost", sizeof(Client.host));
+        strlcpy(Client.ip, "127.0.0.1", sizeof(Client.ip)); 
     } else {
 	/* Figure out client's IP address/hostname. */
 	HostErrorStr = default_host_error;




More information about the inn-committers mailing list