blob: 92bd0d0c1ff16fb119ede4ad23a2bb34cb065970 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From cce489c96aa3f4272a19d2137c2a46b439636712 Mon Sep 17 00:00:00 2001
Brad Bishop316dfdd2018-06-25 12:45:53 -04002From: Jackie Huang <jackie.huang@windriver.com>
3Date: Wed, 10 Aug 2016 11:19:44 +0800
Patrick Williamsc0f7c042017-02-23 20:41:17 -06004Subject: [PATCH] Fix missing check for permission denied.
5
6If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
7then the get_dirlist() call will return EACCES. But the code in profile_init
8will treat that as a fatal error and all executions will fail with:
9 Couldn't init profile successfully (error: 13).
10
11Upstream-Status: Pending
12
13Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
14
15Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040016
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017---
18 lib/support/profile.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/lib/support/profile.c b/lib/support/profile.c
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050022index f54739e7..53ea68f1 100644
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023--- a/lib/support/profile.c
24+++ b/lib/support/profile.c
Brad Bishop316dfdd2018-06-25 12:45:53 -040025@@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile)
Patrick Williamsc0f7c042017-02-23 20:41:17 -060026 *last = new_file;
27 last = &new_file->next;
28 }
29- } else if ((retval != ENOTDIR) &&
30+ } else if ((retval != ENOTDIR) && (retval != EACCES) &&
31 strcmp(*fs, default_filename))
32 goto errout;
33