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