| 1 | |
| 2 | #include <sys/types.h> |
| 3 | #include <unistd.h> |
| 4 | #include <string.h> |
| 5 | #include <stdio.h> |
| 6 | #include <stdlib.h> |
| 7 | #include <stdbool.h> |
| 8 | #include <ctype.h> |
| 9 | #include <errno.h> |
| 10 | #include <pwd.h> |
| 11 | #include <grp.h> |
| 12 | #include <sys/mman.h> |
| 13 | #include <sys/mount.h> |
| 14 | #include <sys/types.h> |
| 15 | #include <sys/stat.h> |
| 16 | #include <sys/xattr.h> |
| 17 | #include <fcntl.h> |
| 18 | #include <fts.h> |
| 19 | #include <selinux/selinux.h> |
| 20 | #include <selinux/context.h> |
| 21 | #include <selinux/android.h> |
| 22 | #include <selinux/label.h> |
| 23 | #include <selinux/avc.h> |
| 24 | #include <openssl/sha.h> |
| 25 | #ifndef __ANDROID_VNDK__ |
| 26 | #include <private/android_filesystem_config.h> |
| 27 | #endif |
| 28 | #include <log/log.h> |
| 29 | #include "policy.h" |
| 30 | #include "callbacks.h" |
| 31 | #include "selinux_internal.h" |
| 32 | #include "label_internal.h" |
| 33 | #include <fnmatch.h> |
| 34 | #include <limits.h> |
| 35 | #include <sys/vfs.h> |
| 36 | #include <linux/magic.h> |
| 37 | #include <libgen.h> |
| 38 | |
| 39 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ |
| 40 | #include <sys/_system_properties.h> |
| 41 | |
| 42 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| 43 | |
| 44 | #define FC_DIGEST_SIZE SHA_DIGEST_LENGTH |