summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorJoël Esponde <joel.esponde@easymile.com>2019-06-27 09:12:04 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-28 12:28:37 (GMT)
commit0df6cef5258ccd6bd137279aa610b6b1bce43640 (patch)
tree62c8ab267682f61da6db205f2be7272fe1928876 /meta/classes/package.bbclass
parentbfe3012ea4b2c973bd6ca5fa1de1adf51e1a9da4 (diff)
downloadpoky-0df6cef5258ccd6bd137279aa610b6b1bce43640.tar.gz
package.bbclass: fix directories setuid and setgid bits
populate_packages relies on ``mkdir`` to both create a directory and set its permissions. However, ``mkdir`` honors the ``umask`` value. Therefore, some bits may be lost in the operation. In our case, the setgid bit on the directories were lost. This commit fixes this by having a distinct call to create the directory and to set the permissions. (From OE-Core rev: 0f82b53a650e76e0129fae6ce7581a41d042315b) Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@easymile.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 20d72bb..cd223a1 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1216,7 +1216,8 @@ python populate_packages () {
1216 src = os.path.join(src, p) 1216 src = os.path.join(src, p)
1217 dest = os.path.join(dest, p) 1217 dest = os.path.join(dest, p)
1218 fstat = cpath.stat(src) 1218 fstat = cpath.stat(src)
1219 os.mkdir(dest, fstat.st_mode) 1219 os.mkdir(dest)
1220 os.chmod(dest, fstat.st_mode)
1220 os.chown(dest, fstat.st_uid, fstat.st_gid) 1221 os.chown(dest, fstat.st_uid, fstat.st_gid)
1221 if p not in seen: 1222 if p not in seen:
1222 seen.append(p) 1223 seen.append(p)