diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-09-14 02:13:17 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-18 11:07:30 +0100 |
commit | aa9e2c73f3987a2dad0d7ba80fbb97994c348a1e (patch) | |
tree | 075ebabfffe1ad715beaa1817d2599867780bf93 /meta/recipes-devtools/e2fsprogs | |
parent | 5a386dcb48f1b5629dcbb317e9107c8df5c27800 (diff) | |
download | poky-aa9e2c73f3987a2dad0d7ba80fbb97994c348a1e.tar.gz |
e2fsprogs: set dir's mode correctly
Fixed:
1) in pkg_postinst task set wanted file permissions:
---> chmod -R 521 "$D/opt/my_folder"
2) generate the rootfs image
Results:
my_folder hasn't correct permissions on rootfs ext4 image -> permissions are changed to 721
But it should be 521.
[YOCTO #11652]
(From OE-Core rev: 8627329341e5a9e7cf6f070778381635cebc0da6)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs')
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch | 41 | ||||
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch new file mode 100644 index 0000000000..fc4a540986 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From f6d188580c2c9599319076fee22f2424652c711c Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 13 Sep 2017 19:55:35 -0700 | ||
4 | Subject: [PATCH] misc/create_inode.c: set dir's mode correctly | ||
5 | |||
6 | The dir's mode has been set by ext2fs_mkdir() with umask, so | ||
7 | reset it to the source's mode in set_inode_extra(). | ||
8 | |||
9 | Fixed when source dir's mode is 521, but tarball would be 721, this was | ||
10 | incorrect. | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
15 | --- | ||
16 | misc/create_inode.c | 9 ++++++++- | ||
17 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/misc/create_inode.c b/misc/create_inode.c | ||
20 | index 8ce3faf..50fbaa8 100644 | ||
21 | --- a/misc/create_inode.c | ||
22 | +++ b/misc/create_inode.c | ||
23 | @@ -116,7 +116,14 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino, | ||
24 | |||
25 | inode.i_uid = st->st_uid; | ||
26 | inode.i_gid = st->st_gid; | ||
27 | - inode.i_mode |= st->st_mode; | ||
28 | + /* | ||
29 | + * The dir's mode has been set by ext2fs_mkdir() with umask, so | ||
30 | + * reset it to the source's mode | ||
31 | + */ | ||
32 | + if S_ISDIR(st->st_mode) | ||
33 | + inode.i_mode = LINUX_S_IFDIR | st->st_mode; | ||
34 | + else | ||
35 | + inode.i_mode |= st->st_mode; | ||
36 | inode.i_atime = st->st_atime; | ||
37 | inode.i_mtime = st->st_mtime; | ||
38 | inode.i_ctime = st->st_ctime; | ||
39 | -- | ||
40 | 2.10.2 | ||
41 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb index fb02d796a7..7fba8eb0c4 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | |||
@@ -9,6 +9,7 @@ SRC_URI += "file://acinclude.m4 \ | |||
9 | file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ | 9 | file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ |
10 | file://mkdir_p.patch \ | 10 | file://mkdir_p.patch \ |
11 | file://reproducible-doc.patch \ | 11 | file://reproducible-doc.patch \ |
12 | file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch" | 15 | SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch" |