Re: [Toybox] [PATCH] xabspath: use O_PATH.

2019-03-27 Thread enh via Toybox
nnk points out that all the opens in xabspath are potentially affected. new patch attached: [PATCH] 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

Re: [Toybox] [PATCH] xabspath: use O_PATH.

2019-03-26 Thread Rob Landley
On 3/26/19 4:56 PM, enh via Toybox wrote: > 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 > > O_PATH seems more intention-revealing

[Toybox] [PATCH] xabspath: use O_PATH.

2019-03-26 Thread enh via Toybox
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 O_PATH seems more intention-revealing anyway. --- lib/xwrap.c | 2 +- 1 file changed, 1