/[smeserver]/rpms/e-smith-radiusd/sme10/e-smith-radiusd-2.6.0-bz11113-bz11155-systemd-update.patch
ViewVC logotype

Contents of /rpms/e-smith-radiusd/sme10/e-smith-radiusd-2.6.0-bz11113-bz11155-systemd-update.patch

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


Revision 1.2 - (show annotations) (download)
Sat Jan 2 05:36:24 2021 UTC (3 years, 9 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-radiusd-2_6_0-20_el7_sme, e-smith-radiusd-2_6_0-13_el7_sme, e-smith-radiusd-2_6_0-23_el7_sme, e-smith-radiusd-2_6_0-17_el7_sme, e-smith-radiusd-2_6_0-19_el7_sme, e-smith-radiusd-2_6_0-22_el7_sme, e-smith-radiusd-2_6_0-12_el7_sme, e-smith-radiusd-2_6_0-21_el7_sme, e-smith-radiusd-2_6_0-16_el7_sme, e-smith-radiusd-2_6_0-14_el7_sme, e-smith-radiusd-2_6_0-18_el7_sme, e-smith-radiusd-2_6_0-15_el7_sme, HEAD
Changes since 1.1: +2 -2 lines
* Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-12.sme
- add Restart=always [SME: 11113]
  change group of pem file to radiusd

1 diff -Nur e-smith-radiusd-2.6.0.old/createlinks e-smith-radiusd-2.6.0/createlinks
2 --- e-smith-radiusd-2.6.0.old/createlinks 2020-12-08 16:06:11.084000000 -0500
3 +++ e-smith-radiusd-2.6.0/createlinks 2020-12-08 21:29:26.020000000 -0500
4 @@ -17,11 +17,15 @@
5 user-lock
6 user-modify
7 user-modify-admin
8 + e-smith-radiusd-update
9 ));
10 }
11 templates2events("/etc/raddb/radiusd.conf", "bootstrap-ldap-save");
12 templates2events("/etc/radiusclient-ng/radiusclient.conf", "bootstrap-console-save");
13
14 +templates2events("/etc/raddb/radiusd.conf", "e-smith-radiusd-update");
15 +templates2events("/etc/radiusclient-ng/radiusclient.conf", "e-smith-radiusd-update");
16 +
17 foreach (qw(
18 raddb/clients.conf
19 raddb/mods-available/eap
20 @@ -38,6 +42,7 @@
21 domain-modify
22 remoteaccess-update
23 ldap-update
24 + e-smith-radiusd-update
25 ));
26 }
27
28 @@ -51,7 +56,8 @@
29 domain-modify
30 remoteaccess-update
31 ldap-update
32 - ));
33 + e-smith-radiusd-update
34 + ));
35 }
36
37 foreach $event ( qw(
38 @@ -70,8 +76,11 @@
39 safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/radiusd");
40 }
41
42 -safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/radiusd");
43 -service_link_enhanced("radiusd", "S90", "7");
44 +$event="e-smith-radiusd-update";
45 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/radiusd");
46 +# systemd-specific action mandatory for this package-update event
47 +event_link("systemd-reload", $event, "89");
48 +event_link("systemd-default", $event, "88");
49
50 # activate modules
51 #safe_symlink("../mods-available/realm", "root/etc/raddb/mods-enabled/realm");
52 diff -Nur e-smith-radiusd-2.6.0.old/root/sbin/e-smith/systemd/radiusd-certificate e-smith-radiusd-2.6.0/root/sbin/e-smith/systemd/radiusd-certificate
53 --- e-smith-radiusd-2.6.0.old/root/sbin/e-smith/systemd/radiusd-certificate 1969-12-31 19:00:00.000000000 -0500
54 +++ e-smith-radiusd-2.6.0/root/sbin/e-smith/systemd/radiusd-certificate 2020-12-08 16:10:24.090000000 -0500
55 @@ -0,0 +1,40 @@
56 +#!/usr/bin/perl -w
57 +
58 +#----------------------------------------------------------------------
59 +# copyright (C) 2005 Mitel Networks Corporation
60 +#
61 +# This program is free software; you can redistribute it and/or modify
62 +# it under the terms of the GNU General Public License as published by
63 +# the Free Software Foundation; either version 2 of the License, or
64 +# (at your option) any later version.
65 +#
66 +# This program is distributed in the hope that it will be useful,
67 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
68 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69 +# GNU General Public License for more details.
70 +#
71 +# You should have received a copy of the GNU General Public License
72 +# along with this program; if not, write to the Free Software
73 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
74 +#
75 +# Technical support for this program is available from Mitel Networks
76 +# Please visit our web site www.mitel.com/sme/ for details.
77 +#----------------------------------------------------------------------
78 +
79 +use esmith::tcpsvd;
80 +use esmith::ConfigDB;
81 +use File::Copy;
82 +
83 +my $c = esmith::ConfigDB->open_ro;
84 +my $s = $c->get('SystemName')->value;
85 +my $d = $c->get('DomainName')->value;
86 +
87 +my $pem = "/etc/raddb/certs/radiusd.pem";
88 +# Now copy system pem file into jail used by stunnel/sslio
89 +copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$")
90 + or die "failed to copy SSL PEM: $!";
91 +chmod 0640, "$pem.$$";
92 +esmith::util::chownFile("root", "radiusd", "$pem.$$");
93 +rename("$pem.$$", "$pem")
94 + or die "failed to rename $pem.$$ to $pem: $!";
95 +
96 diff -Nur e-smith-radiusd-2.6.0.old/root/sbin/e-smith/systemd/radiusd-configure e-smith-radiusd-2.6.0/root/sbin/e-smith/systemd/radiusd-configure
97 --- e-smith-radiusd-2.6.0.old/root/sbin/e-smith/systemd/radiusd-configure 1969-12-31 19:00:00.000000000 -0500
98 +++ e-smith-radiusd-2.6.0/root/sbin/e-smith/systemd/radiusd-configure 2020-12-08 16:09:55.326000000 -0500
99 @@ -0,0 +1,10 @@
100 +#!/bin/sh
101 +
102 +# Ensure that PRNG is adequately seeded.
103 +[ -s /etc/raddb/certs/dh ] ||\
104 + /usr/local/bin/envuidgid stunnel \
105 + /usr/bin/openssl gendh > /etc/raddb/certs/dh
106 +[ -s /etc/raddb/certs/random ] ||\
107 + /usr/local/bin/envuidgid stunnel \
108 + /bin/dd if=/dev/urandom of=/etc/raddb/certs/random bs=1k count=1
109 +
110 diff -Nur e-smith-radiusd-2.6.0.old/root/usr/lib/systemd/system/radiusd.service.d/50-koozali.conf e-smith-radiusd-2.6.0/root/usr/lib/systemd/system/radiusd.service.d/50-koozali.conf
111 --- e-smith-radiusd-2.6.0.old/root/usr/lib/systemd/system/radiusd.service.d/50-koozali.conf 1969-12-31 19:00:00.000000000 -0500
112 +++ e-smith-radiusd-2.6.0/root/usr/lib/systemd/system/radiusd.service.d/50-koozali.conf 2020-12-08 21:09:28.379000000 -0500
113 @@ -0,0 +1,12 @@
114 +[Service]
115 +ExecStartPre=
116 +ExecStartPre=/sbin/e-smith/service-status radiusd
117 +ExecStartPre=/sbin/e-smith/systemd/radiusd-configure
118 +ExecStartPre=/sbin/e-smith/systemd/radiusd-certificate
119 +ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd
120 +ExecStartPre=/usr/sbin/radiusd -C
121 +Restart=always
122 +
123 +[Install]
124 +WantedBy=sme-server.target
125 +

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