/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz12130-onlySelfHosts.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz12130-onlySelfHosts.patch

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


Revision 1.1 - (show annotations) (download)
Sat Jul 30 02:01:32 2022 UTC (2 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: 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-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
* Fri Jul 29 2022 Jean-Philippe Pialasse <tests@pialasse.com> 5.8.1-17.sme
- no new self signed cert when adding/removing non self hosts [SME: 12130]

1 diff -Nur --no-dereference e-smith-base-5.8.1.old/root/sbin/e-smith/generate-subjectaltnames e-smith-base-5.8.1/root/sbin/e-smith/generate-subjectaltnames
2 --- e-smith-base-5.8.1.old/root/sbin/e-smith/generate-subjectaltnames 2022-07-29 21:53:06.043000000 -0400
3 +++ e-smith-base-5.8.1/root/sbin/e-smith/generate-subjectaltnames 2022-07-29 21:58:42.462000000 -0400
4 @@ -17,13 +17,14 @@
5 #----------------------------------------------------------------------
6
7 use esmith::ConfigDB;
8 +use esmith::HostsDB;
9
10 my $configuration = esmith::ConfigDB->open_ro('configuration')
11 or die "Couldn't open configuration DB\n";
12 my $domains = esmith::ConfigDB->open_ro('domains')
13 or die "Couldn't open domains DB\n";
14
15 -my $hosts = esmith::ConfigDB->open_ro('hosts')
16 +my $hosts = esmith::HostsDB->open_ro()
17 or die "Couldn't open domains DB\n";
18
19 my %results_dict = ();
20 @@ -80,14 +81,18 @@
21 }
22
23 #----------------------------------------------------------------------
24 -# Add all domains defined
25 +# Add all hosts per domains defined
26 #----------------------------------------------------------------------
27 my $AddHosts = $modSSL->prop('AddHosts') || "enabled";
28 if ( $AddHosts eq "enabled" )
29 {
30 - foreach my $host ( $hosts->get_all_by_prop(type => 'host') )
31 + foreach my $domain ($domains->get_all_by_prop(type => 'domain')) #ignore domain-remote
32 {
33 - $results_dict{$host->key} = 1;
34 + foreach my $host ( $hosts->get_hosts_by_domain($domain->key) )
35 + {
36 + next unless (($host->prop('HostType')||'undef') eq 'Self'); #only define self host
37 + $results_dict{$host->key} = 1;
38 + }
39 }
40 }
41

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