Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: remoting/host/installer/linux/debian/chrome-remote-desktop.init

Issue 2939263003: Add support for CRD user-session to operate setuid (Closed)
Patch Set: Address review feedback Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 ### BEGIN INIT INFO 3 ### BEGIN INIT INFO
4 # Provides: chrome-remote-desktop 4 # Provides: chrome-remote-desktop
5 # Required-Start: $remote_fs $syslog 5 # Required-Start: $remote_fs $syslog
6 # Required-Stop: $remote_fs $syslog 6 # Required-Stop: $remote_fs $syslog
7 # Default-Start: 2 3 4 5 7 # Default-Start: 2 3 4 5
8 # Default-Stop: 0 1 6 8 # Default-Stop: 0 1 6
9 # Short-Description: Chrome Remote Desktop service 9 # Short-Description: Chrome Remote Desktop service
10 ### END INIT INFO 10 ### END INIT INFO
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 # sudo with the specified action flag. 55 # sudo with the specified action flag.
56 run_and_ignore_error() { 56 run_and_ignore_error() {
57 user="$1" 57 user="$1"
58 action="$2" 58 action="$2"
59 59
60 set +e 60 set +e
61 if [ "$action" = "--start" ]; then 61 if [ "$action" = "--start" ]; then
62 # TODO(rkjnsn): Support starting user-initiated sessions with our PAM 62 # TODO(rkjnsn): Support starting user-initiated sessions with our PAM
63 # wrapper. 63 # wrapper.
64 if [ "$(whoami)" = "root" ]; then 64 if [ "$(whoami)" = "root" ]; then
65 "$USER_SESSION_PATH" --user="$user" --me2me-script="$HOST_PATH" 65 "$USER_SESSION_PATH" start "$user"
66 else 66 else
67 sudo -u "$user" --login --background "$HOST_PATH" --start 67 sudo -u "$user" --login --background "$HOST_PATH" --start
68 fi 68 fi
69 else 69 else
70 sudo -u "$user" "$HOST_PATH" "$action" 70 sudo -u "$user" "$HOST_PATH" "$action"
71 fi 71 fi
72 } 72 }
73 73
74 do_start() { 74 do_start() {
75 log_begin_msg "Starting Chrome Remote Desktop host for $1..." 75 log_begin_msg "Starting Chrome Remote Desktop host for $1..."
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 for_each_user do_restart 119 for_each_user do_restart
120 ;; 120 ;;
121 121
122 *) 122 *)
123 log_success_msg "Usage: /etc/init.d/chrome-remote-desktop" \ 123 log_success_msg "Usage: /etc/init.d/chrome-remote-desktop" \
124 "{start|stop|reload|force-reload|restart}" 124 "{start|stop|reload|force-reload|restart}"
125 exit 1 125 exit 1
126 esac 126 esac
127 127
128 exit 0 128 exit 0
OLDNEW
« no previous file with comments | « no previous file | remoting/host/linux/remoting_user_session.cc » ('j') | remoting/host/linux/remoting_user_session.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698