diff options
author | Elliott Hughes <enh@google.com> | 2019-03-27 09:56:27 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-27 16:05:42 -0500 |
commit | 527045debecb95721f70012ee1a6216b3d149b1e (patch) | |
tree | 618d69dab113670209d772bd018964da78a67b64 /toys/example/demo_utf8towc.c | |
parent | 4eb39e1e3c9454635a8512b51931efe4ba2c14ed (diff) | |
download | toybox-527045debecb95721f70012ee1a6216b3d149b1e.tar.gz |
xabspath: use O_PATH for dirfd.
SELinux on Android is unhappy if you try to read "/":
avc: denied { read } for name="/" dev="dm-3" ino=2 scontext=u:r:hal_dumpstate_impl:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
That could happen via the open of ".." too, and potentially any other
directory might have similar restrictions, so move all of the open calls
to using O_PATH.
O_PATH seems more intention-revealing given what this function is doing anyway.
Diffstat (limited to 'toys/example/demo_utf8towc.c')
0 files changed, 0 insertions, 0 deletions