From b2b97b71f1af53d429479831b30e3ca9bfb83328 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 18 Nov 2019 13:10:09 -0500 Subject: Fix up HOME environment variable support on macOS - only exclude containers. --- cups/globals.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cups') 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) -- cgit v1.2.1