selinux rewrite

Change-Id: I95f01e0dfdeace79c0b2be80a382685bcd91b07f