1 #ifndef ANDROID_PERMS_H
2 # define ANDROID_PERMS_H
5 # include <ext2fs/ext2fs.h>
7 typedef void (*fs_config_f)(const char *path, int dir,
8 const char *target_out_path,
9 unsigned *uid, unsigned *gid,
10 unsigned *mode, uint64_t *capabilities);
13 * Represents a range of UID/GID mapping.
14 * This maps the id in [|parent_id|, |parent_id| + |length|) into
15 * [|child_id|, |child_id| + |length|)
17 struct ugid_map_entry {
18 unsigned int child_id;
19 unsigned int parent_id;
24 /* The number of elements in |entries|. */
27 /* An array of entries. If |size| is 0, this is a null pointer. */
28 struct ugid_map_entry* entries;
32 struct selabel_handle;
33 static inline errcode_t android_configure_fs(ext2_filsys fs,
41 const struct ugid_map* uid_map,
42 const struct ugdi_map* gid_map)
47 # include <selinux/selinux.h>
48 # include <selinux/label.h>
49 # if defined(__ANDROID__)
50 # include <selinux/android.h>
52 # include <private/android_filesystem_config.h>
53 # include <private/canned_fs_config.h>
54 # include <private/fs_config.h>
56 errcode_t android_configure_fs(ext2_filsys fs, char *src_dir,
59 struct selinux_opt *seopts,
61 char *fs_config_file, time_t fixed_time,
62 const struct ugid_map* uid_map,
63 const struct ugid_map* gid_map);
66 #endif /* !ANDROID_PERMS_H */