• Yuwei Huang's avatar
    [remoting][mac] Reimplement host service script as executable · f9eae99d
    Yuwei Huang authored
    Catalina starts making /bin/sh the responsible process of the host
    service script even if we don't explicitly put sh in the launchd plist
    file, which is bad since the user would be tempted to grant permissions
    to sh and effectively all shell scripts.
    
    This CL reimplements the old script as an executable so that it
    (remoting_me2me_host_service) can become the responsible process and we
    can fallback to the old script with disclaim_responsibility in the
    future. We can technically launch host with disclaim_responsibility to
    make remoting_me2me_host the responsible process, but both of them
    still show up as ChromeRemoteDesktopHost on Preferences, while
    disclaim_responsibility uses an undocumented private API, so I prefer
    not doing so.
    
    The new binary is a drop-in replacement for the old script. The only
    change here is the removal of SIGKILL, SIGSTOP, and SIGCHLD from the
    signal forwarding list, as they are either not catchable or make no
    sense to forward.
    
    Bug: 1013692
    Change-Id: I56eae7116fdc03aeb9bf754164618bcb84ae5ce3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857651
    Commit-Queue: Yuwei Huang <yuweih@chromium.org>
    Reviewed-by: default avatarLambros Lambrou <lambroslambrou@chromium.org>
    Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#705738}
    f9eae99d
BUILD.gn 4.82 KB