/[smecontribs]/rpms/smeserver-affa/contribs10/smeserver-affa-fix-config-directory-name-spaces.patch
ViewVC logotype

Annotation of /rpms/smeserver-affa/contribs10/smeserver-affa-fix-config-directory-name-spaces.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Jun 30 21:11:10 2022 UTC (2 years, 4 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-affa-3_3_1-7_el7_sme, smeserver-affa-3_3_1-8_el7_sme, smeserver-affa-3_3_1-11_el7_sme, smeserver-affa-3_3_1-9_el7_sme
* Thu Jun 30 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.3.1-7
- Fix logging parse errors [SME:12084]
- Thanks to 'sti' for finding it

1 jcrisp 1.1 diff -ruN smeserver-affa-3.3.1.old/root/sbin/affa smeserver-affa-3.3.1/root/sbin/affa
2     --- smeserver-affa-3.3.1.old/root/sbin/affa 2021-12-01 10:49:03.264244761 +0000
3     +++ smeserver-affa-3.3.1/root/sbin/affa 2021-12-01 12:18:36.866259431 +0000
4     @@ -926,7 +926,7 @@
5     my @cfgfiles = getConfigFileList(); # only valid ones
6     my @cmd = ( 'echo', '-n', '>', $configfile, ';', 'chmod', '400', $configfile, ';', 'cat' );
7     foreach my $s (@cfgfiles) {
8     - push( @cmd, $s );
9     + push( @cmd, '"'.$s.'"' );
10     }
11     push( @cmd, '>' );
12     push( @cmd, $configfile );
13     @@ -1130,10 +1130,23 @@
14    
15     sub getConfigFileList() {
16     dbg('Fetching list of all config files');
17     - my @cmd = ( 'find', '/etc/affa/', '-type', 'f', '-name', '"*.conf"' );
18     - ExecCmd( @cmd, 0 );
19     - my @ret = ();
20     - my @list = split( /[\r\n]/, $ExecCmdOut );
21     +
22     + my @dirList = qw (/etc/affa/ /etc/affa/conf.d/);
23     + my @ls = ();
24     +
25     + foreach $dir (@dirList) {
26     + if ( -d $dir ) {
27     + my @cmd = (
28     + 'find', "$dir", '-maxdepth 1', '-type', 'f', '-name', '"*.conf"'
29     + );
30     + ExecCmd( @cmd, 0 );
31     + @ls = split( /[\r\n]/, $ExecCmdOut );
32     + @list = (@list, @ls);
33     + }
34     + }
35     +
36     + my @ret = ();
37     +
38     foreach my $s (@list) {
39     my $c = Config::IniFiles->new( -file => $s );
40     if ( not $c ) {

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