Branch Coverage

lib/Ubic/Credentials/OS/POSIX.pm
Criterion Covered Total %
branch 30 76 39.4


line true false branch
25 0 186 if (defined $params->{'user'}) { }
92 94 elsif (defined $params->{'service'}) { }
26 0 0 if (defined $params->{'service'})
30 0 0 if defined $params->{'group'}
35 0 92 if @group
50 0 200 unless (defined $self->{'user'})
52 0 0 unless (defined $user)
62 92 16 unless (defined $self->{'group'})
65 0 108 unless (ref $self->{'group'})
75 0 32 unless (defined $id)
83 18 16 if defined $self->{'real_user_id'}
89 94 16 if defined $self->{'effective_user_id'}
99 0 32 unless (defined $gid)
104 32 0 if @gid == 1
110 18 16 if defined $self->{'real_group_id'}
116 94 16 if defined $self->{'effective_group_id'}
123 0 92 unless defined $user
126 0 92 unless (@pwnam)
131 0 92 unless ($main_group)
140 0 4048 if grep {$_ eq $user;} @users
156 0 76 unless (defined $current_user)
160 0 76 unless (defined $current_group)
167 0 76 if ($group ne $current_group)
170 0 0 unless (defined $new_gid)
177 0 0 if ($current_gid != $new_gid)
182 0 76 if ($user ne $current_user)
184 0 0 if ($current_user ne 'root')
188 0 0 unless (defined $new_uid)
192 0 0 if ($> != $new_uid)
209 0 76 if (defined $self->{'old_euid'})
211 0 0 if ($> != $self->{'old_euid'})
215 0 76 if (defined $self->{'old_egid'})
217 0 0 if ($) != $self->{'old_egid'})
225 17 0 if ($self->effective_user_id == $other->effective_user_id and $self->real_user_id == $other->real_user_id and $self->_groups_equal(join(' ', $self->effective_group_id), join(' ', $other->effective_group_id)) and $self->_groups_equal(join(' ', $self->real_group_id), join(' ', $other->real_group_id))) { }
242 0 0 unless ($self->_groups_equal($), join($", @effective_gid)))
247 0 0 unless ($> == $new_euid)
252 0 0 unless ($self->_groups_equal($(, join($", @real_gid)))
257 0 0 unless ($< == $new_ruid)