MCPcopy Create free account
hub / github.com/apenwarr/sshuttle / _fill_oldctls

Function _fill_oldctls

firewall.py:135–146  ·  view source on GitHub ↗
(prefix)

Source from the content-addressed store, hash-verified

133
134_oldctls = {}
135def _fill_oldctls(prefix):
136 argv = ['sysctl', prefix]
137 p = ssubprocess.Popen(argv, stdout = ssubprocess.PIPE)
138 for line in p.stdout:
139 assert(line[-1] == '\n')
140 (k,v) = line[:-1].split(': ', 1)
141 _oldctls[k] = v
142 rv = p.wait()
143 if rv:
144 raise Fatal('%r returned %d' % (argv, rv))
145 if not line:
146 raise Fatal('%r returned no data' % (argv,))
147
148
149KERNEL_FLAGS_PATH = '/Library/Preferences/SystemConfiguration/com.apple.Boot'

Callers 1

sysctl_setFunction · 0.85

Calls 2

waitMethod · 0.95
FatalClass · 0.85

Tested by

no test coverage detected