Article View: news.software.nntp
Article #82750Re: NNRPD - connect message in syslog
From: Julien ÉLIE
Date: Thu, 04 Feb 2010 22:58
Date: Thu, 04 Feb 2010 22:58
67 lines
3682 bytes
3682 bytes
> inn-2.5.1/nnrpd/nnrpd.c - line 612:
>
> notice("%s (%s) connect", Client.host, Client.ip);
>
> becomes
>
> notice("%s (%s) connect - port %u", Client.host, Client.ip, ListenPort);
Hey! That was a trap. The variable ListenPort is not defined in
this context. And the change breaks innreport.
You could have told me that you had not tested your suggestion.
Index: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c (révision 8880)
+++ nnrpd/nnrpd.c (copie de travail)
@@ -531,7 +531,7 @@
** Determine access rights of the client.
*/
static void
-StartConnection(void)
+StartConnection(unsigned short port)
{
static const char *default_host_error = "unknown error";
struct sockaddr_storage ssc, sss;
@@ -612,7 +612,7 @@
* of overviews and slow answers on some architectures (like BSD/OS). */
setsockopt(STDIN_FILENO, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay));
- notice("%s (%s) connect", Client.host, Client.ip);
+ notice("%s (%s) connect - port %u", Client.host, Client.ip, port);
PERMgetaccess(NNRPACCESS);
PERMgetpermissions();
@@ -1217,7 +1217,7 @@
xsignal(SIGPIPE, CatchPipe);
/* Get permissions and see if we can talk to this client. */
- StartConnection();
+ StartConnection(ListenPort);
if (!PERMcanread && !PERMcanpost && !PERMneedauth) {
syslog(L_NOTICE, "%s no_permission", Client.host);
Reply("%d You have no permission to talk. Goodbye!\r\n",
Index: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm (révision 8880)
+++ scripts/innreport_inn.pm (copie de travail)
@@ -1536,7 +1536,7 @@
return 1 if $left =~ /^python: dynamic authorization access for read access
granted$/o;
return 1 if $left =~ /^python: dynamic authorization access type is not known:
/o;
# connect
- if ($left =~ /(\S+) (\([0-9a-fA-F:.]*\) )?connect$/o) {
+ if ($left =~ /(\S+) (\([0-9a-fA-F:.]*\) )?connect(?: - port \d+)?$/o) {
my $cust = $1;
$cust = lc $cust unless $CASE_SENSITIVE;
my $dom = &host2dom($cust);
--
Julien ÉLIE
« Le temps, c'est des sesterces. » (Coquelus)
Technical Details
Message-ID:
<hkfjec$a3q$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.amontpellier-159-1-96-131.w90-57.abo.wanadoo.fr!not-for-mailReferences:
<hka2rk$3p4$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <hkfjec$a3q$1@news.trigofacile.com> Subject: Re: NNRPD - connect message in syslog Date: Thu, 4 Feb 2010 23:58:19 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hka2rk$3p4$1@snarked.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.amontpellier-159-1-96-131.w90-57.abo.wanadoo.fr!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 67 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit Injection-Date: Thu, 4 Feb 2010 22:58:21 +0000 (UTC) Injection-Info: news.trigofacile.com; posting-host="amontpellier-159-1-96-131.w90-57.abo.wanadoo.fr:90.57.255.131"; logging-data="10362"; mail-complaints-to="abuse@trigofacile.com" In-Reply-To: <hka2rk$3p4$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005