Lines Matching +full:look +full:- +full:up
21 #include <dix-config.h>
59 return (rec->size > key) ? rec->array[key] : 0; in SELinuxArrayGet()
65 if (key >= rec->size) { in SELinuxArraySet()
67 rec->array = reallocarray(rec->array, key + 1, sizeof(val)); in SELinuxArraySet()
68 if (!rec->array) in SELinuxArraySet()
70 memset(rec->array + rec->size, 0, (key - rec->size + 1) * sizeof(val)); in SELinuxArraySet()
71 rec->size = key + 1; in SELinuxArraySet()
74 rec->array[key] = val; in SELinuxArraySet()
82 unsigned i = rec->size; in SELinuxArrayFree()
85 free(rec->array[--i]); in SELinuxArrayFree()
88 free(rec->array); in SELinuxArrayFree()
89 rec->size = 0; in SELinuxArrayFree()
90 rec->array = NULL; in SELinuxArrayFree()
94 * Looks up a name in the selection or property mappings
103 obj->poly = 1; in SELinuxAtomToSIDLookup()
105 /* Look in the mappings of names to contexts */ in SELinuxAtomToSIDLookup()
107 obj->poly = 0; in SELinuxAtomToSIDLookup()
119 if (avc_context_to_sid_raw(ctx, &obj->sid) < 0) { in SELinuxAtomToSIDLookup()
129 * Looks up the SID corresponding to the given property or selection atom
146 obj = &rec->prp; in SELinuxAtomToSID()
151 obj = &rec->sel; in SELinuxAtomToSID()
156 if (!obj->sid) { in SELinuxAtomToSID()
169 * Looks up a SID for a selection/subject pair
185 if (subj->sel_use_sid) { in SELinuxSelectionToSID()
186 tsid = subj->sel_use_sid; in SELinuxSelectionToSID()
190 tsid = obj->sid; in SELinuxSelectionToSID()
193 if (obj->poly && avc_compute_member(subj->sid, obj->sid, in SELinuxSelectionToSID()
201 *poly_rtn = obj->poly; in SELinuxSelectionToSID()
206 * Looks up a SID for a property/subject pair
222 if (subj->prp_use_sid) { in SELinuxPropertyToSID()
223 tsid = subj->prp_use_sid; in SELinuxPropertyToSID()
228 if (avc_compute_create(subj->sid, obj->sid, SECCLASS_X_PROPERTY, &tsid) < 0) { in SELinuxPropertyToSID()
234 if (obj->poly) { in SELinuxPropertyToSID()
236 if (avc_compute_member(subj->sid, tsid2, in SELinuxPropertyToSID()
245 *poly_rtn = obj->poly; in SELinuxPropertyToSID()
250 * Looks up the SID corresponding to the given event type
264 /* Look in the mappings of event names to contexts */ in SELinuxEventToSID()
283 &sid_return->sid) < 0) { in SELinuxEventToSID()
296 /* Look in the mappings of extension names to contexts */ in SELinuxExtensionToSID()
356 FatalError("SELinux: failed to look up remote-client context\n"); in SELinuxDefaultClientLabel()