OSDN Git Service

Reset access to system properties on reinitialization
authorTom Cherry <tomcherry@google.com>
Wed, 9 Dec 2015 23:48:15 +0000 (15:48 -0800)
committerTom Cherry <tomcherry@google.com>
Fri, 11 Dec 2015 19:16:21 +0000 (11:16 -0800)
commitb417169d80cdf975c71b03de247ea2365e83c229
tree6e80ff774fd361a1f5d3c16ddde63917a632ff1a
parente371ae68ac0d6d39cacf5edc893bda2f4a61e883
Reset access to system properties on reinitialization

Treat subsequent calls to __system_properties_init() as a
reinitialization of system properties and revoke access to prop files
that have been previously mapped but that the process's current context
does not have access to.  Additionally reset the no_access_ flag in
case permissions have loosened and previously unaccessible files can now
be accessed.

This is meant to work around an issue that setcon() does not revoke
mmap() mappings, so we must manually revoke them after a successful
setcon() call.

Bug 26114086

Change-Id: I4d690abb6817283ca64ac26ea4c1dad398a98fbc
libc/bionic/system_properties.cpp