mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 06:32:12 +02:00
sanity.bbclass: show warning when chmod fails
* for some reason this part of: http://patchwork.openembedded.org/patch/102561/ wasn't ever merged. [YOCTO #7669] (From OE-Core rev: 95daa7c26d119ae11f1835ce0e895bbd4a3e9605) Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5702a19f1c
commit
c5aab3f63e
@@ -839,9 +839,12 @@ def check_sanity_everybuild(status, d):
|
||||
else:
|
||||
bb.utils.mkdirhier(tmpdir)
|
||||
# Remove setuid, setgid and sticky bits from TMPDIR
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
|
||||
try:
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
|
||||
os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
|
||||
except OSError:
|
||||
bb.warn("Unable to chmod TMPDIR: %s" % tmpdir)
|
||||
with open(checkfile, "w") as f:
|
||||
f.write(tmpdir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user