Thread View: news.software.nntp
5 messages
5 total messages
Started by G Hardman
Mon, 20 Aug 2001 16:30
Bizarre happenings from nnrpperlauth
Author: G Hardman
Date: Mon, 20 Aug 2001 16:30
Date: Mon, 20 Aug 2001 16:30
18 lines
1558 bytes
1558 bytes
First up, thanks are due to Russ et. al. who provided assistance after I posted last week. Respect is due (and would have come quicker, but for workloads here :( ) Next, a problem that's puzzling at least 3 of us. It would appear that somehow somewhere, what nnrpd expects to be a socket (STDIN) ends up pointing at ~news/spool/overview/groups.index, from which it obviously can't get any socket information, and nnrpd dies saying "502 I can't get your name." Has anyone else had this problem, or can at least provide some enlightement to a poor exasperated soul? BTW, this problem only arises when nnrpperlauth is true in inn.conf. I'm on INN 2.3.1 --with-perl Many thanks in advance, Graham
Re: Bizarre happenings from nnrpperlauth
Author: Russ Allbery
Date: Tue, 21 Aug 2001 01:29
Date: Tue, 21 Aug 2001 01:29
21 lines
1806 bytes
1806 bytes
G Hardman <gph@comp.leeds.ac.uk> writes:
> Next, a problem that's puzzling at least 3 of us. It would appear that
> somehow somewhere, what nnrpd expects to be a socket (STDIN) ends up
> pointing at ~news/spool/overview/groups.index, from which it obviously
> can't get any socket information, and nnrpd dies saying "502 I can't get
> your name." Has anyone else had this problem, or can at least provide
> some enlightement to a poor exasperated soul?
> BTW, this problem only arises when nnrpperlauth is true in inn.conf. I'm
> on INN 2.3.1 --with-perl
Something's screwing up file descriptors somewhere. Is your Perl stuff
opening or closing files by any chance?
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Bizarre happenings from nnrpperlauth
Author: G Hardman
Date: Tue, 21 Aug 2001 08:26
Date: Tue, 21 Aug 2001 08:26
37 lines
1892 bytes
1892 bytes
The following keys moved, Russ Allbery allegedly moved 'em :
>Something's screwing up file descriptors somewhere. Is your Perl stuff
>opening or closing files by any chance?
Yes. We have an existing authentication system where certain groups are
restricted to reading and writing by certain staff, others are readable
but not writable by students, and others are world readable/writable. The
permissions are obtained from existing files which we're trying to
incorporate into the test system.
The file-opening is as follows:
open(FILE, "<".$groupsfile) || ($returnval = $nopost);
if($returnval)
{
# some error message
}
else
{
while(<FILE>)
{
# read file, do nothing with the information as yet
}
close(FILE);
}
I can't see where things would go wrong with the file descriptors. Even
when I comment out the auth_init subroutine body (ie allow everything
through), the same error occurs.
Any clearer?
TIA,
G
Re: Bizarre happenings from nnrpperlauth
Author: Jan Ingvoldstad
Date: Tue, 21 Aug 2001 09:08
Date: Tue, 21 Aug 2001 09:08
32 lines
2231 bytes
2231 bytes
On Tue, 21 Aug 2001 08:26:41 GMT, gph@comp.leeds.ac.uk (G Hardman) said:
> open(FILE, "<".$groupsfile) || ($returnval = $nopost);
> if($returnval)
> {
> # some error message
> }
You don't close the file handle here. If your script does not
(nearly) immediately exit after this, then you'll have an open file
handle, possibly while something else happens.
If you don't need the file handle after this (which the else branch of
the if seems to imply), you should close it anyway.
One suggestion is:
open(FILE, "<".$groupsfile) || ($returnval = $nopost);
if($returnval) {
# Do that error message stuff
} else {
# Read from the file handle
# No close(FILE) here
}
close(FILE);
--
In the beginning was the Bit, and the Bit was Zero. Then Someone
said, Let there be One, and there was One. And Someone blessed them,
and Someone said unto them, Be fruitful, and multiply, and replenish
the Word and subdue it: and have dominion over every thing that is.
Re: Bizarre happenings from nnrpperlauth
Author: G Hardman
Date: Tue, 21 Aug 2001 10:58
Date: Tue, 21 Aug 2001 10:58
12 lines
1313 bytes
1313 bytes
Thanks for spotting that one. Yes, indeed, I should have closed the file handle outside the if/else block. Have run make upgrade from inn 2.3.2, and now it looks like we might be back on track. Now I'll never know what was going on yesterday - probably a stray addition to the source code/perl scripts... Thanks for all your help, no doubt I'll be back :( G
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads