Check for sticky bit when checking for executable access.

This commit is contained in:
grossmj committed 2014-06-21 06:53:47 -06:00
1 parent 49506ada3f
commit 14bb12d3fb
3 files changed
+14 -1

No files matched your search

+7
View File
@@ -31,6 +31,7 @@ from gns3server.modules import IModule
from .hypervisor import Hypervisor
from .hypervisor_manager import HypervisorManager
from .dynamips_error import DynamipsError
from ..attic import has_privileged_access
# Nodes
from .nodes.router import Router
@@ -378,12 +379,18 @@ class Dynamips(IModule):
nio.connect(rhost, rport)
elif request["nio"]["type"] == "nio_generic_ethernet":
ethernet_device = request["nio"]["ethernet_device"]
if not has_privileged_access(self._dynamips):
raise DynamipsError("{} has no privileged access to {}.".format(self._dynamips, ethernet_device))
nio = NIO_GenericEthernet(node.hypervisor, ethernet_device)
elif request["nio"]["type"] == "nio_linux_ethernet":
ethernet_device = request["nio"]["ethernet_device"]
if not has_privileged_access(self._dynamips):
raise DynamipsError("{} has no privileged access to {}.".format(self._dynamips, ethernet_device))
nio = NIO_LinuxEthernet(node.hypervisor, ethernet_device)
elif request["nio"]["type"] == "nio_tap":
tap_device = request["nio"]["tap_device"]
if not has_privileged_access(self._dynamips):
raise DynamipsError("{} has no privileged access to {}.".format(self._dynamips, tap_device))
nio = NIO_TAP(node.hypervisor, tap_device)
elif request["nio"]["type"] == "nio_unix":
local_file = request["nio"]["local_file"]