logo       

Re: problem z pakietami z SID-a: msg#00708

linux.debian.user.polish

Subject: Re: problem z pakietami z SID-a

On Thu, Sep 26, 2002 at 12:06:57PM +0200, bieniu@xxxxxxxxxxxxxx wrote:
> >
> > Ręcznie. Prościej jednak sprawdzić czemu nie działa neomail.
> >
> > eloy
> > --
> >
> > --Krzysztof-eloy-Krzyżaniak-----------------------eloy-@-transilvania-eu-org--
>
> logowac w neomailu sie moge, lecz gdy proboje odpowiedziec na maila
> pojawia mi sie blad (caly czas ten sam
>
> Software error:
> Insecure dependency in open while running setgid at
> /home/httpd/cgi-bin/neomail.pl line 2775.
>
>
> w lini neomaila 2775 jest:
>
> ################### FILELOCK #################################
> my %opentable; # Global, declared here for clarity of the sub
>
> sub filelock {
> my ($filename, $lockflag)=@_; # Read sub params
> my $fh;
>
> $fh=$opentable{$filename};
>
> if (! defined($fh)) { # handle not found,
> $fh=FileHandle->new();
> if (open($fh, "+<$filename")) {
> $opentable{$filename}=$fh;
> } else {
> return(0);
> }
> }
> return(flock($fh, $lockflag));
> }
> ##################### END FILELOCK ###########################

Jak się domyślam FileHandle to uchwyt do IO::File

Zamień if-a na:

if (! defined($fh)) {
$fh = FileHandle->new($filename, RDWR) or return(0);
$opentable($filename)=$fh
}

Jak to nie zadziała, to zdowngraduj perla.

eloy
--
--Krzysztof-eloy-Krzyżaniak-----------------------eloy-@-transilvania-eu-org--

Obwiązać twarze szmatami, że... że niby dzieci zęby bolą. Dzieci
wtedy nie miały opieki dentystycznej. I tak jest najlepiej.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise