Fix typo and exit code

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 13 years ago
parent 995914c9fd
commit 3dd1436fc3
  1. 2
      ipasserelle-base.spec
  2. 2
      root/etc/e-smith/events/actions/update-ldap-pseudonyms
  3. 11
      root/etc/e-smith/events/actions/update-reverse-group

@ -1,5 +1,5 @@
%define version 0.2.6
%define release 1.beta0
%define release 1.beta1
%define name ipasserelle-base

@ -147,7 +147,7 @@ foreach my $acct (@accounts){
mail => \@alias
}
);
$result->code && ($x = 255, warn "failed to modify entry $dn=$key,ou=$ou,$base: ", $result->error;)
$result->code && ($x = 255, warn "failed to modify entry $dn=$key,ou=$ou,$base: ", $result->error);
}
}

@ -38,9 +38,9 @@ my $a = esmith::AccountsDB->open_ro;
my $i = $c->get('ipasserelle');
my $ip = $i->prop('status') || 'disabled';
my $reverse = $i->prop('LdapReverseGroups') || 'disabled';
my $x = 0;
exit (0) if (($ip eq 'disabled') || ($reverse eq 'disabled')){
exit (0) if (($ip eq 'disabled') || ($reverse eq 'disabled'));
my $l = $c->get('ldap');
my $status = $l->prop('status') || "disabled";
@ -101,7 +101,7 @@ foreach my $acct (@accounts){
scope => 'sub',
filter => "uid=$key"
);
$result->code && warn "Error looking for entry uid=$key,ou=Users,$base: ", $result->error;
$result->code && ($x = 255, warn "Error looking for entry uid=$key,ou=Users,$base: ", $result->error);
my @oc = ();
my @oldgroups = ();
foreach my $entry ($result->all_entries()){
@ -118,7 +118,7 @@ foreach my $acct (@accounts){
objectClass => \@oc
}
);
$result->code && warn "failed to modify entry uid=$key,ou=Users,$base: ", $result->error;
$result->code && ($x = 255, warn "failed to modify entry uid=$key,ou=Users,$base: ", $result->error);
}
my @groups = $a->user_group_list($key);
@ -134,9 +134,10 @@ foreach my $acct (@accounts){
posixMemberOf => \@groups
}
);
$result->code && warn "failed to modify entry uid=$key,ou=Users,$base: ", $result->error;
$result->code && ($x = 255, warn "failed to modify entry uid=$key,ou=Users,$base: ", $result->error);
}
}
$ldap->unbind;
exit ($x);

Loading…
Cancel
Save