diff options
author | Elliott Hughes <enh@google.com> | 2019-12-13 16:15:26 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-12-14 17:36:43 -0600 |
commit | 08b5330e2bbdfe5b79e7571c3bf242c7befe96bd (patch) | |
tree | 85e5d47cea0be1c41041917d1e63e509d3d4c915 /toys/android/restorecon.c | |
parent | b9e621e86b2b6e40c6d7b83e7fe6cd110433f498 (diff) | |
download | toybox-08b5330e2bbdfe5b79e7571c3bf242c7befe96bd.tar.gz |
dirtree.c: avoid spurious EINVAL warnings.
An Android engineer complained that they were seeing this when not
running as root:
$ adb shell ls
ls: ./postinstall: Invalid argument
ls: ./init: Permission denied
ls: ./data_mirror: Invalid argument
ls: ./init.environ.rc: Invalid argument
ls: ./metadata: Invalid argument
acct
adb_keys
apex
From strace, it was here:
newfstatat(4, "adb_keys", 0x7fc67eca88, AT_SYMLINK_NOFOLLOW) = -1 EACCES (Permission denied)
readlinkat(4, "adb_keys", 0x5e843c7720, 4095) = -1 EINVAL (Invalid argument)
So stop looking at st.st_mode (and then deciding to do a readlinkat())
if we didn't actually successfully stat().
Diffstat (limited to 'toys/android/restorecon.c')
0 files changed, 0 insertions, 0 deletions