[oe-commits] [openembedded-core] 16/61: e2fsprogs: Fix missing check for permission denied.

git at git.openembedded.org git at git.openembedded.org
Fri Sep 23 14:28:23 UTC 2016


rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

commit 49086f40c8068ed504d301ef8f56528fd813e10f
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Wed Aug 10 11:19:44 2016 +0800

    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)
    
    Fixup bb for Krogoth.
    
    Signed-off-by: Jian Liu <jian.liu at windriver.com>
    Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 ...s-fix-missing-check-for-permission-denied.patch | 32 ++++++++++++++++++++++
 meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb   |  3 ++
 2 files changed, 35 insertions(+)

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 0000000..33054c6
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -0,0 +1,32 @@
+Subject: [PATCH] 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).
+
+Upstream-Status: Pending
+
+Written-by: Henrik Wallin <henrik.b.wallin at ericsson.com>
+
+Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
+---
+ lib/support/profile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/support/profile.c b/lib/support/profile.c
+index 51a3314..1c1039f 100644
+--- a/lib/support/profile.c
++++ b/lib/support/profile.c
+@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+ 				*last = new_file;
+ 				last = &new_file->next;
+ 			}
+-		} else if ((retval != ENOTDIR) &&
++		} else if ((retval != ENOTDIR) && (retval != EACCES) &&
+ 			   strcmp(*fs, default_filename))
+ 			goto errout;
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
index 9cde8e4..e372074 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
@@ -10,8 +10,11 @@ SRC_URI += "file://acinclude.m4 \
             file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
 "
 
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
+
 SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544"
 PV = "1.42.99+1.43+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
 
 EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list