1 |
vip-ire |
1.1 |
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.ldap_update_several_groups 2010-09-27 20:00:44.000000000 +0200 |
2 |
|
|
+++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-27 21:45:02.000000000 +0200 |
3 |
|
|
@@ -70,17 +70,20 @@ |
4 |
|
|
push(@accounts, $a->get('admin')); |
5 |
|
|
} |
6 |
|
|
else |
7 |
|
|
-{ |
8 |
|
|
- my $userName = shift; |
9 |
|
|
- die "Username argument missing." unless defined ($userName); |
10 |
|
|
- |
11 |
|
|
- $account = $a->get($userName); |
12 |
|
|
- die "Account $userName not found.\n" unless defined $account; |
13 |
|
|
- my $type = $account->prop('type') || "unknown"; |
14 |
|
|
- |
15 |
|
|
- die "Account $userName is not a user, group, ibay, machine account; update LDAP entry failed.\n" |
16 |
|
|
- unless ($type =~ m{^(?:user|group|ibay|machine)$} or $userName eq 'admin'); |
17 |
|
|
- @accounts = ($account); |
18 |
|
|
+{ |
19 |
|
|
+ my @name = @ARGV; |
20 |
|
|
+ die "Account name argument missing." unless scalar (@name) >= 1; |
21 |
|
|
+ |
22 |
|
|
+ foreach my $name (@name) |
23 |
|
|
+ { |
24 |
|
|
+ $account = $a->get($name); |
25 |
|
|
+ die "Account $name not found.\n" unless defined $account; |
26 |
|
|
+ my $type = $account->prop('type') || "unknown"; |
27 |
|
|
+ |
28 |
|
|
+ die "Account $name is not a user, group, ibay, machine account; update LDAP entry failed.\n" |
29 |
|
|
+ unless ($type =~ m{^(?:user|group|ibay|machine)$} or $name eq 'admin'); |
30 |
|
|
+ push @accounts, $account; |
31 |
|
|
+ } |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
#------------------------------------------------------------ |