Article View: news.software.nntp
Article #38064Re: nnrpd_auth.pl
From: tomjnsn
Date: Tue, 15 Jun 1999 00:00
Date: Tue, 15 Jun 1999 00:00
36 lines
1559 bytes
1559 bytes
Whoops! I wasn't paying attention, I had a couple of lines wrong in
checkuser(). checkuser() should read as follows:
sub checkuser {
my $user = $attributes{'username'};
pam_start("login", $user, \&pam_conv_func, $pamh);
^^^^^--(was passwd)
$retval = pam_set_item($pamh,PAM_TTY,$DISPLAY);
$retval = pam_authenticate($pamh, 0);
if ($retval == PAM_SUCCESS) {
^^^^^^^^^^^^^^--(wasn't verifying against PAM_SUCCESS
which is = 0)
pam_end($pamh);
return ($authcodes{'allowed'}, 1, 1, $defaultgroups);
} else {
pam_end($pamh);
return ($authcodes{'denied'}, undef, undef, undef);
}
}
In article <7k5pjb$o5q$1@nnrp1.deja.com>,
tomjnsn@my-deja.com wrote:
<snip>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID:
<7k5vc5$qtg$1@nnrp1.deja.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.mbox.zip!not-for-mailReferences:
<7k5pjb$o5q$1@nnrp1.deja.com>Show Full Headers
Complete Article Headers
Message-ID: <7k5vc5$qtg$1@nnrp1.deja.com> Subject: Re: nnrpd_auth.pl Date: Tue, 15 Jun 1999 00:00:00 +0000 From: tomjnsn@my-deja.com References: <7k5pjb$o5q$1@nnrp1.deja.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.mbox.zip!not-for-mail X-Deja-AN: 489888004 X-Http-Proxy: 1.0 x37.deja.com:80 (Squid/1.1.22) for client 206.67.74.111 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Tue Jun 15 16:35:18 1999 GMT Newsgroups: news.software.nntp X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I)