From e696d615b8cfb48b227a6d627ccf3bea7eb73667 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 2 Nov 2010 21:09:24 +0000 Subject: move uid check in iurt_root_command (and fix checking return code) --- iurt_root_command | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'iurt_root_command') diff --git a/iurt_root_command b/iurt_root_command index 90233a5..45894a5 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -382,5 +382,6 @@ sub umount { sub useradd { my ($_run, $dir, $username, $o_uid) = @_; check_path_authorized($dir) or return; - return !system('chroot', $dir, 'useradd', if_($o_uid, '-o', '--uid', $o_uid), $username); + return system('chroot', $dir, 'useradd', if_($o_uid, '-o', '--uid', $o_uid), $username) == 0 + || system('chroot', $dir, 'id', $username) == 0; } -- cgit v1.2.1