Branch Coverage

blib/lib/Samba/LDAP/User.pm
Criterion Covered Total %
branch 0 270 0.0


line true false branch
92 0 0 if any sub { not defined $_; } , @required_args
96 0 0 if defined $args{'oldpass'} eq $args{'newpass'}
101 0 0 if (defined $args{'dn'}) { }
108 0 0 if ($args{'user'} and $args{'oldpass'} and $args{'newpass'})
113 0 0 unless ($self->is_valid_user($dn, $args{'oldpass'}))
120 0 0 unless (defined $self->_get_user_dn($args{'user'}))
133 0 0 if defined $hash_password or croak("I cannot generate the proper hash!\n")
142 0 0 if ($args{'user'} and $args{'newpass'})
147 0 0 if ($self->is_samba_user($args{'user'}) and $args{'samba'})
161 0 0 if (defined $$self{'defaultMaxPasswordAge'})
169 0 0 unless $args{'user'}
174 0 0 if $modify->code
179 0 0 if (defined $args{'unix'})
183 0 0 if $modify->code
211 0 0 if any sub { not defined $_; } , @required_args
218 0 0 if (defined $args{'workstation'})
219 0 0 if ($username =~ /(?xms:[^\$]$)/s)
225 0 0 if ($username =~ /(?xms:^([\w -.]+\$?)$)/) { }
237 0 0 if ($rc and defined $dn) { }
0 0 elsif (not $rc) { }
255 0 0 if (defined $user_ou)
256 0 0 if (not $user_ou =~ /(?xms:^ou=(.*))/) { }
271 0 0 if $mesg->code
273 0 0 if ($mesg->count eq 0)
283 0 0 if $add->code
291 0 0 if (not defined $userUidNumber) { }
0 0 elsif (getpwuid $userUidNumber) { }
303 0 0 if (not defined $userGidNumber) { }
306 0 0 if (defined $args{'workstation'}) { }
318 0 0 if (($gid = $group->parse_group($userGidNumber)) < 0)
330 0 0 if (defined $args{'windows_user'} or defined $args{'trust_account'})
337 0 0 unless ($userGroupSID)
351 0 0 if ($test_exist_sid->count == 1)
370 0 0 unless (defined($userHomeDirectory = $args{'homedir'}))
380 0 0 if defined($tmp = $args{'shell'})
381 0 0 if defined($tmp = $args{'gecos'})
382 0 0 if defined($tmp = $args{'skeleton_dir'})
387 0 0 if ($args{'surname'} and $args{'family_name'}) { }
400 0 0 if (defined $args{'local_mail_address'} or defined $args{'mail_to_address'})
408 0 0 if (defined $args{'workstation'} or defined $args{'trust_account'})
411 0 0 if ($args{'workstation'} and not $username =~ /(?xms:\$$)/)
416 0 0 unless ($machine->add_posix_machine({'user', $username, 'uid', $userUidNumber, 'gid', $userGidNumber, 'time_to_wait', $args{'time_to_wait'}}))
431 0 0 if (defined $args{'trust_account'})
462 0 0 if $modify->code
474 0 0 if (defined $args{'aix'}) { }
517 0 0 if $add->code
520 0 0 if ($userGidNumber != $$self{'defaultUserGid'})
527 0 0 if (defined $args{'groups'})
532 0 0 if (defined($tmp = $args{'homedir'}))
533 0 0 unless ($username =~ /(?xms:\$$)/)
534 0 0 unless (-e $userHomeDirectory)
541 0 0 if (defined $$self{'userHomeDirectoryMode'}) { }
554 0 0 if (@userMailLocal)
558 0 0 if ($m =~ /(?xms:^(.+)@)/) { }
565 0 0 $domain ? :
571 0 0 if (@userMailTo)
574 0 0 if (@userMailLocal or @userMailTo)
579 0 0 if (defined $args{'ox'})
602 0 0 if $modify->code
611 0 0 if $add->code
617 0 0 if $modify2->code
623 0 0 if (defined $args{'windows_user'})
624 0 0 if (not $$self{'with_smbpasswd'}) { }
632 0 0 if (defined($tmp = $args{'can_change_pass'}))
633 0 0 if ($tmp != 0) { }
641 0 0 if (defined($tmp = $args{'must_change_pass'}))
642 0 0 if ($tmp != 0) { }
656 0 0 if (defined($tmp = $args{'account_flags'}))
676 0 0 if $modify->code
681 0 0 unless open FILE, $FILE
687 0 0 if ($?)
693 0 0 defined $args{'logon_script'} ? :
699 0 0 defined $args{'home_path'} ? :
703 0 0 defined $args{'home_drive'} ? :
709 0 0 if $valhomedrive and not $valhomedrive =~ /(?xms::$)/
711 0 0 defined $args{'user_profile'} ? :
717 0 0 if ($valhomedrive)
720 0 0 if ($valsmbhome)
724 0 0 if ($valprofilepath)
727 0 0 if ($valscriptpath)
730 0 0 unless ($$self{'with_smbpasswd'})
738 0 0 if $modify->code
742 0 0 if (defined $args{'aix_user'})
752 0 0 if $modify->code
756 0 0 if (defined $args{'newpass'})
786 0 0 if any sub { not defined $_; } , @required_args
791 0 0 unless (defined($dn_line = $self->_get_user_dn($user)))
803 0 0 if (@groups)
805 0 0 if ($gname ne '')
822 0 0 if $mesg->code
828 0 0 if $entr->dn =~ /(?xms:^uid)/
831 0 0 if $modify->code
837 0 0 if $modify->code
842 0 0 if (defined $args{'homedir'})
845 0 0 unless ($homedir =~ m[(?xms:^/.+/(.*))$user])
851 0 0 if ($homedir)
853 0 0 unless $module->require
861 0 0 if ($nscd_status == 0)
895 0 0 unless defined $user
898 0 0 unless (defined($dn_line = $self->_get_user_dn($user)))
924 0 0 if $modify->code
926 0 0 if ($self->is_samba_user($user))
930 0 0 if $modify->code
948 0 0 unless my $ldap_slave = 'Net::LDAP'->new($$self{'slaveLDAP'}, 'port', $$self{'slavePort'}, 'version', 3, 'timeout', 60)
957 0 0 unless ($ldap_slave)
960 0 0 unless $ldap_slave = 'Net::LDAP'->new($$self{'masterLDAP'}, 'port', $$self{'masterPort'}, 'version', 3, 'timeout', 60)
968 0 0 if ($ldap_slave)
969 0 0 if ($$self{'ldapTLS'} == 1)
980 0 0 if ($mesg->code == 0) { }
985 0 0 if ($ldap_slave->bind) { }
1022 0 0 if $mesg->code
1046 0 0 if $mesg->code
1083 0 0 if $mesg->code
1086 0 0 if ($nb > 1) { }
1096 0 0 if (defined $entry)
1102 0 0 if ($homeDir eq '')
1138 0 0 unless defined $clear_pass
1143 0 0 if ($hash_encrypt eq '{CRYPT}' and defined $crypt_salt_format) { }
0 0 elsif ($hash_encrypt eq '{MD5}') { }
0 0 elsif ($hash_encrypt eq '{SMD5}') { }
0 0 elsif ($hash_encrypt eq '{SHA}') { }
0 0 elsif ($hash_encrypt eq '{SSHA}') { }
0 0 elsif ($hash_encrypt eq '{CLEARTEXT}') { }
1205 0 0 if any sub { not defined $_; } , @required_args
1215 0 0 if ($ldap_base_dn =~ /$$self{'usersdn'}/i)
1227 0 0 if $next_uid_mesg->code
1229 0 0 if ($next_uid_mesg->count != 1)
1238 0 0 if $modify->code
1245 0 0 if $check_uid_mesg->code
1248 0 0 if ($check_uid_mesg->count == 0)
1310 0 0 if $mesg->code
1319 0 0 unless ($$self{'dn'})
1349 0 0 if $mesg->code
1360 0 0 if (defined $dn) { }
1385 0 0 if $str