1 |
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-delete.fix_ldap_delete 2010-09-27 19:20:39.000000000 +0200 |
2 |
+++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-delete 2010-09-27 19:22:00.000000000 +0200 |
3 |
@@ -57,8 +57,10 @@ |
4 |
password => $pw |
5 |
); |
6 |
|
7 |
+my $mesg; |
8 |
+ |
9 |
# Delete any user object with this name |
10 |
-my $mesg = $ldap->search( base-> "uid=$name,ou=Users,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
11 |
+$mesg = $ldap->search( base=> "uid=$name,ou=Users,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
12 |
if ($mesg->code && $mesg->code != 32) |
13 |
{ |
14 |
warn "Failed ldap search uid=$name,ou=Users,$base: ", $mesg->error; |
15 |
@@ -69,7 +71,7 @@ |
16 |
} |
17 |
|
18 |
# Delete any computer object with this name |
19 |
-my $mesg = $ldap->search( base-> "uid=$name,ou=Computers,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
20 |
+$mesg = $ldap->search( base=> "uid=$name,ou=Computers,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
21 |
if ($mesg->code && $mesg->code != 32) |
22 |
{ |
23 |
warn "Failed ldap search uid=$name,ou=Computers,$base: ", $mesg->error; |
24 |
@@ -80,7 +82,7 @@ |
25 |
} |
26 |
|
27 |
# Delete any (old) user/computer object with this name |
28 |
-my $mesg = $ldap->search( base-> "uid=$name,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
29 |
+$mesg = $ldap->search( base=> "uid=$name,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
30 |
if ($mesg->code && $mesg->code != 32) |
31 |
{ |
32 |
warn "Failed ldap search uid=$name,$base: ", $mesg->error; |
33 |
@@ -91,7 +93,7 @@ |
34 |
} |
35 |
|
36 |
# Delete any group object with this name |
37 |
-my $mesg = $ldap->search( base-> "cn=$name,ou=Groups,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
38 |
+$mesg = $ldap->search( base=> "cn=$name,ou=Groups,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
39 |
if ($mesg->code && $mesg->code != 32) |
40 |
{ |
41 |
warn "Failed ldap search cn=$name,ou=Groups,$base: ", $mesg->error; |
42 |
@@ -102,7 +104,7 @@ |
43 |
} |
44 |
|
45 |
# Delete any (old) group object with this name |
46 |
-my $mesg = $ldap->search( base-> "cn=$name,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
47 |
+$mesg = $ldap->search( base=> "cn=$name,$base", filter => '(ObjectClass=*)', scope => 'base' ); |
48 |
if ($mesg->code && $mesg->code != 32) |
49 |
{ |
50 |
warn "Failed ldap search cn=$name,$base: ", $mesg->error; |