summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-11-18 13:10:09 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-11-18 13:21:53 -0500
commitb2b97b71f1af53d429479831b30e3ca9bfb83328 (patch)
tree23fe2357a607df9671a3fa259b21a0161b401d01 /cups
parentf4a99aeb0252068ee78bf2158fb01fef6f4599ca (diff)
downloadcups-b2b97b71f1af53d429479831b30e3ca9bfb83328.tar.gz
Fix up HOME environment variable support on macOS - only exclude containers.
Diffstat (limited to 'cups')
-rw-r--r--cups/globals.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cups/globals.c b/cups/globals.c
index 2ebb7fa5e..fd41baefe 100644
--- a/cups/globals.c
+++ b/cups/globals.c
@@ -314,9 +314,12 @@ cups_globals_alloc(void)
if ((cg->localedir = getenv("LOCALEDIR")) == NULL)
cg->localedir = CUPS_LOCALEDIR;
-# ifndef __APPLE__ /* Sandboxing now exposes the container as the home directory */
cg->home = getenv("HOME");
-#endif /* !__APPLE__ */
+
+# ifdef __APPLE__ /* Sandboxing now exposes the container as the home directory */
+ if (cg->home && strstr(cg->home, "/Library/Containers/"))
+ cg->home = NULL;
+# endif /* !__APPLE__ */
}
if (!cg->home)