Lines Matching defs:mode

108 static void smk_bu_mode(int mode, char *s)
112 if (mode & MAY_READ)
114 if (mode & MAY_WRITE)
116 if (mode & MAY_EXEC)
118 if (mode & MAY_APPEND)
120 if (mode & MAY_TRANSMUTE)
122 if (mode & MAY_LOCK)
132 struct smack_known *oskp, int mode, int rc)
141 smk_bu_mode(mode, acc);
147 #define smk_bu_note(note, sskp, oskp, mode, RC) (RC)
152 int mode, int rc)
162 smk_bu_mode(mode, acc);
169 #define smk_bu_current(note, oskp, mode, RC) (RC)
173 static int smk_bu_task(struct task_struct *otp, int mode, int rc)
184 smk_bu_mode(mode, acc);
191 #define smk_bu_task(otp, mode, RC) (RC)
195 static int smk_bu_inode(struct inode *inode, int mode, int rc)
210 (mode & (MAY_WRITE | MAY_APPEND)))
213 smk_bu_mode(mode, acc);
221 #define smk_bu_inode(inode, mode, RC) (RC)
225 static int smk_bu_file(struct file *file, int mode, int rc)
242 smk_bu_mode(mode, acc);
250 #define smk_bu_file(file, mode, RC) (RC)
255 int mode, int rc)
272 smk_bu_mode(mode, acc);
280 #define smk_bu_credfile(cred, file, mode, RC) (RC)
406 * @mode: input mode in form of PTRACE_MODE_*
408 * Returns a converted MAY_* mode usable by smack rules
410 static inline unsigned int smk_ptrace_mode(unsigned int mode)
412 if (mode & PTRACE_MODE_ATTACH)
414 if (mode & PTRACE_MODE_READ)
424 * @mode: ptrace attachment mode (PTRACE_MODE_*)
431 unsigned int mode, const char *func)
439 if ((mode & PTRACE_MODE_NOAUDIT) == 0) {
450 if ((mode & PTRACE_MODE_ATTACH) &&
471 /* In case of rule==SMACK_PTRACE_DEFAULT or mode==PTRACE_MODE_READ */
472 rc = smk_tskacc(tsp, tracee_known, smk_ptrace_mode(mode), saip);
486 * @mode: ptrace attachment mode (PTRACE_MODE_*)
492 static int smack_ptrace_access_check(struct task_struct *ctp, unsigned int mode)
498 return smk_ptrace_rule_check(current, skp, mode, __func__);
3383 * @mode: unused
3390 int mode)
4900 static int smack_dentry_create_files_as(struct dentry *dentry, int mode,