summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/sanity.bbclass5
-rwxr-xr-xscripts/oe-setup-builddir1
2 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ef90fc82b5..2864318632 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -686,6 +686,7 @@ def check_sanity_version_change(status, d):
686 status.addresult(check_not_nfs(tmpdir, "TMPDIR")) 686 status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
687 687
688def check_sanity_everybuild(status, d): 688def check_sanity_everybuild(status, d):
689 import os, stat
689 # Sanity tests which test the users environment so need to run at each build (or are so cheap 690 # Sanity tests which test the users environment so need to run at each build (or are so cheap
690 # it makes sense to always run them. 691 # it makes sense to always run them.
691 692
@@ -839,6 +840,10 @@ def check_sanity_everybuild(status, d):
839 status.addresult("Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir) 840 status.addresult("Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir)
840 else: 841 else:
841 bb.utils.mkdirhier(tmpdir) 842 bb.utils.mkdirhier(tmpdir)
843 # Remove setuid, setgid and sticky bits from TMPDIR
844 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
845 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
846 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
842 with open(checkfile, "w") as f: 847 with open(checkfile, "w") as f:
843 f.write(tmpdir) 848 f.write(tmpdir)
844 849
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index add0b50e25..f5b7e4e2d0 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -24,6 +24,7 @@ if [ -z "$BUILDDIR" ]; then
24fi 24fi
25 25
26mkdir -p "$BUILDDIR/conf" 26mkdir -p "$BUILDDIR/conf"
27chmod -R -st "$BUILDDIR"
27 28
28if [ ! -d "$BUILDDIR" ]; then 29if [ ! -d "$BUILDDIR" ]; then
29 echo >&2 "Error: The builddir ($BUILDDIR) does not exist!" 30 echo >&2 "Error: The builddir ($BUILDDIR) does not exist!"