diff options
author | lambroslambrou <lambroslambrou@chromium.org> | 2014-10-07 11:08:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 18:09:14 +0000 |
commit | 5c4a6c0c5d21856674a42db5397b9324aa20ec5f (patch) | |
tree | 1c8d975269675221d4e9296052feb89fd5b03ffd /remoting/host | |
parent | 2a196c144eff99fb41465e031fcad39465e16d2f (diff) | |
download | chromium_src-5c4a6c0c5d21856674a42db5397b9324aa20ec5f.zip chromium_src-5c4a6c0c5d21856674a42db5397b9324aa20ec5f.tar.gz chromium_src-5c4a6c0c5d21856674a42db5397b9324aa20ec5f.tar.bz2 |
Linux Chromoting: Run session script with '/bin/sh', not $SHELL.
BUG=415752
NOTRY=true
Review URL: https://codereview.chromium.org/630963004
Cr-Commit-Position: refs/heads/master@{#298523}
Diffstat (limited to 'remoting/host')
-rwxr-xr-x | remoting/host/linux/linux_me2me_host.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py index 082ecc0..525af8c 100755 --- a/remoting/host/linux/linux_me2me_host.py +++ b/remoting/host/linux/linux_me2me_host.py @@ -558,17 +558,16 @@ def choose_x_session(): for startup_file in XSESSION_FILES: startup_file = os.path.expanduser(startup_file) if os.path.exists(startup_file): - # Use the same logic that a Debian system typically uses with ~/.xsession - # (see /etc/X11/Xsession.d/50x11-common_determine-startup), to determine - # exactly how to run this file. if os.access(startup_file, os.X_OK): # "/bin/sh -c" is smart about how to execute the session script and # works in cases where plain exec() fails (for example, if the file is # marked executable, but is a plain script with no shebang line). return ["/bin/sh", "-c", pipes.quote(startup_file)] else: - shell = os.environ.get("SHELL", "sh") - return [shell, startup_file] + # If this is a system-wide session script, it should be run using the + # system shell, ignoring any login shell that might be set for the + # current user. + return ["/bin/sh", startup_file] # Choose a session wrapper script to run the session. On some systems, # /etc/X11/Xsession fails to load the user's .profile, so look for an |