libselinux: switch to file_contexts.bin

Switch the libselinux android code to load file_contexts.bin
rather than file_contexts.  While the label_file backend already
looks for the .bin file even if the caller only asked for the
text file, the Android-specific code in libselinux also directly
opens the path in order to compute the hash to compare and store
in the security.restorecon_last xattr, and it directly calls
access(2) on the path to confirm that all the expected policy
files exist before using any /data/security policy.  So we need
to change it here as well.

Depends on I75a781100082c23536f70ce3603f7de42408b5ba

Change-Id: I43806d564b83d57f05f5c36c8eba7b1ff4831b04
Signed-off-by: Stephen Smalley <>
1 file changed