diff options
author | Ray Strode <rstrode@redhat.com> | 2018-06-04 15:12:01 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-06-04 15:18:29 -0400 |
commit | 6ee18f1ac45eeca301a27d97f62b48928070353c (patch) | |
tree | f5906a857cfea8890a76485f4762447ebc579567 | |
parent | 8529e2db49da87284c1733f8db7e2c7cd3b7e47f (diff) | |
download | gdm-6ee18f1ac45eeca301a27d97f62b48928070353c.tar.gz |
session-worker: set PWD for user sessionwip/pwd-fix
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 34b3bf7f..a0a755c6 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); } |