Fix filename expansion in vsftpd_conf_migrate.sh ... again

We need to run 'shopt -s nullglob', otherwise the glob pattern
will expand to itself if no matching files exist.
This commit is contained in:
Ondřej Lysoněk 2018-06-01 22:38:48 +02:00
parent f2b42b7996
commit 81c7e83b2e
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Name: vsftpd
Version: 3.0.3
Release: 23%{?dist}
Release: 24%{?dist}
Summary: Very Secure Ftp Daemon
Group: System Environment/Daemons
@ -153,6 +153,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_var}/ftp/pub
%{_var}/ftp
%changelog
* Fri Jun 01 2018 Ondřej Lysoněk <olysonek@redhat.com> - 3.0.3-24
- Fix filename expansion in vsftpd_conf_migrate.sh ... again
* Thu May 10 2018 Ondřej Lysoněk <olysonek@redhat.com> - 3.0.3-23
- Fix issues found by Coverity Scan

View File

@ -1,6 +1,7 @@
#!/bin/bash
#move old config files and symlink them
#shipped with vsftpd-2.0.1-6
shopt -s nullglob
PREFIX="vsftpd"
for file in /etc/${PREFIX}.*; do
if [ ! -L $file ]; then