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

index 2c541a5..1f6bcf6 100644 (file)
@@ -290,8 +290,7 @@ if (!$@) {
                close(STDIN); close(STDOUT); close(STDERR);
                untie(*STDIN); untie(*STDOUT); untie(*STDERR);
                if ($_[1]) {
-                       $( = $_[2]; $) = "$_[2] $_[2]";
-                       ($>, $<) = ($_[1], $_[1]);
+                       &switch_to_unix_user([ undef, undef, $_[1], $_[2] ]);
                        }
 
                close($ptyfh);          # Used by other side only