[systemd-devel] [PATCH] Set WorkinDirectory to $HOME for user session units.

Lennart Poettering lennart at poettering.net
Mon Jul 16 03:48:26 PDT 2012


On Sat, 14.07.12 00:23, Auke Kok (auke-jan.h.kok at intel.com) wrote:

> Change the default WorkingDirectory to $HOME in case running as
> USER_MANAGER. We assume that HOME is set by default for all
> user managers, so looking up pw_dir doesn't make much sense.
> 
> Mount, socket and service units are affected, as these all
> can execute programs and thus the working directory may
> affect how these programs function.

I don't think segfaulting when HOME isn't set is really an option. I
have now applied a different patch that moves this to service_load() (so
that we can properly handle OOM), and uses the new get_home_dir() call I
added.

Please test!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list