[oe-commits] Phil Blundell : sstate: Set umask to 002 before packaging runs
git at git.openembedded.org
git at git.openembedded.org
Mon Apr 29 13:40:30 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: d8c4f442c41bf3ac5e064630657cd3fa1b5c43b1
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d8c4f442c41bf3ac5e064630657cd3fa1b5c43b1
Author: Phil Blundell <pb at pbcl.net>
Date: Wed Apr 24 13:07:47 2013 +0100
sstate: Set umask to 002 before packaging runs
Otherwise we might end up creating directories under sstate-cache with whatever
random umask has been selected for the task that we're trying to package. This
would be a bad thing since it might result in losing group write access for
newly created dirs, and/or losing group read access for the sstate files
themselves.
Signed-off-by: Phil Blundell <philb at gnu.org>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/classes/sstate.bbclass | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 67ddc46..79d3830 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -532,7 +532,11 @@ python sstate_task_postfunc () {
sstate_install(shared_state, d)
for intercept in shared_state['interceptfuncs']:
bb.build.exec_func(intercept, d)
+ omask = os.umask(002)
+ if omask != 002:
+ bb.note("Using umask 002 (not %0o) for sstate packaging" % omask)
sstate_package(shared_state, d)
+ os.umask(omask)
}
More information about the Openembedded-commits
mailing list