+/*
+ * 'cupsdUpdateEnv()' - Update the environment for the configured directories.
+ */
+
+void
+cupsdUpdateEnv(void)
+{
+ /*
+ * Set common variables...
+ */
+
+#define set_if_undefined(name,value) if (find_env(name) < 0) cupsdSetEnv(name,value)
+
+ set_if_undefined("CUPS_CACHEDIR", CacheDir);
+ set_if_undefined("CUPS_DATADIR", DataDir);
+ set_if_undefined("CUPS_DOCROOT", DocumentRoot);
+ set_if_undefined("CUPS_FONTPATH", FontPath);
+ set_if_undefined("CUPS_REQUESTROOT", RequestRoot);
+ set_if_undefined("CUPS_SERVERBIN", ServerBin);
+ set_if_undefined("CUPS_SERVERROOT", ServerRoot);
+ set_if_undefined("CUPS_STATEDIR", StateDir);
+ set_if_undefined("DYLD_INSERT_LIBRARIES", NULL);
+ set_if_undefined("DYLD_LIBRARY_PATH", NULL);
+ set_if_undefined("HOME", TempDir);
+ set_if_undefined("LD_ASSUME_KERNEL", NULL);
+ set_if_undefined("LD_LIBRARY_PATH", NULL);
+ set_if_undefined("LD_PRELOAD", NULL);
+ set_if_undefined("NLSPATH", NULL);
+ if (find_env("PATH") < 0)
+ cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
+ ":/bin:/usr/bin", ServerBin);
+ set_if_undefined("SERVER_ADMIN", ServerAdmin);
+ set_if_undefined("SHLIB_PATH", NULL);
+ set_if_undefined("SOFTWARE", CUPS_MINIMAL);
+ set_if_undefined("TMPDIR", TempDir);
+ set_if_undefined("TZ", NULL);
+ set_if_undefined("USER", "root");
+ set_if_undefined("VG_ARGS", NULL);
+
+ cupsdSetEnvf("CUPS_MAX_MESSAGE", "%d", CUPSD_SB_BUFFER_SIZE - 1);
+}
+
+