[node-patches] Change in ovirt-node[master]: Guard against evil chars in bridge names

danken at redhat.com danken at redhat.com
Sat Apr 13 19:00:49 UTC 2013


Dan Kenigsberg has uploaded a new change for review.

Change subject: Guard against evil chars in bridge names
......................................................................

Guard against evil chars in bridge names

An evil/buggy application may create bridges or other network devices
with characters that may be misunderstood by the shell. Any application
that uses system(3) must take great care of issues like that.

Change-Id: I0caebe9a0423c6a04ba79bcaf5112ad267e8e377
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
---
M scripts/ovirtnode/network.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/72/13872/1

diff --git a/scripts/ovirtnode/network.py b/scripts/ovirtnode/network.py
index 03fac99..6e83b2d 100644
--- a/scripts/ovirtnode/network.py
+++ b/scripts/ovirtnode/network.py
@@ -24,6 +24,7 @@
 import logging
 import os
 import subprocess
+from pipes import quote
 
 logger = logging.getLogger(__name__)
 
@@ -434,7 +435,7 @@
 def get_system_nics():
     # Re-trigger udev for rhbz#866584
     for sysfspath in glob("/sys/class/net/*"):
-        _functions.system_closefds("udevadm test %s > /dev/null 2> /dev/null" % sysfspath)
+        _functions.system_closefds("udevadm test %s > /dev/null 2> /dev/null" % quote(sysfspath))
 
     client = _functions.gudev.Client(['net'])
     configured_nics = 0


--
To view, visit http://gerrit.ovirt.org/13872
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0caebe9a0423c6a04ba79bcaf5112ad267e8e377
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>



More information about the node-patches mailing list