aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@google.com>2013-02-03 19:08:03 +0100
committerPascal Terjan <pterjan@gmail.com>2014-01-19 05:13:33 +0000
commite2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b (patch)
treed968d9428c1dff238ad3328a72214d46fc5948f2 /lib/Iurt
parent551911eecad9754294a68bcc6497cdbc3d4e2a68 (diff)
downloadiurt-e2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b.tar
iurt-e2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b.tar.gz
iurt-e2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b.tar.bz2
iurt-e2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b.tar.xz
iurt-e2dbc62ae6f8a09f1687aa476e3e28fd2b787c4b.zip
Replace a call to sudo chroot with iurt_root_command
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/Chroot.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 5d3ff49..9ea6362 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -21,8 +21,6 @@ our @EXPORT = qw(
remove_chroot
);
-my $sudo = '/usr/bin/sudo';
-
=head2 clean_chroot($chroot, $run, $config)
Create or clean a chroot
@@ -186,7 +184,7 @@ sub add_local_user {
}
} else {
# the program has been launch as root, setting the home to /home/root for compatibility
- system($sudo, 'chroot', $chroot_tmp, 'usermod', '-d', "/home/$luser", '-u', $uid, '-o', '-l', $luser, 'root');
+ sudo($config, '--chroot', $chroot_tmp, 'usermod', '-d', "/home/$luser", '-u', $uid, '-o', '-l', $luser, 'root');
}
dump_rpmmacros($run, $config, "$chroot_tmp/home/$luser/.rpmmacros") or return;