On Mon, Jun 18, 2018 at 02:59:50PM -0700, Mark Salyzyn wrote:This is true of the callers that make adjustments (in Android's Case this is an su context provided to the adb tool for sync and push). More importantly the large variety of callers have the passive/read MAC credentials for their domain set of files; where the mounter/creator does not.
So in this system all callers are priviliged and have the capability to
mknod and set trusted xattrs.
(Amir mentioned the reason why we switch
creds). If not, then file unlink (Should do mknod), lower non-empty directory
rename (should set trusted REDIRECT) and bunch of other operations should fail.