!32 BUGFIX: Detecting hostname before acturally executing it

From: @fundawang 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
This commit is contained in:
openeuler-ci-bot 2022-10-17 08:34:02 +00:00 committed by Gitee
commit f758b3c545
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -23,7 +23,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.7.2
Release: 2
Release: 3
Epoch: 2
URL: http://www.postfix.org
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -372,8 +372,12 @@ if [ ! -f %{sslkey} ]; then
fi
if [ ! -f %{sslcert} ]; then
FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
if [ -x %{_bindir}/hostname ] ; then
FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
FQDN=localhost.localdomain
fi
else
FQDN=localhost.localdomain
fi
@ -551,6 +555,12 @@ fi
%{postfix_doc_dir}/README_FILES/*
%changelog
* Fri Sep 30 2022 Funda Wang <fundawang@yeah.net> - 2:3.7.2-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:detect if hostname is executable before executing it
* Tue Sep 13 2022 xingwei <xingwei14@h-partners.com> - 2:3.7.2-2
- Type:bugfix
- ID:NA