aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-02 21:09:24 +0000
committerOlivier Blin <blino@mageia.org>2010-11-02 21:09:24 +0000
commite696d615b8cfb48b227a6d627ccf3bea7eb73667 (patch)
tree19931957c3c46ec9009659f71748e0398508b07d /lib
parentbf49eb540a181114f19c0fc2679436493f10c595 (diff)
downloadiurt-e696d615b8cfb48b227a6d627ccf3bea7eb73667.tar
iurt-e696d615b8cfb48b227a6d627ccf3bea7eb73667.tar.gz
iurt-e696d615b8cfb48b227a6d627ccf3bea7eb73667.tar.bz2
iurt-e696d615b8cfb48b227a6d627ccf3bea7eb73667.tar.xz
iurt-e696d615b8cfb48b227a6d627ccf3bea7eb73667.zip
move uid check in iurt_root_command (and fix checking return code)
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Chroot.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index e23cf6f..e34f21d 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -183,7 +183,7 @@ sub add_local_user {
# if (system(qq|sudo chroot $chroot_tmp usermod -u $run->{uid} builder|)) {
if ($uid) {
- if (sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid) || system("$sudo chroot $chroot_tmp id $luser >/dev/null 2>&1")) {
+ if (!sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid)) {
plog('ERR', "ERROR: setting userid $uid to $luser in " .
"$chroot_tmp failed, checking the chroot");
check_build_chroot($run->{chroot_path}, $run->{chroot_tar}, $run,