diff options
| author | Nick Kralevich <nnk@google.com> | 2018-10-22 10:18:14 -0500 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2018-10-22 10:18:14 -0500 |
| commit | ad1f2685eb2768dbc2b52a9962d6279aa90a343d (patch) | |
| tree | 4aa04d07fb311fedd81dae4725ea1adbe0c6c66e /tests/files/bc/script.sh | |
| parent | e13985bf81681373fe4337d03382e3c0201912ba (diff) | |
| download | toybox-ad1f2685eb2768dbc2b52a9962d6279aa90a343d.tar.gz | |
Don't call TIOCGWINSZ on non-ttys
Prior to calling TIOCGWINSZ on stdin/stdout/stderr, check to see if the
file descriptor is a tty. Calling TIOCGWINSZ on a non-tty doesn't make
any sense.
Calling TIOCGWINSZ on a non-tty is mildly problematic for systems like
Android where strict ioctl filtering is in place, and generates SELinux
audit noise.
Strict ioctl filtering for non-filesystem fifo_files (eg pipe() or
pipe2() generated pipes) was enabled in Android in commit
https://android-review.googlesource.com/c/platform/system/sepolicy/+/792599
Diffstat (limited to 'tests/files/bc/script.sh')
0 files changed, 0 insertions, 0 deletions
