summaryrefslogtreecommitdiff
path: root/azurelinuxagent/common/osutil/default.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2017-07-03 13:44:00 +0200
committerusd-importer <ubuntu-server@lists.ubuntu.com>2017-07-03 12:23:41 +0000
commit43bdf9debe5377216aed0086bff2aad864f6ba82 (patch)
tree2db24e946e7b5b18c302c9d0a41c3e3ac5d52d5e /azurelinuxagent/common/osutil/default.py
parent4fb0b5a09b26135ade285844da5d7dfe582a8d4c (diff)
downloadvyos-walinuxagent-43bdf9debe5377216aed0086bff2aad864f6ba82.tar.gz
vyos-walinuxagent-43bdf9debe5377216aed0086bff2aad864f6ba82.zip
Import patches-unapplied version 2.2.14-0ubuntu1 to ubuntu/artful-proposed
Imported using git-ubuntu import. Changelog parent: 4fb0b5a09b26135ade285844da5d7dfe582a8d4c New changelog entries: * New upstream release (LP: #1701350). * debian/copyright: - Refreshed copyright content.
Diffstat (limited to 'azurelinuxagent/common/osutil/default.py')
-rw-r--r--azurelinuxagent/common/osutil/default.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/azurelinuxagent/common/osutil/default.py b/azurelinuxagent/common/osutil/default.py
index 20dc1f3..58c0ef8 100644
--- a/azurelinuxagent/common/osutil/default.py
+++ b/azurelinuxagent/common/osutil/default.py
@@ -841,18 +841,5 @@ class DefaultOSUtil(object):
def get_processor_cores(self):
return multiprocessing.cpu_count()
- def set_admin_access_to_ip(self, dest_ip):
- #This allows root to access dest_ip
- rm_old= "iptables -D OUTPUT -d {0} -j ACCEPT -m owner --uid-owner 0"
- rule = "iptables -A OUTPUT -d {0} -j ACCEPT -m owner --uid-owner 0"
- shellutil.run(rm_old.format(dest_ip), chk_err=False)
- shellutil.run(rule.format(dest_ip))
-
- #This blocks all other users to access dest_ip
- rm_old = "iptables -D OUTPUT -d {0} -j DROP"
- rule = "iptables -A OUTPUT -d {0} -j DROP"
- shellutil.run(rm_old.format(dest_ip), chk_err=False)
- shellutil.run(rule.format(dest_ip))
-
def check_pid_alive(self, pid):
return pid is not None and os.path.isdir(os.path.join('/proc', pid))