summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2018-01-05 06:29:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-05 06:29:13 +0000
commit431ed2baa96538fd48ebc1e7df8454b60b903de1 (patch)
treeea38d4d130fa8915802e790593a3407dc83ae242 /deploy
parent49205e7200afd0ce286d2f685093948cb1f7bf3d (diff)
parent2334b3c550c217308efbaf3f4f22718c3b3d0466 (diff)
Merge "Fix security risks about shell=True"
Diffstat (limited to 'deploy')
-rw-r--r--deploy/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/deploy/utils.py b/deploy/utils.py
index 55fbc53a..d0e67359 100644
--- a/deploy/utils.py
+++ b/deploy/utils.py
@@ -124,10 +124,9 @@ def ipmi_reboot_node(host, user, passwd, boot_source=None):
def run_shell(cmd, check=False):
- process = subprocess.Popen(cmd,
+ process = subprocess.Popen(cmd.split(),
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- shell=True)
+ stderr=subprocess.PIPE)
while process.poll() is None:
LD(process.stdout.readline().strip())