[guest - Thu Jul 21 11:48:44 2005]:
Show quoted text> Red Hat 9.0 Perl 5.8.0:
>
> grep '999' /etc/passwd
> amavis:x:999:999:amavisd-new daemon:/var/amavis:/sbin/nologin
>
> perl -e 'use POSIX; print "($<)($>)\n"; POSIX::setuid(999); \
> print "($<)($>)\n"'
> (0)(0)
> (0)(0)
Test #1: RHEL (Red Hat Enterprise Linux) 3 ES and perl-5.8.0-89.10.
Logged in as root (uid)0)
# grep amavis /etc/passwd
amavis:x:503:503:amavisd-new:/var/amavis:/bin/bash
# perl -e 'use POSIX; print "($<)($>)\n"; POSIX::setuid(503); \
Show quoted text> print "($<)($>)\n"'
(0)(0)
(0)(0)
Logged in as amavis (uid=503):
$ grep amavis /etc/passwd
amavis:x:503:503:amavisd-new:/var/amavis:/bin/bash
$ perl -e 'use POSIX; print "($<)($>)\n"; POSIX::setuid(503); \
Show quoted text> print "($<)($>)\n"'
(503)(503)
(503)(503)
That amavisd-new-2.3.2 system hates Net::Server-0.88, but works fine
with Net::Server-0.87.
Test #2: Fedora Core 4 and perl-5.8.6-15. Logged in as root (uid=0):
# grep amavis /etc/passwd
amavis:x:506:506:AMaViS email virus scanner user:/home/amavis:/bin/sh
# perl -e 'use POSIX; print "($<)($>)\n"; POSIX::setuid(506); \
print "($<)($>)\n"'
(0)(0)
(506)(506)
Logged in as amavis (uid=506):
$ perl -e 'use POSIX; print "($<)($>)\n"; POSIX::setuid(506); \
Show quoted text> print "($<)($>)\n"'
(506)(506)
(506)(506)
This one has amavisd-new-2.3.2 and Net::Server-0.88 and they work fine.
So, it looks like that problematic RHEL3ES + perl-5.8.0 returns wrong
uid and gid values, when querying as a root. This is problem, when
running amavisd-new-2.3.2 with Net::Server-0.88.