/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11956-rsshusers-ldap.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz11956-rsshusers-ldap.patch

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


Revision 1.1 - (show annotations) (download)
Mon Apr 18 03:20:18 2022 UTC (2 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-base-5_8_1-15_el7_sme, e-smith-base-5_8_1-25_el7_sme, e-smith-base-5_8_1-18_el7_sme, e-smith-base-5_8_1-17_el7_sme, e-smith-base-5_8_1-29_el7_sme, e-smith-base-5_8_1-21_el7_sme, e-smith-base-5_8_1-31_el7_sme, e-smith-base-5_8_1-28_el7_sme, e-smith-base-5_8_1-16_el7_sme, e-smith-base-5_8_1-19_el7_sme, e-smith-base-5_8_1-22_el7_sme, e-smith-base-5_8_1-24_el7_sme, e-smith-base-5_8_1-27_el7_sme, e-smith-base-5_8_1-23_el7_sme, e-smith-base-5_8_1-20_el7_sme, e-smith-base-5_8_1-30_el7_sme, e-smith-base-5_8_1-26_el7_sme, HEAD
* Sun Apr 17 2022 Jean-Philippe Pialasse <tests@pialasse.com> 5.8.1-15.sme
- add rsshusers group to ldap and update it [SME: 11956]

1 diff -Nur --no-dereference e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/user-rsshd e-smith-base-5.8.1/root/etc/e-smith/events/actions/user-rsshd
2 --- e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/user-rsshd 2021-06-06 16:30:37.000000000 -0400
3 +++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/user-rsshd 2022-04-17 23:15:31.401000000 -0400
4 @@ -13,6 +13,13 @@
5 my $conf = esmith::ConfigDB->open_ro;
6 my $accounts = esmith::AccountsDB->open;
7
8 +my $ldapauth = $conf->get('ldap')->prop('Authentication') || 'disabled';
9 +my $x = 0; # exit value
10 +
11 +my $groupName = 'rsshusers';
12 +my $gid = getgrnam($groupName);
13 +my $tmpattr = File::Temp->new();
14 +
15 my $event = $ARGV[0];
16 my $userName = $ARGV[1];
17 # finallement get all user
18 @@ -35,8 +42,16 @@
19 next;
20 }
21 # next if the user is already there
22 + print $tmpattr "memberUid: $cuser\n";
23 next if ( "$cuser" ~~ @currents ) ;
24 print "Adding user $cuser to group rsshusers";
25 system("/usr/sbin/usermod", "-a", "-G", "rsshusers", $cuser);
26
27 }
28 +
29 +# add all users to rsshusers
30 +system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "groupmod", "-a", "$tmpattr", "$groupName") == 0
31 +or
32 +system( "/usr/sbin/cpu", "groupadd", "-g", $gid, "-a", "$tmpattr", $groupName ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255 , warn "Failed to create (ldap) group $groupName.\n" );
33 +
34 +exit ($x);

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