diff options
author | Joël Esponde <joel.esponde@easymile.com> | 2019-06-27 11:12:04 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-28 00:02:44 +0100 |
commit | 0f82b53a650e76e0129fae6ce7581a41d042315b (patch) | |
tree | 08de65400fb1bac703939b2fed2409d0ee551aa0 | |
parent | 9f674a88c781c7092d5b3460922a1579b9fe4bf9 (diff) | |
download | openembedded-core-contrib-0f82b53a650e76e0129fae6ce7581a41d042315b.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.
Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@easymile.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 20d72bba79..cd223a121e 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1216,7 +1216,8 @@ python populate_packages () { src = os.path.join(src, p) dest = os.path.join(dest, p) fstat = cpath.stat(src) - os.mkdir(dest, fstat.st_mode) + os.mkdir(dest) + os.chmod(dest, fstat.st_mode) os.chown(dest, fstat.st_uid, fstat.st_gid) if p not in seen: seen.append(p) |