🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #42405

Re: Authentication!

#42405
From: Peter Fastré
Date: Sun, 19 Dec 1999 00:00
49 lines
3012 bytes
> Try replacing this:
>
>         } else {
>             /* Matching for a specific user or just the host? */
>             if (user && (!EQ(user, fields[2]) || !EQ(pass, fields[3])))
>                 continue;
>         }
>
> with:
>
>         } else {
>             /* Matching for a specific user or just the host? */
>             if (user && (!EQ(user, fields[2])
>                 || !EQ(crypt(pass, fields[3]), fields[3])))
>                 continue;
>         }
>
> and in nnrp.access put passwords already encrypted with crypt().

I think we already did something like this, but a little bit different. In the
manpages of crypt(), they say the second argument of crypt (char* salt) has to
be a string with the two first characters of the encrypted password. I see
here that you would give the whole encrypted password to crypt(). Does that
make any difference? We made a string first like this:
    char* salt;
    salt[0] = fields[3][0];
    salt[1] = fields[3][1];
    salt[2] = 0;
We have also changed the code a few lines further, where fields[3] is copied
to a variable named PERMpass. We tried to copy crypt(fields[3], salt) to this
variable PERMpass, which is used in some other files, for example commands.c.
In that file (commands.c) there are some other checks between PERMpass and
pass.
But the problem is, nnrpd crashes with our replacements. It reads some lines
of nnrp.access (while-loop), but crashes the fourth time it goes trough the
while.
I have absolutely no idea of what's going wrong.

Thanks very much for your help
Peter

P.S. Could you please reply by e-mail? When I'm in school, I have no access to
this newsgroup (we've only a small newsfeeds, including only the
be.*-hierarchy). My email is 982623pf@hogent.be




Technical Details
Message-ID: <385D56DD.BBE2FB7D@village.uunet.be>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <385100CC.1F725C1B@hogent.be> <3854B6BB.7A69E665@capgemini.fr> <ylg0x6zjyh.fsf@windlord.stanford.edu> <833llt$12d$1@newssvr02.news.prodigy.com> <38577D58.F2E3FC5C@hogent.be> <yl7lif2156.fsf@windlord.stanford.edu> <385AC5B9.66654AA0@village.uunet.be> <ylogbops4k.fsf@windlord.stanford.edu> <385CD16A.227C159D@village.uunet.be> <ylbt7n5b9o.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <385D56DD.BBE2FB7D@village.uunet.be>
Subject: Re: Authentication!
Date: Sun, 19 Dec 1999 00:00:00 +0000
From: Peter Fastré <peter.fastre@village.uunet.be>
References: <385100CC.1F725C1B@hogent.be> <3854B6BB.7A69E665@capgemini.fr> <ylg0x6zjyh.fsf@windlord.stanford.edu> <833llt$12d$1@newssvr02.news.prodigy.com> <38577D58.F2E3FC5C@hogent.be> <yl7lif2156.fsf@windlord.stanford.edu> <385AC5B9.66654AA0@village.uunet.be> <ylogbops4k.fsf@windlord.stanford.edu> <385CD16A.227C159D@village.uunet.be> <ylbt7n5b9o.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.mbox.zip!not-for-mail
X-Deja-AN: 562769156
Content-Transfer-Encoding: 7bit
To: rra@stanford.edu
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@nl.uu.net
X-Trace: newnews1.news.nl.uu.net 945641185 5684 194.7.1.25 (19 Dec 1999 22:06:25 GMT)
Organization: UUNET-NL (http://www.nl.uu.net)
Mime-Version: 1.0
NNTP-Posting-Date: 19 Dec 1999 22:06:25 GMT
Newsgroups: news.software.nntp