Lines Matching refs: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
177 struct aa_perms *perms;
185 perms = kvcalloc(state_count, sizeof(struct aa_perms), GFP_KERNEL);
186 if (!perms)
192 perms[state].allow = dfa_user_allow(xmatch, state);
194 return perms;
214 struct aa_perms perms = { };
216 perms.allow = dfa_user_allow(dfa, state);
217 perms.audit = dfa_user_audit(dfa, state);
218 perms.quiet = dfa_user_quiet(dfa, state);
222 * v1-v4: only file perms, which are handled by compute_fperms
229 * perms represented by the xbits
231 perms.allow |= map_other(dfa_other_allow(dfa, state));
233 perms.allow |= AA_MAY_LOCK;
235 perms.allow |= map_xbits(dfa_user_xbits(dfa, state));
241 perms.audit |= map_other(dfa_other_audit(dfa, state));
242 perms.quiet |= map_other(dfa_other_quiet(dfa, state));
244 perms.quiet |= map_xbits(dfa_other_xbits(dfa, state));
246 return perms;
277 * Used in conjunction with compute_Xperms, it converts old style perms
298 policy->perms = compute_xmatch_perms(policy->dfa, &policy->size);
299 if (!policy->perms)
309 policy->perms = compute_perms(policy->dfa, version, &policy->size);
310 if (!policy->perms)
320 policy->perms = compute_fperms(policy->dfa, &policy->size);
321 if (!policy->perms)