Re: [Speedycgi-users] speedy and setuid scripts
Brought to you by:
samh
|
From: Lars U. <lu...@me...> - 2002-07-09 11:42:57
|
On Tue, Jul 09, 2002 at 11:53:52AM +0200, Lars Uffmann wrote:
> Thanx Sam, i got the suid working. Unhappily the qmail-queue wrapper=20
> won't work out of the box. I will try to debug this further. Could it be=
=20
> a problem that the qmail-queue wrapper dup's STDOUT (fd 1) and open it=20
> for reading?
Ok, here a some more details. All test are made on linux 2.4. I first
tried 2.20pre2, compiled with -DIAMSUID. Aparently, pre2 doesn't work at
all, suid or not. Are there any known problems with pre2 on linux? The
calling process blocks on writing to the speedy_frontend.
I then tried 2.20pre1 which does work. Setuid works too. I then came to
the problem i suspected in my first posting: The following code does not
work, the while(<SOUT>) loop is never reached, but neither the open() nor
the close() fail.
>>>
sub grab_envelope_hdrs {
select(STDOUT); $|=3D1;
open(SOUT,"<&STDOUT")||&tempfail("cannot dup fd 0 - $!");
while (<SOUT>) {
[...]
}
close(SOUT)||&tempfail("cannot close fd 1 - $!");
<<<
regards,
--=20
Lars Uffmann, <lar...@me...>, fon: +49 5246 80 1330
|