Use &switch_to_unix_user

This commit is contained in:
Jamie Cameron
2009-05-30 21:21:19 +00:00
parent 2f49b9843c
commit 004a8cd66e

View File

@ -169,8 +169,7 @@ local @u = $user ? getpwnam($user) :
getpwuid($access{'uid'});
if ($u[2]) {
@u || &error($text{'switch_euser'});
($(, $)) = ($u[3], "$u[3] ".join(" ", $u[3], &other_groups($u[0])));
($>, $<) = ($u[2], $u[2]);
&switch_to_unix_user(\@u);
umask(oct($access{'umask'}));
}
}