def __drop_caps(self): """ drop the CAP_NET_ADMIN capability """ if not self.manage_capabilities: return try: import prctl prctl.set_caps((prctl.CAP_NET_ADMIN, prctl.CAP_EFFECTIVE, False)) except OSError, e: import Zorp.Common as Common Common.log(None, Common.CORE_ERROR, 1, "Unable to drop NET_ADMIN capability; error='%s'" % (e)) raise e
def send_messages_in_transaction(self, messages): try: startTransaction(self.kzorp_handle, self.instance_name) for message in messages: self.kzorp_handle.exchange(message) commitTransaction(self.kzorp_handle) except netlink.NetlinkException as e: import Zorp.Common as Common Common.log( None, Common.CORE_ERROR, 6, "Error occured while downloading zones to kernel; error='%s'" % (e.detail) ) raise e
def send_messages_in_transaction(self, messages): try: startTransaction(self.kzorp_handle, self.instance_name) for message in messages: self.kzorp_handle.exchange(message) commitTransaction(self.kzorp_handle) except netlink.NetlinkException as e: import Zorp.Common as Common Common.log( None, Common.CORE_ERROR, 6, "Error occured while downloading zones to kernel; error='%s'" % (e.detail)) raise e