From f2fbdf618f29bdffe453a334aec2aa6ff0b0c6ba Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 22 May 2014 13:06:29 -0600 Subject: [PATCH] Fixes privileged access checks for IOU. --- gns3server/modules/iou/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/iou/__init__.py b/gns3server/modules/iou/__init__.py index ac412913..0b04574a 100644 --- a/gns3server/modules/iou/__init__.py +++ b/gns3server/modules/iou/__init__.py @@ -643,14 +643,13 @@ class IOU(IModule): nio = NIO_UDP(lport, rhost, rport) elif request["nio"]["type"] == "nio_tap": tap_device = request["nio"]["tap_device"] - if not self.has_privileged_access(self._iouyap, tap_device): + if not has_privileged_access(self._iouyap, tap_device): raise IOUError("{} has no privileged access to {}.".format(self._iouyap, tap_device)) nio = NIO_TAP(tap_device) elif request["nio"]["type"] == "nio_generic_ethernet": ethernet_device = request["nio"]["ethernet_device"] - if not self.has_privileged_access(self._iouyap, ethernet_device): + if not has_privileged_access(self._iouyap, ethernet_device): raise IOUError("{} has no privileged access to {}.".format(self._iouyap, ethernet_device)) - self._check_for_privileged_access(ethernet_device) nio = NIO_GenericEthernet(ethernet_device) if not nio: raise IOUError("Requested NIO does not exist or is not supported: {}".format(request["nio"]["type"]))