1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
diff --git a/cli/main.c b/cli/main.c
index a1cf90e..3ab2092 100644
--- a/cli/main.c
+++ b/cli/main.c
@@ -1055,7 +1055,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal
{
pkgconf_path_t *pn = n->data;
- if (pkgconf_unveil(pn->path, "r") == -1)
+ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT)
return false;
}
@@ -1063,7 +1063,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal
{
pkgconf_path_t *pn = n->data;
- if (pkgconf_unveil(pn->path, "r") == -1)
+ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT)
return false;
}
@@ -1276,13 +1276,6 @@ main(int argc, char *argv[])
/* now, bring up the client. settings are preserved since the client is prealloced */
pkgconf_client_init(&pkg_client, error_handler, NULL, personality);
- /* unveil the entire search path now that we have loaded the personality data. */
- if (!unveil_search_paths(&pkg_client, personality))
- {
- fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno));
- return EXIT_FAILURE;
- }
-
#ifndef PKGCONF_LITE
if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX || getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL)
want_render_ops = msvc_renderer_get();
@@ -1452,6 +1445,13 @@ main(int argc, char *argv[])
/* at this point, want_client_flags should be set, so build the dir list */
pkgconf_client_dir_list_build(&pkg_client, personality);
+ /* unveil the entire search path now that we have loaded the personality data. */
+ if (!unveil_search_paths(&pkg_client, personality))
+ {
+ fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno));
+ return EXIT_FAILURE;
+ }
+
/* preload any files in PKG_CONFIG_PRELOADED_FILES */
pkgconf_client_preload_from_environ(&pkg_client, "PKG_CONFIG_PRELOADED_FILES");
|