diff options
-rwxr-xr-x | bitbake/bin/bitbake-worker | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index bf96207edc..3aaf3c2444 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -152,6 +152,10 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha | |||
152 | fakeenv = {} | 152 | fakeenv = {} |
153 | umask = None | 153 | umask = None |
154 | 154 | ||
155 | uid = os.getuid() | ||
156 | gid = os.getgid() | ||
157 | |||
158 | |||
155 | taskdep = workerdata["taskdeps"][fn] | 159 | taskdep = workerdata["taskdeps"][fn] |
156 | if 'umask' in taskdep and taskname in taskdep['umask']: | 160 | if 'umask' in taskdep and taskname in taskdep['umask']: |
157 | umask = taskdep['umask'][taskname] | 161 | umask = taskdep['umask'][taskname] |
@@ -257,6 +261,10 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha | |||
257 | 261 | ||
258 | bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), taskname.replace("do_", ""))) | 262 | bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), taskname.replace("do_", ""))) |
259 | 263 | ||
264 | if not the_data.getVarFlag(taskname, 'network', False): | ||
265 | logger.debug("Attempting to disable network") | ||
266 | bb.utils.disable_network(uid, gid) | ||
267 | |||
260 | # exported_vars() returns a generator which *cannot* be passed to os.environ.update() | 268 | # exported_vars() returns a generator which *cannot* be passed to os.environ.update() |
261 | # successfully. We also need to unset anything from the environment which shouldn't be there | 269 | # successfully. We also need to unset anything from the environment which shouldn't be there |
262 | exports = bb.data.exported_vars(the_data) | 270 | exports = bb.data.exported_vars(the_data) |