[MDEV-28170] missing '$' in variable check in wsrep_sst_common script Created: 2022-03-24  Updated: 2022-03-28  Resolved: 2022-03-24

Status: Closed
Project: MariaDB Server
Component/s: Galera, Scripts & Clients
Affects Version/s: 10.6.7, 10.7.3, 10.8.2
Fix Version/s: 10.6.8, 10.7.4, 10.8.3

Type: Bug Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-27181 Galera SST scripts should use ssl_cap... Closed

 Description   

MDEV-27181 introduced a problem in the wsrep_sst_common script which is only hit when using encrypted SST:

/usr//bin/wsrep_sst_common: line 1127: [: readable: integer expression expected

Problem is the readable variable in the if condition, it should be $readable like it is earlier on line 1109 in the same script:

1123     local readable=1; [ ! -r "$cert" ] && readable=0
1124     [ -n "$ca"  ] &&  [ ! -r "$ca"   ] && readable=0
1125     [ -n "$cap" ] &&  [ ! -r "$cap"  ] && readable=0
1126 
1127     if [ readable -eq 0 ]; then
1128         wsrep_log_error \
1129             "Both PEM file and CA file (or path) must be readable"
1130         exit 22
1131     fi



 Comments   
Comment by Hartmut Holzgraefe [ 2022-03-24 ]

Set to "minor" as encrypted SST still works when configured properly, it would only fail if without a proper error message in case some key or certificate file were not readable

Comment by Elena Stepanova [ 2022-03-24 ]

I think sysprg was fixing it recently somewhere, maybe it's not in the release yet.

Comment by Hartmut Holzgraefe [ 2022-03-24 ]

I thought I had still seen it on github head (that's how i found out about related MDEV-27181 in the first place), but now looking again it indeed seems to have been fixed already .... weird ...

Comment by Julius Goryavsky [ 2022-03-24 ]

hholzgra It already fixed & merged with main branch, https://github.com/MariaDB/server/commit/35725df6e2791d19bebf0301bb9fcb6200f5b00d

Comment by Julius Goryavsky [ 2022-03-24 ]

Fixed, https://github.com/MariaDB/server/commit/35725df6e2791d19bebf0301bb9fcb6200f5b00d

Generated at Thu Feb 08 09:58:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.