]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix up HOME environment variable support on macOS - only exclude containers.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 18 Nov 2019 18:10:09 +0000 (13:10 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 18 Nov 2019 18:21:53 +0000 (13:21 -0500)
cups/globals.c

index 2ebb7fa5e9e9c77147132b8b79a1b1ff513d4312..fd41baefe5150769b119007914a2c2c0fb5c5f72 100644 (file)
@@ -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)