Searched refs:perm (Results 1 - 25 of 27) sorted by relevance

12

/security/keys/
H A Dpermission.c20 * @perm: The permissions to check for.
31 unsigned perm)
41 kperm = key->perm >> 16;
47 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) {
49 kperm = key->perm >> 8;
55 kperm = key->perm >> 8;
61 kperm = key->perm;
69 kperm |= key->perm >> 24;
71 kperm = kperm & perm & KEY_NEED_ALL;
73 if (kperm != perm)
30 key_task_permission(const key_ref_t key_ref, const struct cred *cred, unsigned perm) argument
[all...]
H A Dinternal.h157 key_perm_t perm);
174 key_perm_t perm);
179 static inline int key_permission(const key_ref_t key_ref, unsigned perm) argument
181 return key_task_permission(key_ref, current_cred(), perm);
H A Dkey.c202 * @perm: The permissions mask of the new key.
226 key_perm_t perm, unsigned long flags)
295 key->perm = perm;
757 * @perm: The permissions mask for a new key.
764 * If perm is KEY_PERM_UNDEF then an appropriate key permissions mask will be
780 key_perm_t perm,
864 if (perm == KEY_PERM_UNDEF) {
865 perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR;
866 perm |
224 key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) argument
775 key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) argument
[all...]
H A Drequest_key.c338 key_perm_t perm; local
348 perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR;
349 perm |= KEY_USR_VIEW;
351 perm |= KEY_POS_READ;
354 perm |= KEY_POS_WRITE;
358 perm, flags);
H A Dprocess_keys.c517 key_perm_t perm)
703 if (perm)
708 } else if (perm) {
720 ret = key_task_permission(key_ref, ctx.cred, perm);
516 lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) argument
H A Dproc.c208 if (key->perm & KEY_POS_VIEW) {
231 memcpy(xbuf, "perm", 5);
263 key->perm,
H A Dkeyctl.c556 * type;uid;gid;perm;description<NUL>
602 key->perm);
910 long keyctl_setperm_key(key_serial_t id, key_perm_t perm) argument
917 if (perm & ~(KEY_POS_ALL | KEY_USR_ALL | KEY_GRP_ALL | KEY_OTH_ALL))
935 key->perm = perm;
H A Dgc.c228 key->perm = 0;
H A Dkeyring.c493 const struct cred *cred, key_perm_t perm,
500 uid, gid, cred, perm, flags);
567 kleave(" = %d [!perm]", ctx->skipped_ret);
492 keyring_alloc(const char *description, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags, struct key *dest) argument
/security/selinux/
H A Dnlmsgtab.c28 u32 perm; member in struct:nlmsg_perm
133 static int nlmsg_perm(u16 nlmsg_type, u32 *perm, struct nlmsg_perm *tab, size_t tabsize) argument
139 *perm = tab[i].perm;
147 int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) argument
153 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms,
158 err = nlmsg_perm(nlmsg_type, perm, nlmsg_tcpdiag_perms,
163 err = nlmsg_perm(nlmsg_type, perm, nlmsg_xfrm_perms,
172 *perm = NETLINK_AUDIT_SOCKET__NLMSG_RELAY;
174 err = nlmsg_perm(nlmsg_type, perm, nlmsg_audit_perm
[all...]
H A Dnetlabel.c376 u32 perm; local
394 perm = UDP_SOCKET__RECVFROM;
397 perm = TCP_SOCKET__RECVFROM;
400 perm = RAWIP_SOCKET__RECVFROM;
403 rc = avc_has_perm(sksec->sid, nlbl_sid, sksec->sclass, perm, ad);
H A Dhooks.c1468 u32 perm = 0; local
1473 perm = PROCESS__SIGCHLD;
1477 perm = PROCESS__SIGKILL;
1481 perm = PROCESS__SIGSTOP;
1485 perm = PROCESS__SIGNAL;
1489 return perm;
3487 u32 perm; local
3496 perm = signal_to_av(SIGIO); /* as per send_sigio_to_task */
3498 perm = signal_to_av(signum);
3501 SECCLASS_PROCESS, perm, NUL
3750 u32 perm; local
4243 u32 sid, perm; local
4805 u32 perm; local
5168 ipc_alloc_security(struct task_struct *task, struct kern_ipc_perm *perm, u16 sclass) argument
5187 ipc_free_security(struct kern_ipc_perm *perm) argument
5864 selinux_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument
[all...]
H A Davc.c112 int i, perm; local
123 perm = 1;
125 if ((perm & av) && perms[i]) {
127 av &= ~perm;
130 perm <<= 1;
/security/tomoyo/
H A Dfile.c255 if (acl->perm & (1 << r->param.path.operation)) {
277 return (acl->perm & (1 << r->param.path_number.operation)) &&
297 return (acl->perm & (1 << r->param.path2.operation)) &&
316 return (acl->perm & (1 << r->param.mkdev.operation)) &&
357 ->perm;
358 u16 perm = *a_perm; local
359 const u16 b_perm = container_of(b, struct tomoyo_path_acl, head)->perm;
361 perm &= ~b_perm;
363 perm |= b_perm;
364 *a_perm = perm;
378 tomoyo_update_path_acl(const u16 perm, struct tomoyo_acl_param *param) argument
430 u8 perm = *a_perm; local
451 tomoyo_update_mkdev_acl(const u8 perm, struct tomoyo_acl_param *param) argument
507 u8 perm = *a_perm; local
527 tomoyo_update_path2_acl(const u8 perm, struct tomoyo_acl_param *param) argument
642 u8 perm = *a_perm; local
661 tomoyo_update_path_number_acl(const u8 perm, struct tomoyo_acl_param *param) argument
996 u16 perm = 0; local
[all...]
H A Dnetwork.c234 &container_of(a, struct tomoyo_inet_acl, head)->perm;
235 u8 perm = *a_perm; local
236 const u8 b_perm = container_of(b, struct tomoyo_inet_acl, head)->perm;
239 perm &= ~b_perm;
241 perm |= b_perm;
242 *a_perm = perm;
243 return !perm;
260 &container_of(a, struct tomoyo_unix_acl, head)->perm;
261 u8 perm = *a_perm; local
262 const u8 b_perm = container_of(b, struct tomoyo_unix_acl, head)->perm;
[all...]
H A Dutil.c1034 u16 perm; local
1040 perm = container_of(ptr, struct tomoyo_path_acl, head)
1041 ->perm;
1044 perm = container_of(ptr, struct tomoyo_path2_acl, head)
1045 ->perm;
1048 perm = container_of(ptr, struct tomoyo_path_number_acl,
1049 head)->perm;
1052 perm = container_of(ptr, struct tomoyo_mkdev_acl,
1053 head)->perm;
1056 perm
[all...]
H A Dtomoyo.c241 const unsigned int perm = mode & S_IALLUGO; local
253 return tomoyo_mkdev_perm(type, &path, perm, dev);
263 return tomoyo_path_number_perm(type, &path, perm);
H A Dcommon.c111 [TOMOYO_PATH1_PERM] = "path1.perm",
120 [TOMOYO_PATH2_PERM] = "path2.perm",
127 [TOMOYO_PATH1_PARENT_PERM] = "path1.parent.perm",
131 [TOMOYO_PATH2_PARENT_PERM] = "path2.parent.perm",
1376 const u16 perm = ptr->perm; local
1378 if (!(perm & (1 << bit)))
1405 const u8 perm = ptr->perm; local
1407 if (!(perm
1425 const u8 perm = ptr->perm; local
1445 const u8 perm = ptr->perm; local
1467 const u8 perm = ptr->perm; local
1499 const u8 perm = ptr->perm; local
[all...]
H A Dcommon.h706 u16 perm; /* Bitmask of values in "enum tomoyo_path_acl_index". */ member in struct:tomoyo_path_acl
717 u8 perm; member in struct:tomoyo_path_number_acl
725 u8 perm; /* Bitmask of values in "enum tomoyo_mkdev_acl_index". */ member in struct:tomoyo_mkdev_acl
737 u8 perm; /* Bitmask of values in "enum tomoyo_path2_acl_index". */ member in struct:tomoyo_path2_acl
761 u8 perm; /* Bitmask of values in "enum tomoyo_network_acl_index" */ member in struct:tomoyo_inet_acl
770 u8 perm; /* Bitmask of values in "enum tomoyo_network_acl_index" */ member in struct:tomoyo_unix_acl
H A Ddomain.c114 ->perm == 1 << TOMOYO_TYPE_EXECUTE))
/security/smack/
H A Dsmackfs.c279 int perm = 0; local
288 perm |= MAY_READ;
292 perm |= MAY_WRITE;
296 perm |= MAY_EXEC;
300 perm |= MAY_APPEND;
304 perm |= MAY_TRANSMUTE;
308 perm |= MAY_LOCK;
312 perm |= MAY_BRINGUP;
315 return perm;
H A Dsmack_lsm.c3840 * @perm: unused
3846 const struct cred *cred, unsigned perm)
3873 if (perm & KEY_NEED_READ)
3875 if (perm & (KEY_NEED_WRITE | KEY_NEED_LINK | KEY_NEED_SETATTR))
3845 smack_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument
/security/selinux/include/
H A Dsecurity.h266 extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
/security/apparmor/
H A Ddomain.c151 u32 perm = dfa_user_allow(profile->xmatch, state); local
153 if (perm & MAY_EXEC) {
/security/
H A Dsecurity.c1459 const struct cred *cred, unsigned perm)
1461 return security_ops->key_permission(key_ref, cred, perm);
1458 security_key_permission(key_ref_t key_ref, const struct cred *cred, unsigned perm) argument

Completed in 415 milliseconds

12