diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2016-08-10 11:19:44 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:39 +0100 |
commit | 955d6cb60f2a760d555022201586f6006703ff47 (patch) | |
tree | eee86a5dd7da82f56603fb1a996ac96debf38bb9 | |
parent | df6694b7c852c9ac627135d4158b306d90b7273f (diff) | |
download | poky-955d6cb60f2a760d555022201586f6006703ff47.tar.gz |
e2fsprogs: Fix missing check for permission denied.
If the path to "ROOT_SYSCONFDIR /mke2fs.conf" has a permission denied problem,
then the get_dirlist() call will return EACCES. But the code in profile_init
will treat that as a fatal error and all executions will fail with:
Couldn't init profile successfully (error: 13).
But the problem should not really be visible for the target package as the path
then will be "/etc/mke2fs.conf", and it is not likely that a user have no
permission to read /etc.
(From OE-Core rev: 9d7c32a88e0670a09e5e1097ff8bca58e9a7943f)
Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch | 32 | ||||
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb | 2 |
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch new file mode 100644 index 0000000000..33054c61fa --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Subject: [PATCH] Fix missing check for permission denied. | ||
2 | |||
3 | If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem, | ||
4 | then the get_dirlist() call will return EACCES. But the code in profile_init | ||
5 | will treat that as a fatal error and all executions will fail with: | ||
6 | Couldn't init profile successfully (error: 13). | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com> | ||
11 | |||
12 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
13 | --- | ||
14 | lib/support/profile.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/lib/support/profile.c b/lib/support/profile.c | ||
18 | index 51a3314..1c1039f 100644 | ||
19 | --- a/lib/support/profile.c | ||
20 | +++ b/lib/support/profile.c | ||
21 | @@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile) | ||
22 | *last = new_file; | ||
23 | last = &new_file->next; | ||
24 | } | ||
25 | - } else if ((retval != ENOTDIR) && | ||
26 | + } else if ((retval != ENOTDIR) && (retval != EACCES) && | ||
27 | strcmp(*fs, default_filename)) | ||
28 | goto errout; | ||
29 | |||
30 | -- | ||
31 | 2.7.4 | ||
32 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb index e82124bf58..837224cc72 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb | |||
@@ -11,6 +11,8 @@ SRC_URI += "file://acinclude.m4 \ | |||
11 | file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ | 11 | file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \ |
12 | " | 12 | " |
13 | 13 | ||
14 | SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch" | ||
15 | |||
14 | SRCREV = "d6adf070b0e85f209c0d7f310188b134b5cb7180" | 16 | SRCREV = "d6adf070b0e85f209c0d7f310188b134b5cb7180" |
15 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" | 17 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" |
16 | 18 | ||