aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command3
1 files changed, 2 insertions, 1 deletions
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;
}