MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / restore_etc_hosts

Function restore_etc_hosts

sshuttle/firewall.py:70–74  ·  view source on GitHub ↗
(hostmap, port)

Source from the content-addressed store, hash-verified

68
69
70def restore_etc_hosts(hostmap, port):
71 # Only restore if we added hosts to /etc/hosts previously.
72 if len(hostmap) > 0:
73 debug2('undoing /etc/hosts changes.')
74 rewrite_etc_hosts({}, port)
75
76
77def firewall_exit(signum, frame):

Callers 1

mainFunction · 0.85

Calls 2

debug2Function · 0.90
rewrite_etc_hostsFunction · 0.85

Tested by

no test coverage detected