From: John Ferlan <ferlan@zk3.dec.com>
To: Paul Coen <pcoen@forest.drew.edu>
Subject: Re: Using SIA calls, modifying INN's nnrpd
Date: 1998/09/30 [thread overview]
Message-ID: <36123244.BA534794@zk3.dec.com> (raw)
In-Reply-To: eoLIm4qQPnBb@forest
SNIP SNIP...
> The original routine in INN's nnrpd (1.7.*) is:
>
> /* See if we should lookup a specific user in the passwd file */
> if (user && pass && EQ(fields[2], "+")) {
> if ((pwd = getpwnam(user)) == NULL)
> continue;
> if (!EQ(pwd->pw_passwd, crypt(pass, pwd->pw_passwd)))
> continue;
> }
>
> I've tried changing by adding:
>
> int auth_stat;
> char *argv[] = {"NNRPD",NULL};
>
> and using:
>
> /* See if we should lookup a specific user in the passwd file */
> if (user && pass && EQ(fields[2], "+")) {
> auth_stat=sia_validate_user(NULL,1,argv,NULL,user,NULL,
> 0,NULL,pwd->pw_passwd);
Don't pass pwd->pw_passwd - pass the argument 'pass' - it's the user's pass phrase
correct? What you're passing is the password taken from the password database - if from
/etc/passwd and if user is in the Enhanced Database (auth.db), then what's in that field
could be "*". In my previous entry you will note I said other UNIX's use getpwnam() and
crypt() themselves - with SIA and Enhanced Security the crypt() routine may not have
encrypted your password, so you cannot do this. With SIA no matter what security
mechanism you've installed (Base, Enhanced, DCE, ASDU, etc.) use of the sia_*() routines
will guarantee you won't have to change your code depending on your user's
authentication model.
> if (!EQ(auth_stat, "SIACORRECT"))
That's SIASUCCESS not SIACORRECT. (see /usr/include/sia.h)
>
> continue;
> }
>
> Snip.. .Snip...
--
John Ferlan DTN: 264-0854 Office: ZKO3-3/Y26
Compaq Computer Corporation
110 Spit Brook Rd.
M/S: ZKO3-3/W20
Nashua, NH 03062-2698
Phone: (603)884-0854
John.Ferlan aT digital dOt com
ferlan aT zk3 dOt dec dOt com
johnferlan aT iname dOt com
Any of the above will get mail to me.
To reply read above and figure it out@
Spammers can cheerfully send mail to:
uce@ftc.gov
root@localhost
webmaster@localhost
postmaster@localhost
prev parent reply other threads:[~1998-09-30 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-23 4:00 Using SIA calls, modifying INN's nnrpd Paul Coen
1998-09-23 4:00 ` John Ferlan
1998-09-29 4:00 ` Paul Coen
1998-09-30 4:00 ` John Ferlan [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox