On Wed, Dec 17, 2003 at 04:01:43PM -0800, Mark Foster wrote:
if ($port and $group) {
$( = $) = $group;
unless ($( == $) and $( == $group) {
die( "setgid($group) call failed: $!\n" );
}
}
if ($port and $user) {
$< = $> = $user;
unless ($< == $> and $< == $user) {
die( "setuid($user) call failed: $!\n" );
}
}
if ($path) {
if ($group and $user) {
chown $user, $group, $path or die "Cannot chown $user, $group
on $path -- $!";
} elsif ($user) {
chown $user, -1, $path or die "Cannot chown $user on $path --
$!";
}
# fixup perms so that our user/group can read/write to the unix socket
chmod 0660, $path or die "Cannot fixup perms on $path -- $!";
}
It would make a lot more sense to me to setuid/setgid whenever
a user/group are given than to continue running as root in one case and
not in the other.
Also, then you don't have to fiddle with chown.
hdp.
-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/draft-mengwong-spf-02.9.4.txt
To unsubscribe, change your address, or temporarily deactivate your
subscription,
please go to
http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡