Home
last modified time | relevance | path

Searched refs:policy_file (Results 1 – 25 of 27) sorted by relevance

12

/external/minijail/
Dsyscall_filter_unittest.cc957 FILE *policy_file = write_policy_to_pipe(policy, strlen(policy)); in TEST_F() local
958 ASSERT_NE(policy_file, nullptr); in TEST_F()
960 policy_file, head_, &arg_blocks_, &labels_, USE_RET_KILL, NO_LOGGING, 0); in TEST_F()
961 fclose(policy_file); in TEST_F()
992 FILE *policy_file = write_policy_to_pipe(policy, strlen(policy)); in TEST_F() local
993 ASSERT_NE(policy_file, nullptr); in TEST_F()
995 policy_file, head_, &arg_blocks_, &labels_, USE_RET_KILL, NO_LOGGING, 0); in TEST_F()
996 fclose(policy_file); in TEST_F()
1060 FILE *policy_file = write_policy_to_pipe(policy, strlen(policy)); in TEST() local
1061 ASSERT_NE(policy_file, nullptr); in TEST()
[all …]
Dsyscall_filter.h33 int compile_file(FILE *policy_file, struct filter_block *head,
37 int compile_filter(FILE *policy_file, struct sock_fprog *prog, int do_ret_trap,
Dsyscall_filter.c483 int compile_file(FILE *policy_file, struct filter_block *head, in compile_file() argument
500 while (getline(&line, &len, policy_file) != -1) { in compile_file()
Dlibminijail.c775 static int parse_seccomp_filters(struct minijail *j, FILE *policy_file) in parse_seccomp_filters() argument
782 if (compile_filter(policy_file, fprog, use_ret_trap, allow_logging)) { in parse_seccomp_filters()
/external/ltp/testcases/kernel/security/tomoyo/
Dtomoyo_policy_memory_test.c41 static const char *policy_file = NULL; variable
53 FILE *fp = fopen(policy_file, "r"); in check_policy_common()
184 policy_file = "/sys/kernel/security/tomoyo/domain_policy"; in domain_policy_test()
187 FILE *fp = fopen(policy_file, "w"); in domain_policy_test()
219 FILE *fp = fopen(policy_file, "w"); in domain_policy_test()
294 policy_file = "/sys/kernel/security/tomoyo/exception_policy"; in exception_policy_test()
297 FILE *fp = fopen(policy_file, "w"); in exception_policy_test()
328 FILE *fp = fopen(policy_file, "w"); in exception_policy_test()
Dtomoyo_policy_io_test.c27 static const char *policy_file = ""; variable
31 FILE *fp = fopen(policy_file, "r"); in try_io()
68 policy_file = proc_policy_domain_policy; in stage_policy_io_test()
114 policy_file = proc_policy_exception_policy; in stage_policy_io_test()
/external/selinux/libsepol/src/
Dwrite.c49 struct policy_file *fp;
53 static int avrule_write_list(avrule_t * avrules, struct policy_file *fp);
55 static int ebitmap_write(ebitmap_t * e, struct policy_file *fp) in ebitmap_write()
100 avtab_ptr_t cur, struct policy_file *fp, in avtab_write_item()
273 static int avtab_write(struct policydb *p, avtab_t * a, struct policy_file *fp) in avtab_write()
349 struct policy_file *fp) in mls_write_semantic_level_helper()
380 struct policy_file *fp) in mls_write_semantic_range_helper()
397 static int mls_write_level(mls_level_t * l, struct policy_file *fp) in mls_write_level()
417 static int mls_write_range_helper(mls_range_t * r, struct policy_file *fp) in mls_write_range_helper()
450 struct policy_file *fp = pd->fp; in sens_write()
[all …]
Dprivate.h65 extern int next_entry(void *buf, struct policy_file *fp, size_t bytes) hidden;
67 struct policy_file *fp) hidden;
68 extern int str_read(char **strp, struct policy_file *fp, size_t len) hidden;
Dpolicydb_public.c20 struct policy_file *pf = &spf->pf; in sepol_policy_file_set_mem()
34 struct policy_file *pf = &spf->pf; in sepol_policy_file_set_fp()
42 struct policy_file *pf = &spf->pf; in sepol_policy_file_get_len()
Dpolicydb.c1755 static int role_set_read(role_set_t * r, struct policy_file *fp) in role_set_read()
1770 static int type_set_read(type_set_t * t, struct policy_file *fp) in type_set_read()
1792 static int mls_read_range_helper(mls_range_t * r, struct policy_file *fp) in mls_read_range_helper()
1850 struct policy_file *fp) in mls_read_semantic_level_helper()
1898 struct policy_file *fp) in mls_read_semantic_range_helper()
1961 policydb_t * p, struct policy_file *fp) in context_read_and_validate()
2001 struct policy_file *fp) in perm_read()
2033 static int common_read(policydb_t * p, hashtab_t h, struct policy_file *fp) in common_read()
2086 int allowxtarget, struct policy_file *fp) in read_cons_helper()
2179 static int class_read(policydb_t * p, hashtab_t h, struct policy_file *fp) in class_read()
[all …]
Dmodule.c40 static int policy_file_seek(struct policy_file *fp, size_t offset) in policy_file_seek()
63 static int policy_file_length(struct policy_file *fp, size_t *out) in policy_file_length()
347 static int read_helper(char *buf, struct policy_file *file, uint32_t bytes) in read_helper()
374 struct policy_file *file, in module_package_read_offsets()
467 struct policy_file *file = &spf->pf; in sepol_module_package_read()
652 struct policy_file *file = &spf->pf; in sepol_module_package_info()
838 static int write_helper(char *data, size_t len, struct policy_file *file) in write_helper()
861 struct policy_file *file = &spf->pf; in sepol_module_package_write()
Dgenbools.c152 struct policy_file pf;
213 struct policy_file pf;
Davtab.c433 int avtab_read_item(struct policy_file *fp, uint32_t vers, avtab_t * a, in avtab_read_item()
585 int avtab_read(avtab_t * a, struct policy_file *fp, uint32_t vers) in avtab_read()
Dservices.c137 struct policy_file pf; in sepol_set_policydb_from_file()
1697 int hidden next_entry(void *buf, struct policy_file *fp, size_t bytes) in next_entry()
1725 struct policy_file *fp) in put_entry()
1759 int hidden str_read(char **strp, struct policy_file *fp, size_t len) in str_read()
1808 struct policy_file file, *fp; in sepol_load_policy()
Dconditional.c572 struct policy_file *fp) in cond_read_bool()
/external/selinux/libsepol/tests/
Dtest-downgrade.c206 struct policy_file f; in read_binary_policy()
218 memset(&f, 0, sizeof(struct policy_file)); in read_binary_policy()
243 struct policy_file f; in write_binary_policy()
264 memset(&f, 0, sizeof(struct policy_file)); in write_binary_policy()
/external/selinux/libselinux/utils/
Dsefcontext_compile.c17 const char *policy_file; variable
24 if (policy_file && sepol_check_context(ctx) < 0) { in validate_context()
317 policy_file = optarg; in main()
341 if (policy_file) { in main()
342 policy_fp = fopen(policy_file, "r"); in main()
346 argv[0], policy_file, strerror(errno)); in main()
352 argv[0], policy_file); in main()
/external/selinux/libsepol/include/sepol/policydb/
Davtab.h121 struct policy_file;
122 extern int avtab_read_item(struct policy_file *fp, uint32_t vers, avtab_t * a,
126 extern int avtab_read(avtab_t * a, struct policy_file *fp, uint32_t vers);
Dpolicydb.h678 typedef struct policy_file { struct
691 struct policy_file pf; argument
696 extern int policydb_read(policydb_t * p, struct policy_file *fp,
699 struct policy_file *fp);
701 extern int policydb_write(struct policydb *p, struct policy_file *pf);
Dconditional.h133 extern int cond_read_bool(policydb_t * p, hashtab_t h, struct policy_file *fp);
/external/libbrillo/policy/tests/
Dlibpolicy_unittest.cc50 base::FilePath policy_file(kPolicyFileAllSet); in TEST() local
53 new MockDevicePolicyImpl(policy_file, key_file, false); in TEST()
172 base::FilePath policy_file(kPolicyFileNoneSet); in TEST() local
175 new MockDevicePolicyImpl(policy_file, key_file, false); in TEST()
/external/selinux/checkpolicy/
Dcheckmodule.c57 struct policy_file f, *fp; in read_binary_policy()
115 struct policy_file pf; in write_binary_policy()
/external/selinux/python/sepolicy/sepolicy/
D__init__.py129 def policy(policy_file): argument
151 _pol = setools.SELinuxPolicy(policy_file)
153 raise ValueError(_("Failed to read %s policy file") % policy_file)
157 policy_file = get_installed_policy() variable
158 policy(policy_file)
/external/selinux/python/audit2allow/
Dsepolgen-ifgen-attr-helper.c148 struct policy_file pf; in load_policy()
/external/selinux/checkpolicy/test/
Ddispol.c399 struct policy_file pf; in main()

12