🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #69141

Re: Problems with MySQL auth and inn 2.4.1

#69141
From: Sebastian Damm
Date: Mon, 17 May 2004 11:30
55 lines
3037 bytes
Russ Allbery schrieb:
> I think this is your problem.  INN is expecting an integer return code,
> and you're giving it a string.  INN isn't smart enough to coerce the
> string to an integer.
>     $returnarray[0] = 281;
>     $returnarray[1] = '';

OK, did that, still didn't work.

> There is a MySQL authenticator in INN's contrib directory.  You can get it
> as part of a CURRENT snapshot from ftp.isc.org.

As I wrote, I read about an authenticator, but couldn't find it. Beause I
just looked into the contrib directory on the ftp server. Now I took the
finally found (;-) authenticator and adapted it to my needs (passwords are
scrambled with the MySQL PASSWORD() function).

But I'm not sure what one line does - or why it shall do what it does: 
This is the whole get_stdin() sub:

#v+
sub get_stdin {
  my %stdin;
  while (<STDIN>) {
    chomp;
    next if $_ =~ /^#.*$/;
    next if $_ =~ /\s+/;  <----- WHY?
    $_ =~ s/#.*$//g;
    $_ =~ s/\s+//g;

    if ( $_ ne "" ) {
      my $key = $_;
      my $value;
      ($key, $value) = split(':', $_, 2);
      $stdin{$key} = $value;
    }
  }
  return(%stdin);
}
#v-

We get values from stdin like "ClientAuthname: user" with a space between
key and value. What is the marked line supposed to do? I know what it
does: It skips the current line if there is a space in it. So we don't get
any usable values. And the auth program fails, of course. Maybe there is
just a ^ missing or a $ to skip lines with leading or trailing spaces.
Trailing spaces would not make sense, though (IMO). When I comment this
line out, the authenticator works.

Thanks for your support and excuse my mail to the inn-workers list, I just
wasn't patient enough. ;)

Sebastian
-- 
Sebastian Damm ........................................ slim.post@gmx.de
Technical Details
Message-ID: <slrncah8hr.tom.slim.post@gibsmir.csn.tu-chemnitz.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news.tu-chemnitz.de!not-for-mail
References: <slrnca6kst.la6.slim.post@gibsmir.csn.tu-chemnitz.de> <87ad07lf2w.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrncah8hr.tom.slim.post@gibsmir.csn.tu-chemnitz.de>
Subject: Re: Problems with MySQL auth and inn 2.4.1
Date: Mon, 17 May 2004 11:30:03 +0000
From: Sebastian Damm <slim.post@gmx.de>
References: <slrnca6kst.la6.slim.post@gibsmir.csn.tu-chemnitz.de> <87ad07lf2w.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news.tu-chemnitz.de!not-for-mail
Newsgroups: news.software.nntp
Organization: Chemnitz University of Technology
Lines: 55
NNTP-Posting-Host: gibsmir.csn.tu-chemnitz.de
X-Trace: anderson.hrz.tu-chemnitz.de 1084793403 24279 134.109.96.139 (17 May
X-Complaints-To: abuse@tu-chemnitz.de
NNTP-Posting-Date: Mon, 17 May 2004 11:30:03 +0000 (UTC)
User-Agent: slrn/0.9.8.0 (Linux)