summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJoël Esponde <joel.esponde@easymile.com>2019-07-18 15:47:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:44:41 +0100
commit1895bf4915931cdeec9c0f7d7b5fbec24eac268f (patch)
tree8f9921aab3754c3753724c34ac8c89f96f90ae7c /meta/classes
parent5a44c8106125c07e350eeafa91fc6e461fecf5eb (diff)
downloadpoky-1895bf4915931cdeec9c0f7d7b5fbec24eac268f.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: fe6546aab208e5fa2e238aa266db0ea66ad520a1) Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@easymile.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 2c44fc1f0d..472d542b11 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1210,7 +1210,8 @@ python populate_packages () {
1210 src = os.path.join(src, p) 1210 src = os.path.join(src, p)
1211 dest = os.path.join(dest, p) 1211 dest = os.path.join(dest, p)
1212 fstat = cpath.stat(src) 1212 fstat = cpath.stat(src)
1213 os.mkdir(dest, fstat.st_mode) 1213 os.mkdir(dest)
1214 os.chmod(dest, fstat.st_mode)
1214 os.chown(dest, fstat.st_uid, fstat.st_gid) 1215 os.chown(dest, fstat.st_uid, fstat.st_gid)
1215 if p not in seen: 1216 if p not in seen:
1216 seen.append(p) 1217 seen.append(p)