diff options
author | Aseda Aboagye <aaboagye@google.com> | 2016-02-02 16:26:29 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-03 15:00:19 -0800 |
commit | 8d3fe8d54d4b4102ab21bec7cb9c87d54a0c52df (patch) | |
tree | 97ccca08292b3e9b36e2e36bf9737b8db51fd311 | |
parent | dfb7901709e846a5b99a33155f27af803e5881a5 (diff) | |
download | chrome-ec-8d3fe8d54d4b4102ab21bec7cb9c87d54a0c52df.tar.gz |
util: ec3po: Change console permissions to 660.
666 gives out permissions to everyone and should be avoided. A
similar change is made in servod.
BUG=None
BRANCH=None
TEST=Run console.py and verify that the created PTY has the
permissions of 660.
Change-Id: Ib58952af5f9681fdc2ef351b2c2ac2ec10109095
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/325493
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rwxr-xr-x | util/ec3po/console.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util/ec3po/console.py b/util/ec3po/console.py index e042da53b1..2a426ac700 100755 --- a/util/ec3po/console.py +++ b/util/ec3po/console.py @@ -768,9 +768,8 @@ def main(argv): # Open a new pseudo-terminal pair (master_pty, user_pty) = pty.openpty() - # Set the permissions to 666. - os.chmod(os.ttyname(user_pty), (stat.S_IROTH | stat.S_IWOTH | - stat.S_IRGRP | stat.S_IWGRP | + # Set the permissions to 660. + os.chmod(os.ttyname(user_pty), (stat.S_IRGRP | stat.S_IWGRP | stat.S_IRUSR | stat.S_IWUSR)) # Create a console. console = Console(master_pty, os.ttyname(user_pty), cmd_pipe_interactive, |