Lines Matching defs:perms

73  * map_old_perms - map old file perms layout to the new layout
100 static void compute_fperms_allow(struct aa_perms *perms, struct aa_dfa *dfa,
103 perms->allow |= AA_MAY_GETATTR;
107 perms->allow |= AA_MAY_CHANGE_PROFILE;
109 perms->allow |= AA_MAY_ONEXEC;
115 struct aa_perms perms = { };
117 perms.allow = map_old_perms(dfa_user_allow(dfa, state));
118 perms.audit = map_old_perms(dfa_user_audit(dfa, state));
119 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state));
120 perms.xindex = dfa_user_xindex(dfa, state);
122 compute_fperms_allow(&perms, dfa, state);
124 return perms;
130 struct aa_perms perms = { };
132 perms.allow = map_old_perms(dfa_other_allow(dfa, state));
133 perms.audit = map_old_perms(dfa_other_audit(dfa, state));
134 perms.quiet = map_old_perms(dfa_other_quiet(dfa, state));
135 perms.xindex = dfa_other_xindex(dfa, state);
137 compute_fperms_allow(&perms, dfa, state);
139 return perms;
143 * compute_fperms - convert dfa compressed perms to internal perms and store
176 struct aa_perms *perms;
184 perms = kvcalloc(state_count, sizeof(struct aa_perms), GFP_KERNEL);
185 if (!perms)
191 perms[state].allow = dfa_user_allow(xmatch, state);
193 return perms;
213 struct aa_perms perms = { };
215 perms.allow = dfa_user_allow(dfa, state);
216 perms.audit = dfa_user_audit(dfa, state);
217 perms.quiet = dfa_user_quiet(dfa, state);
221 * v1-v4: only file perms, which are handled by compute_fperms
228 * perms represented by the xbits
230 perms.allow |= map_other(dfa_other_allow(dfa, state));
232 perms.allow |= AA_MAY_LOCK;
234 perms.allow |= map_xbits(dfa_user_xbits(dfa, state));
240 perms.audit |= map_other(dfa_other_audit(dfa, state));
241 perms.quiet |= map_other(dfa_other_quiet(dfa, state));
243 perms.quiet |= map_xbits(dfa_other_xbits(dfa, state));
245 return perms;
276 * Used in conjunction with compute_Xperms, it converts old style perms
297 policy->perms = compute_xmatch_perms(policy->dfa, &policy->size);
298 if (!policy->perms)
308 policy->perms = compute_perms(policy->dfa, version, &policy->size);
309 if (!policy->perms)
319 policy->perms = compute_fperms(policy->dfa, &policy->size);
320 if (!policy->perms)