From: Michael R Sweet Date: Mon, 18 Nov 2019 18:10:09 +0000 (-0500) Subject: Fix up HOME environment variable support on macOS - only exclude containers. X-Git-Tag: v2.3.1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2b97b71f1af53d429479831b30e3ca9bfb83328;p=thirdparty%2Fcups.git Fix up HOME environment variable support on macOS - only exclude containers. --- diff --git a/cups/globals.c b/cups/globals.c index 2ebb7fa5e9..fd41baefe5 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)