diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-03-09 09:44:02 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-03-09 09:44:02 +0000 |
commit | 15202db2af0a9bed3e1c1bd247e88ff6ef226e44 (patch) | |
tree | a5030c9b86c4a799417db1a44ebb07ecc47f18ea | |
parent | 8c3b89e97f757b27a7f8bb64bf670ba01931d1c5 (diff) | |
download | iurt-15202db2af0a9bed3e1c1bd247e88ff6ef226e44.tar iurt-15202db2af0a9bed3e1c1bd247e88ff6ef226e44.tar.gz iurt-15202db2af0a9bed3e1c1bd247e88ff6ef226e44.tar.bz2 iurt-15202db2af0a9bed3e1c1bd247e88ff6ef226e44.tar.xz iurt-15202db2af0a9bed3e1c1bd247e88ff6ef226e44.zip |
use login shells when chrooting as user
-rwxr-xr-x | iurt2 | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -692,7 +692,7 @@ if ($run{shell}) { add_sudoers(\%run, $chroot_tmp, $luser); if ($run{shell}) { plog('NOTIFY', "dumping to a chrooted shell into $chroot_tmp"); - exec $sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "$config->{prompt} bash"; + exec $sudo, 'chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash"; die "FATAL $program_name: could not exec chroot to $chroot_tmp ($!)"; } } @@ -866,7 +866,7 @@ retry: if ($run{stop}) { plog("dumping to a chrooted shell into $chroot_tmp (pid $$)"); # exec does not work because it seems stdin and out are shared between children - system($sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "$config->{prompt} bash"); + system($sudo, 'chroot', $chroot_tmp, '/bin/su', '-', $luser, '-c', "$config->{prompt} bash"); exit(); } plog('DEBUG', "calling callback for $opt->{hash}"); |