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

index 1f6bcf6..c214d63 100644 (file)
@@ -341,8 +341,7 @@ else {
                untie(*STDIN); untie(*STDOUT); untie(*STDERR);
                #setpgrp(0, $$);
                if ($_[1]) {
-                       $( = $_[2]; $) = "$_[2] $_[2]";
-                       ($>, $<) = ($_[1], $_[1]);
+                       &switch_to_unix_user([ undef, undef, $_[1], $_[2] ]);
                        }
 
                open(STDIN, "<$tty");