Home
last modified time | relevance | path

Searched refs:scontext (Results 1 – 19 of 19) sorted by relevance

/external/selinux/libsepol/src/
Dcontext.c94 char *scontext = NULL; in context_to_string() local
110 scontext = malloc(scontext_len); in context_to_string()
111 if (!scontext) in context_to_string()
113 scontext[scontext_len - 1] = '\0'; in context_to_string()
118 ptr = scontext; in context_to_string()
131 *result = scontext; in context_to_string()
137 free(scontext); in context_to_string()
150 context_struct_t *scontext = NULL; in context_from_record() local
161 scontext = (context_struct_t *) malloc(sizeof(context_struct_t)); in context_from_record()
162 if (!user || !role || !type || !scontext) { in context_from_record()
[all …]
Dgenusers.c188 char *scontext, *r, *s; local
211 scontext = malloc(p - q);
212 if (!scontext) {
218 r = scontext;
226 r = scontext;
231 ERR(NULL, "invalid level %s (%s:%u)", scontext,
233 free(scontext);
237 free(scontext);
257 scontext = malloc(p - q);
258 if (!scontext) {
[all …]
Dservices.c385 static int constraint_expr_eval_reason(context_struct_t *scontext, in constraint_expr_eval_reason() argument
496 val1 = scontext->user; in constraint_expr_eval_reason()
502 val1 = scontext->type; in constraint_expr_eval_reason()
508 val1 = scontext->role; in constraint_expr_eval_reason()
537 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
543 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
549 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
555 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
561 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
562 l2 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
[all …]
Dmls.c168 const context_struct_t * context, char **scontext) in mls_sid_to_context() argument
178 scontextp = *scontext; in mls_sid_to_context()
250 *scontext = scontextp; in mls_sid_to_context()
332 char oldc, char **scontext, context_struct_t * context) in mls_context_to_sid() argument
349 scontextp = p = *scontext; in mls_context_to_sid()
444 *scontext = ++p; in mls_context_to_sid()
608 context_struct_t * scontext, in mls_compute_sid() argument
624 rtr.source_type = scontext->type; in mls_compute_sid()
639 return mls_context_cpy_low(newcontext, scontext); in mls_compute_sid()
641 return mls_context_cpy_high(newcontext, scontext); in mls_compute_sid()
[all …]
Dmls.h45 char **scontext);
50 char **scontext, context_struct_t * context);
59 context_struct_t * scontext,
/external/selinux/python/sepolgen/tests/
Dtest_audit.py63 self.assertEqual(avc.scontext, sc)
72 self.assertEqual(avc.scontext.user, "user_u")
73 self.assertEqual(avc.scontext.role, "system_r")
74 self.assertEqual(avc.scontext.type, "unconfined_t")
75 self.assertEqual(avc.scontext.level, "s0")
95 self.assertEqual(avc.scontext.user, "user_u")
96 self.assertEqual(avc.scontext.role, "system_r")
97 self.assertEqual(avc.scontext.type, "bluetooth_helper_t")
98 self.assertEqual(avc.scontext.level, "s0-s0:c0")
119 self.assertEqual(avc.scontext.user, "user_u")
[all …]
Daudit.txt1 … avc: denied { dac_read_search } for pid=8132 comm="sh" capability=2 scontext=user_u:system_r:v…
3 … denied { dac_override } for pid=8133 comm="vpnc-script" capability=1 scontext=user_u:system_r:v…
4 …nied { dac_read_search } for pid=8133 comm="vpnc-script" capability=2 scontext=user_u:system_r:v…
6 … denied { dac_override } for pid=8134 comm="vpnc-script" capability=1 scontext=user_u:system_r:v…
7 …nied { dac_read_search } for pid=8134 comm="vpnc-script" capability=2 scontext=user_u:system_r:v…
9 …1): avc: denied { dac_override } for pid=8144 comm="sh" capability=1 scontext=user_u:system_r:v…
10 … avc: denied { dac_read_search } for pid=8144 comm="sh" capability=2 scontext=user_u:system_r:v…
12 … denied { dac_override } for pid=8145 comm="vpnc-script" capability=1 scontext=user_u:system_r:v…
13 …nied { dac_read_search } for pid=8145 comm="vpnc-script" capability=2 scontext=user_u:system_r:v…
15 … denied { dac_override } for pid=8146 comm="vpnc-script" capability=1 scontext=user_u:system_r:v…
[all …]
/external/selinux/python/sepolgen/src/sepolgen/
Daudit.py172 self.scontext = refpolicy.SecurityContext()
226 self.scontext = refpolicy.SecurityContext(fields[1])
247 scontext = self.scontext.to_string()
251 if (scontext, tcontext, self.tclass, access_tuple) in avcdict.keys():
252 self.type, self.data = avcdict[(scontext, tcontext, self.tclass, access_tuple)]
254 … self.type, self.data = audit2why.analyze(scontext, tcontext, self.tclass, self.accesses);
260 raise ValueError("Invalid Source Context %s\n" % scontext)
270 if self.scontext.user != self.tcontext.user:
271 … self.data.append(("user (%s)" % self.scontext.user, 'user (%s)' % self.tcontext.user))
272 if self.scontext.role != self.tcontext.role and self.tcontext.role != "object_r":
[all …]
Dpolicygen.py260 (str(msg.scontext), str(msg.tcontext)))
/external/selinux/python/sepolgen/tests/test_data/
Dhttpd.log1 …ber=DeviceActivationStage dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
2 …ber=DeviceActivationStage dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
3 …anager member=StateChange dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
4 …anager member=StateChange dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
5 …er=DeviceActivationFailed dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
6 …ber=DeviceActivationStage dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
7 …ber=DeviceActivationStage dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
8 …anager member=StateChange dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
9 …r member=DeviceActivating dest=org.freedesktop.DBus spid=6687 tpid=3866 scontext=staff_u:staff_r:s…
10 …r=getProperties dest=org.freedesktop.NetworkManager spid=3866 tpid=6687 scontext=staff_u:staff_r:s…
[all …]
Daudit.log1 …or pid=6314 comm="pam_timestamp_c" name="[96391]" dev=pipefs ino=96391 scontext=staff_u:staff_r:p…
4 … } for pid=6306 comm="beagled" name=".gdmDOM7HT" dev=dm-0 ino=14469552 scontext=staff_u:staff_r:s…
6 …d=6306 comm="beagled" name="max_user_instances" dev=proc ino=-268435218 scontext=staff_u:staff_r:s…
8 …ock-applet" name="bonobo-activation-register.lock" dev=dm-0 ino=5434689 scontext=staff_u:staff_r:s…
10 …ock-applet" name="bonobo-activation-register.lock" dev=dm-0 ino=5434689 scontext=staff_u:staff_r:s…
15 …d { search } for pid=6377 comm="su" name="root" dev=dm-0 ino=13127137 scontext=staff_u:staff_r:s…
17 …te } for pid=6378 comm="xauth" name=".gdmDOM7HT" dev=dm-0 ino=14469552 scontext=staff_u:staff_r:s…
19 …ad } for pid=6378 comm="xauth" name=".gdmDOM7HT" dev=dm-0 ino=14469552 scontext=staff_u:staff_r:s…
21 …tr } for pid=6378 comm="xauth" name=".gdmDOM7HT" dev=dm-0 ino=14469552 scontext=staff_u:staff_r:s…
24 …ed { write } for pid=6377 comm="su" name="root" dev=dm-0 ino=13127137 scontext=staff_u:staff_r:s…
[all …]
Dshort.log1 …or pid=6314 comm="pam_timestamp_c" name="[96391]" dev=pipefs ino=96391 scontext=staff_u:staff_r:p…
4 … } for pid=6306 comm="beagled" name=".gdmDOM7HT" dev=dm-0 ino=14469552 scontext=staff_u:staff_r:s…
6 …d=6306 comm="beagled" name="max_user_instances" dev=proc ino=-268435218 scontext=staff_u:staff_r:s…
8 …ock-applet" name="bonobo-activation-register.lock" dev=dm-0 ino=5434689 scontext=staff_u:staff_r:s…
10 …ock-applet" name="bonobo-activation-register.lock" dev=dm-0 ino=5434689 scontext=staff_u:staff_r:s…
15 …d { search } for pid=6377 comm="su" name="root" dev=dm-0 ino=13127137 scontext=staff_u:staff_r:s…
/external/selinux/python/audit2allow/
Dtest.log2 … avc: denied { write } for comm=local dev=dm-0 name=root.lock pid=10581 scontext=system_u:system_r…
5 …} for pid=13944 comm="automount" name="auto.net" dev=dm-0 ino=16483485 scontext=system_u:system_r…
7 …44:851): avc: denied { name_bind } for pid=21134 comm="httpd" src=81 scontext=system_u:system_r…
9 …:852): avc: denied { name_connect } for pid=21134 comm="smbd" src=81 scontext=system_u:system_r…
11 … search } for pid=24427 comm="vsftpd" name="home" dev=dm-0 ino=9338881 scontext=system_u:system_r…
13 …852): avc: denied { name_connect } for pid=21134 comm="httpd" src=81 scontext=system_u:system_r…
16 …ns } for pid=23768 comm="httpd" name="index.html" dev=dm-0 ino=7996439 scontext=system_u:system_r…
18 …853): avc: denied { name_connect } for pid=21134 comm="httpd" src=81 scontext=system_u:system_r…
20 …853): avc: denied { name_connect } for pid=21134 comm="httpd" src=81 scontext=system_u:system_r…
23 …ecute } for pid=23770 comm="httpd" name="cgi-bin" dev=dm-0 ino=7995597 scontext=system_u:system_r…
[all …]
/external/selinux/gui/
DfcontextPage.py38 def __init__(self, scontext): argument
39 self.scontext = scontext
40 con = scontext.split(":")
48 return self.scontext
153 scontext = store.get_value(iter, TYPE_COL)
154 scon = context(scontext)
/external/selinux/libselinux/src/
Dis_customizable_type.c64 int is_context_customizable(const char * scontext) in is_context_customizable() argument
75 c = context_new(scontext); in is_context_customizable()
Dmatchpathcon.c542 char * scontext = NULL; in selinux_lsetfilecon_default() local
551 if (selabel_lookup_raw(hnd, &scontext, path, st.st_mode)) { in selinux_lsetfilecon_default()
555 rc = lsetfilecon_raw(path, scontext); in selinux_lsetfilecon_default()
556 freecon(scontext); in selinux_lsetfilecon_default()
/external/selinux/libsepol/include/sepol/policydb/
Dservices.h148 sepol_security_context_t * scontext, /* OUT */
155 extern int sepol_context_to_sid(const sepol_security_context_t scontext, /* IN */
/external/selinux/checkpolicy/
Dcheckpolicy.c128 sepol_security_context_t scontext; in print_sid() local
132 rc = sepol_sid_to_context(sid, &scontext, &scontext_len); in print_sid()
136 printf("sid %d -> scontext %s\n", sid, scontext); in print_sid()
137 free(scontext); in print_sid()
385 sepol_security_context_t scontext; in main() local
788 &scontext, &scontext_len); in main()
791 printf("\nscontext %s\n", scontext); in main()
792 free(scontext); in main()
/external/selinux/libselinux/include/selinux/
Dselinux.h618 extern int is_context_customizable(const char * scontext);