/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-add_ibay_machine.patch
ViewVC logotype

Annotation of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-add_ibay_machine.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Sep 25 18:38:04 2010 UTC (14 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-49_el5_sme, e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-71_el5_sme, e-smith-ldap-5_2_0-39_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-50_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, e-smith-ldap-5_2_0-37_el5_sme, e-smith-ldap-5_2_0-61_el5_sme, e-smith-ldap-5_2_0-66_el5_sme, e-smith-ldap-5_2_0-70_el5_sme, e-smith-ldap-5_2_0-79_el5_sme, e-smith-ldap-5_2_0-81_el5_sme, e-smith-ldap-5_2_0-36_el5_sme, e-smith-ldap-5_2_0-59_el5_sme, e-smith-ldap-5_2_0-45_el5_sme, e-smith-ldap-5_2_0-75_el5_sme, e-smith-ldap-5_2_0-46_el5_sme, e-smith-ldap-5_2_0-56_el5_sme, e-smith-ldap-5_2_0-55_el5_sme, e-smith-ldap-5_2_0-57_el5_sme, e-smith-ldap-5_2_0-73_el5_sme, e-smith-ldap-5_2_0-69_el5_sme, e-smith-ldap-5_2_0-48_el5_sme, e-smith-ldap-5_2_0-44_el5_sme, e-smith-ldap-5_2_0-52_el5_sme, e-smith-ldap-5_2_0-51_el5_sme, e-smith-ldap-5_2_0-35_el5_sme, e-smith-ldap-5_2_0-72_el5_sme, e-smith-ldap-5_2_0-34_el5_sme, e-smith-ldap-5_2_0-65_el5_sme, e-smith-ldap-5_2_0-54_el5_sme, e-smith-ldap-5_2_0-53_el5_sme, e-smith-ldap-5_2_0-43_el5_sme, e-smith-ldap-5_2_0-47_el5_sme, e-smith-ldap-5_2_0-40_el5_sme, e-smith-ldap-5_2_0-80_el5_sme, e-smith-ldap-5_2_0-74_el5_sme, e-smith-ldap-5_2_0-41_el5_sme, e-smith-ldap-5_2_0-63_el5_sme, e-smith-ldap-5_2_0-60_el5_sme, e-smith-ldap-5_2_0-62_el5_sme, e-smith-ldap-5_2_0-42_el5_sme, e-smith-ldap-5_2_0-38_el5_sme, e-smith-ldap-5_2_0-68_el5_sme, e-smith-ldap-5_2_0-67_el5_sme, e-smith-ldap-5_2_0-64_el5_sme, HEAD
* Sat Sep 25 2010 Shad L. Lords <slords@mail.com> 5.2.0-34.sme
- Add ibay and machine accounts into ldap [SME: 6236]

1 slords 1.1 diff -up e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.add_ibay_machine e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update
2     --- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.add_ibay_machine 2010-09-25 12:26:55.000000000 -0600
3     +++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-25 12:25:26.000000000 -0600
4     @@ -66,7 +66,7 @@ my $account;
5     my $event = shift || die "Event name must be specified";
6     if ($event eq 'ldap-update')
7     {
8     - @accounts = ($a->users, $a->groups);
9     + @accounts = ($a->users, $a->groups, $a->ibays, $a->get_all_by_prop(type => 'machine'));
10     push(@accounts, $a->get('admin'));
11     }
12     else
13     @@ -78,10 +78,8 @@ else
14     die "Account $userName not found.\n" unless defined $account;
15     my $type = $account->prop('type') || "unknown";
16    
17     - exit (0) if ($type eq 'ibay');
18     -
19     - die "Account $userName is not a user or group account; update LDAP entry failed.\n"
20     - unless (($type eq 'user') || ($type eq 'group') || ($userName eq 'admin'));
21     + die "Account $userName is not a user, group, ibay, machine account; update LDAP entry failed.\n"
22     + unless ($type =~ m{^(?:user|group|ibay|machine)$} or $userName eq 'admin');
23     @accounts = ($account);
24     }
25    
26     @@ -165,13 +163,21 @@ foreach my $acct (@accounts)
27     my $key = $acct->key;
28     my $type = $acct->prop('type');
29     my $desc = undef;
30     + my $dn;
31    
32     - if ($type =~ m{^(?:user|group)$} or $key eq 'admin')
33     + if ($type =~ m{^(?:user|group|ibay|machine)$} or $key eq 'admin')
34     {
35     #------------------------------------------------------------
36     # Do the user portion
37     #------------------------------------------------------------
38     - my $dn = "uid=$key,ou=Users,$base";
39     + if ($type eq 'machine')
40     + {
41     + $dn = "uid=$key,ou=Computers,$base";
42     + }
43     + else
44     + {
45     + $dn = "uid=$key,ou=Users,$base";
46     + }
47     $updates->{$dn}->{objectClass} = ['posixAccount', 'shadowAccount'];
48    
49     # Read information from getent passwd

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed