Use switch_to_unix_user
authorJamie Cameron <jcameron@webmin.com>
Sat, 30 May 2009 21:24:19 +0000 (21:24 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 30 May 2009 21:24:19 +0000 (21:24 +0000)
file/file-lib.pl

index ec2cda2..b2c4c70 100644 (file)
@@ -184,8 +184,7 @@ if (!$module_info{'usermin'} && $access{'uid'}) {
        @u || &error($text{'switch_euser'});
        local @other = &other_groups($u[0]);
        &go_chroot();
-       ($(, $)) = ($u[3], "$u[3] ".join(" ", $u[3], @other));
-       ($>, $<) = ($u[2], $u[2]);
+       &switch_to_unix_user(\@u);
        umask(oct($access{'umask'}));
        }
 else {