Home
last modified time | relevance | path

Searched refs:scontext (Results 1 – 23 of 23) 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.c386 static int constraint_expr_eval_reason(context_struct_t *scontext, in constraint_expr_eval_reason() argument
497 val1 = scontext->user; in constraint_expr_eval_reason()
503 val1 = scontext->type; in constraint_expr_eval_reason()
509 val1 = scontext->role; in constraint_expr_eval_reason()
538 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
544 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
550 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
556 l1 = &(scontext->range.level[1]); in constraint_expr_eval_reason()
562 l1 = &(scontext->range.level[0]); in constraint_expr_eval_reason()
563 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/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/sepolgen/src/sepolgen/
Daudit.py173 self.scontext = refpolicy.SecurityContext()
228 self.scontext = refpolicy.SecurityContext(fields[1])
254 scontext = self.scontext.to_string()
258 if (scontext, tcontext, self.tclass, access_tuple) in avcdict.keys():
259 self.type, self.data = avcdict[(scontext, tcontext, self.tclass, access_tuple)]
261 self.type, self.data = audit2why.analyze(scontext, tcontext, self.tclass, self.accesses)
267 raise ValueError("Invalid Source Context %s\n" % scontext)
277 if self.scontext.user != self.tcontext.user:
278 … self.data.append(("user (%s)" % self.scontext.user, 'user (%s)' % self.tcontext.user))
279 if self.scontext.role != self.tcontext.role and self.tcontext.role != "object_r":
[all …]
Dpolicygen.py289 (str(msg.scontext), str(msg.tcontext)))
/external/selinux/python/sepolgen/tests/
Dtest_audit.py75 self.assertEqual(avc.scontext, sc)
85 self.assertEqual(avc.scontext.user, "user_u")
86 self.assertEqual(avc.scontext.role, "system_r")
87 self.assertEqual(avc.scontext.type, "unconfined_t")
88 self.assertEqual(avc.scontext.level, "s0")
131 self.assertEqual(avc.scontext.user, "user_u")
132 self.assertEqual(avc.scontext.role, "system_r")
133 self.assertEqual(avc.scontext.type, "bluetooth_helper_t")
134 self.assertEqual(avc.scontext.level, "s0-s0:c0")
155 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/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.py35 def __init__(self, scontext): argument
36 self.scontext = scontext
37 con = scontext.split(":")
45 return self.scontext
150 scontext = store.get_value(iter, TYPE_COL)
151 scon = context(scontext)
/external/syzkaller/pkg/report/testdata/linux/report/
D1524 …: avc: denied { syslog } for pid=3348 comm="rsyslogd" capability=34 scontext=system_u:system_r…
13 … { map } for pid=3488 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:syst…
17 …="syzkaller898346" path="/root/syzkaller898346096" dev="sda1" ino=16481 scontext=unconfined_u:syst…
18 …=3502 comm="syzkaller898346" path="/dev/ashmem" dev="devtmpfs" ino=1065 scontext=unconfined_u:syst…
D2094 …4:8): avc: denied { map_create } for pid=4183 comm="syzkaller238030" scontext=unconfined_u:syst…
12 …c: denied { map_read map_write } for pid=4183 comm="syzkaller238030" scontext=unconfined_u:syst…
D13616 …2.694:51): avc: denied { setopt } for pid=11219 comm="syz-executor6" scontext=unconfined_u:syst…
/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.c132 sepol_security_context_t scontext; in print_sid() local
136 rc = sepol_sid_to_context(sid, &scontext, &scontext_len); in print_sid()
140 printf("sid %d -> scontext %s\n", sid, scontext); in print_sid()
141 free(scontext); in print_sid()
389 sepol_security_context_t scontext; in main() local
797 &scontext, &scontext_len); in main()
800 printf("\nscontext %s\n", scontext); in main()
801 free(scontext); in main()
/external/syzkaller/pkg/report/testdata/linux/guilty/
D334 …4:8): avc: denied { map_create } for pid=4183 comm="syzkaller238030" scontext=unconfined_u:syst…
12 …c: denied { map_read map_write } for pid=4183 comm="syzkaller238030" scontext=unconfined_u:syst…
/external/selinux/libselinux/include/selinux/
Dselinux.h621 extern int is_context_customizable(const char * scontext);