From 31a69a2caba08fbd983eaae657faabb054478200 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 12 Dec 2022 13:57:24 +0000 Subject: [PATCH] exports, context: List unexported paths one per line in sorted order This will reduce conflicts when new entries are added. Helps: https://github.com/flatpak/flatpak/issues/5205 Signed-off-by: Simon McVittie (cherry picked from commit cee595763da23d6cc4438a87f7fe018431c4c907) --- common/flatpak-context.c | 22 ++++++++++++++++++++-- common/flatpak-exports.c | 7 ++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/common/flatpak-context.c b/common/flatpak-context.c index c366641e..9a6453d6 100644 --- a/common/flatpak-context.c +++ b/common/flatpak-context.c @@ -2435,8 +2435,26 @@ flatpak_context_make_sandboxed (FlatpakContext *context) } const char *dont_mount_in_root[] = { - ".", "..", "lib", "lib32", "lib64", "bin", "sbin", "usr", "boot", "efi", - "root", "tmp", "etc", "app", "run", "proc", "sys", "dev", "var", NULL + ".", + "..", + "app", + "bin", + "boot", + "dev", + "efi", + "etc", + "lib", + "lib32", + "lib64", + "proc", + "root", + "run", + "sbin", + "sys", + "tmp", + "usr", + "var", + NULL }; static void diff --git a/common/flatpak-exports.c b/common/flatpak-exports.c index c0c6bfc5..178d43a9 100644 --- a/common/flatpak-exports.c +++ b/common/flatpak-exports.c @@ -52,7 +52,12 @@ flatpak_abs_usrmerged_dirs get the same treatment without having to be listed here. */ const char *dont_export_in[] = { - "/usr", "/etc", "/app", "/dev", "/proc", NULL + "/app", + "/dev", + "/etc", + "/proc", + "/usr", + NULL }; static char *