Home
last modified time | relevance | path

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

12

/external/minijail/
Dsyscall_filter_unittest.cc47 FILE* policy_file, in test_compile_filter() argument
51 return compile_filter(filename.c_str(), policy_file, prog, do_ret_trap, in test_compile_filter()
57 FILE* policy_file, in test_compile_file() argument
64 return compile_file(filename.c_str(), policy_file, head, arg_blocks, labels, in test_compile_file()
1117 FILE* policy_file = write_policy_to_pipe(policy); in TEST_F() local
1118 ASSERT_NE(policy_file, nullptr); in TEST_F()
1119 int res = test_compile_file("policy", policy_file, head_, &arg_blocks_, in TEST_F()
1121 fclose(policy_file); in TEST_F()
1134 FILE* policy_file = write_policy_to_pipe(policy); in TEST_F() local
1135 ASSERT_NE(policy_file, nullptr); in TEST_F()
[all …]
Dsyscall_filter.h39 int compile_file(const char *filename, FILE *policy_file,
43 int compile_filter(const char *filename, FILE *policy_file,
Dsyscall_filter.c541 int compile_file(const char *filename, FILE *policy_file, in compile_file() argument
564 while (getmultiline(&line, &len, policy_file) != -1) { in compile_file()
/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/libbrillo/policy/tests/
Dlibpolicy_unittest.cc47 base::FilePath policy_file(kPolicyFileAllSet); in TEST() local
53 policy_file, key_file, false)); in TEST()
206 base::FilePath policy_file(kPolicyFileNoneSet); in TEST() local
213 policy_file, key_file, false)); in TEST()
264 base::FilePath policy_file(kNonExistingFile); in TEST() local
270 policy_file, key_file, true)); in TEST()
280 base::FilePath policy_file(kPolicyFileAllSet); in TEST() local
286 policy_file, key_file, false)); in TEST()
296 base::FilePath policy_file(kPolicyFileAllSet); in TEST() local
303 policy_file, key_file, false)); in TEST()
[all …]
/external/selinux/libsepol/src/
Dwrite.c50 struct policy_file *fp;
55 avrule_t * avrules, struct policy_file *fp);
57 static int ebitmap_write(ebitmap_t * e, struct policy_file *fp) in ebitmap_write()
102 avtab_ptr_t cur, struct policy_file *fp, in avtab_write_item()
275 static int avtab_write(struct policydb *p, avtab_t * a, struct policy_file *fp) in avtab_write()
351 struct policy_file *fp) in mls_write_semantic_level_helper()
382 struct policy_file *fp) in mls_write_semantic_range_helper()
399 static int mls_write_level(mls_level_t * l, struct policy_file *fp) in mls_write_level()
419 static int mls_write_range_helper(mls_range_t * r, struct policy_file *fp) in mls_write_range_helper()
452 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()
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()
Dpolicydb.c1801 static int role_set_read(role_set_t * r, struct policy_file *fp) in role_set_read()
1816 static int type_set_read(type_set_t * t, struct policy_file *fp) in type_set_read()
1838 static int mls_read_range_helper(mls_range_t * r, struct policy_file *fp) in mls_read_range_helper()
1896 struct policy_file *fp) in mls_read_semantic_level_helper()
1944 struct policy_file *fp) in mls_read_semantic_range_helper()
2007 policydb_t * p, struct policy_file *fp) in context_read_and_validate()
2047 struct policy_file *fp) in perm_read()
2079 static int common_read(policydb_t * p, hashtab_t h, struct policy_file *fp) in common_read()
2132 int allowxtarget, struct policy_file *fp) in read_cons_helper()
2225 static int class_read(policydb_t * p, hashtab_t h, struct policy_file *fp) in class_read()
[all …]
Dgenbools.c163 struct policy_file pf;
224 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.c138 struct policy_file pf; in sepol_set_policydb_from_file()
1698 int hidden next_entry(void *buf, struct policy_file *fp, size_t bytes) in next_entry()
1726 struct policy_file *fp) in put_entry()
1760 int hidden str_read(char **strp, struct policy_file *fp, size_t len) in str_read()
1809 struct policy_file file, *fp; in sepol_load_policy()
/external/selinux/libsepol/tests/
Dtest-downgrade.c206 struct policy_file f; in read_binary_policy()
217 memset(&f, 0, sizeof(struct policy_file)); in read_binary_policy()
241 struct policy_file f; in write_binary_policy()
262 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.h694 typedef struct policy_file { struct
707 struct policy_file pf; argument
712 extern int policydb_read(policydb_t * p, struct policy_file *fp,
715 struct policy_file *fp);
717 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/selinux/python/sepolicy/sepolicy/
D__init__.py149 def policy(policy_file): argument
171 _pol = setools.SELinuxPolicy(policy_file)
173 raise ValueError(_("Failed to read %s policy file") % policy_file)
176 policy_file = get_store_policy(store)
177 if not policy_file:
179 policy(policy_file)
182 policy_file = get_installed_policy() variable
183 policy(policy_file)
/external/minijail/tools/
Dcompiler_unittest.py45 with tempfile.NamedTemporaryFile(mode='w') as policy_file:
46 policy_file.write(line)
47 policy_file.flush()
50 parsed_policy = policy_parser.parse_file(policy_file.name)
Dparser.py680 with open(filename) as policy_file:
681 for tokens in self._parser_state.tokenize(policy_file):
/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/audit2allow/
Dsepolgen-ifgen-attr-helper.c148 struct policy_file pf; in load_policy()
/external/autotest/client/cros/enterprise/
Denterprise_policy_base.py593 policy_file = os.path.join(self.enterprise_dir,
596 with open(policy_file) as f:

12