[cups.general] [patch] preserve another environment variable in backends
Tim Waugh
twaugh at redhat.com
Fri Aug 13 07:50:35 PDT 2004
Hi,
Here is a patch to preserve DBUS_SESSION_BUS_ADDRESS in the
environment when spawning a backend. This is needed for a project we
are working on in which cupsd runs as part of the user session.
Tim.
*/
--- cups-1.1.21rc1/scheduler/job.c 2004-08-13 13:52:10.141616000 +0100
+++ cups-1.1.21rc1/scheduler/job.c 2004-08-11 15:26:34.946349328 -0400
@@ -1210,6 +1210,7 @@
dyld_library_path[1024],/* DYLD_LIBRARY_PATH environment variable */
shlib_path[1024], /* SHLIB_PATH environment variable */
nlspath[1024], /* NLSPATH environment variable */
+ dbus_address[1024], /* DBUS_SESSION_BUS_ADDRESS environment variable */
datadir[1024], /* CUPS_DATADIR environment variable */
fontpath[1050], /* CUPS_FONTPATH environment variable */
vg_args[1024], /* VG_ARGS environment variable */
@@ -1772,6 +1773,12 @@
envp[envc ++] = nlspath;
}
+ if (getenv("DBUS_SESSION_BUS_ADDRESS") != NULL)
+ {
+ snprintf(dbus_address, sizeof(dbus_address), "DBUS_SESSION_BUS_ADDRESS=%s", getenv("DBUS_SESSION_BUS_ADDRESS"));
+ envp[envc ++] = dbus_address;
+ }
+
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(current->attrs, "job-sheets",
More information about the cups
mailing list