diff options
author | Ray Strode <rstrode@redhat.com> | 2018-06-04 15:12:01 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-08-13 11:01:42 -0400 |
commit | 10fbdd480bd24b207697934081ef307b641f65f6 (patch) | |
tree | 3e21509f23ba69578dd24aa2470d932c5e7cbbb8 | |
parent | 702d7b16af99db9f5c47553984f0e4a046b64f76 (diff) | |
download | gdm-10fbdd480bd24b207697934081ef307b641f65f6.tar.gz |
session-worker: set PWD for user session
It's possible for the current working directory to be
a symlink. Some programs, and notably, the
get_current_dir_name() libc api use the PWD environment
variable to know the symlink being used (so they don't
use the canonical name that the symlink points to)
This commit makes sure we set PWD in that case, to
allow those programs to show the right path.
-rw-r--r-- | daemon/gdm-session-worker.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c index 2dce5c86..c1d89cab 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c @@ -1392,6 +1392,7 @@ gdm_session_worker_update_environment_from_passwd_info (GdmSessionWorker *worker gdm_session_worker_set_environment_variable (worker, "USER", worker->priv->username); gdm_session_worker_set_environment_variable (worker, "USERNAME", worker->priv->username); gdm_session_worker_set_environment_variable (worker, "HOME", home); + gdm_session_worker_set_environment_variable (worker, "PWD", home); gdm_session_worker_set_environment_variable (worker, "SHELL", shell); } |