From 96257edb3d570361edb025923db6fc3a6028b18e Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang Date: Fri, 26 May 2023 22:29:41 +0800 Subject: [PATCH] fix missing quotation in filetransfer.sh Signed-off-by: Qiumiao Zhang (cherry picked from commit 63b73589ae4011d3aa2c518aeaf1c0fe5a8f9e68) --- ...missing-quotation-in-filetransfer.sh.patch | 46 +++++++++++++++++++ install-scripts.spec | 9 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0004-fix-missing-quotation-in-filetransfer.sh.patch diff --git a/0004-fix-missing-quotation-in-filetransfer.sh.patch b/0004-fix-missing-quotation-in-filetransfer.sh.patch new file mode 100644 index 0000000..b38f9be --- /dev/null +++ b/0004-fix-missing-quotation-in-filetransfer.sh.patch @@ -0,0 +1,46 @@ +From b0c97adfda1dd3281e56e0813f9f1198af0b10d0 Mon Sep 17 00:00:00 2001 +From: Qiumiao Zhang +Date: Fri, 26 May 2023 22:24:51 +0800 +Subject: [PATCH] fix missing quotation in filetransfer.sh + +--- + usr/Euler/project/load/filetransfer.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/usr/Euler/project/load/filetransfer.sh b/usr/Euler/project/load/filetransfer.sh +index 7066f25..7aa479d 100644 +--- a/usr/Euler/project/load/filetransfer.sh ++++ b/usr/Euler/project/load/filetransfer.sh +@@ -72,7 +72,7 @@ function mountDirectory() + mountCheckPath="`echo $mountpoint | sed "s/[\/]\{2,\}/\//g" | sed "s/\/$//g"`" + + #check bemountedpoint or mountpoint is already mounted +- if [ -n "` cat /proc/mounts | grep " $mountCheckPath " | grep $bemountedpoint`" ];then ++ if [ -n "`cat /proc/mounts | grep " $mountCheckPath " | grep $bemountedpoint`" ];then + g_LOG_Info "$mountCheckPath has been mounted" + return 1 + fi +@@ -349,16 +349,16 @@ function parseUrl() + TMP_PARAMS=`echo ${serverUrl} | awk -F "?" '{print $2}'` + if [ -n "${TMP_PARAMS}" ]; then + tempPattern=`echo ${TMP_PARAMS} | awk -F "@" '{print $1}'` +- if echo "${tempPattern} | grep -q "^[u|U]=.*$"; then ++ if echo "${tempPattern}" | grep -q "^[u|U]=.*$"; then + userName=`echo ${tempPattern} | awk -F "=" '{print $2}'` +- elif echo "${tempPattern} | grep -q "^[p|P]=.*$"; then ++ elif echo "${tempPattern}" | grep -q "^[p|P]=.*$"; then + password=`echo ${tempPattern} | awk -F "=" '{print $2}'` + fi + + tempPattern=`echo ${TMP_PARAMS} | awk -F "@" '{print $2}'` +- if echo "${tempPattern} | grep -q "^[u|U]=.*$"; then ++ if echo "${tempPattern}" | grep -q "^[u|U]=.*$"; then + userName=`echo ${tempPattern} | awk -F "=" '{print $2}'` +- elif echo "${tempPattern} | grep -q "^[p|P]=.*$"; then ++ elif echo "${tempPattern}" | grep -q "^[p|P]=.*$"; then + password=`echo ${tempPattern} | awk -F "=" '{print $2}'` + fi + +-- +2.27.0 + diff --git a/install-scripts.spec b/install-scripts.spec index 6301f16..7071087 100644 --- a/install-scripts.spec +++ b/install-scripts.spec @@ -3,12 +3,13 @@ Summary: scripts for system installation Group: Applications/System License: MulanPSL-2.0 Version: 1.2 -Release: 7 +Release: 8 SOURCE0: %{name}-%{version}.tar.gz Patch0001: 0001-add-support-for-nvme-disk.patch Patch0002: 0002-support-mbsc.patch Patch0003: 0003-remove-the-executable-permission-of-non-root-users-f.patch +Patch0004: 0004-fix-missing-quotation-in-filetransfer.sh.patch Requires: kernel BuildRequires: dos2unix coreutils findutils @@ -101,6 +102,12 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} %attr(0640,root,root) /etc/sysctl.d/01-euler-printk.conf %changelog +* Fri May 26 2023 zhangqiumiao - 1.2-8 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix missing quotation in filetransfer.sh + * Fri May 5 2023 fengtao - 1.2-7 - Type:bugfix - CVE:NA -- Gitee