mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
dfb7901709
commit
8d3fe8d54d
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user