Lines Matching +defs:security +defs:c

40  * all security modules to use the same descriptions for auditing
235 return lsm_blob_alloc(&cred->security, blob_sizes.lbs_cred, gfp);
270 return lsm_blob_alloc(&task->security, blob_sizes.lbs_task, GFP_KERNEL);
283 return lsm_blob_alloc(&kip->security, blob_sizes.lbs_ipc, GFP_KERNEL);
297 return lsm_blob_alloc(&key->security, blob_sizes.lbs_key, GFP_KERNEL);
311 return lsm_blob_alloc(&mp->security, blob_sizes.lbs_msg_msg,
340 return lsm_blob_alloc(&map->security, blob_sizes.lbs_bpf_map, GFP_KERNEL);
353 return lsm_blob_alloc(&prog->aux->security, blob_sizes.lbs_bpf_prog, GFP_KERNEL);
366 return lsm_blob_alloc(&token->security, blob_sizes.lbs_bpf_token, GFP_KERNEL);
573 * process is being traced and its security attributes would be changed by the
651 * @opts contains options for the capable check <include/linux/security.h>.
761 * If the setup in prepare_exec_creds did not setup @bprm->cred->security
763 * @bprm->cred->security to be what commit_creds needs to install for the new
765 * transitions between security domains). The hook must set @bprm->secureexec
793 * transitions between security domains). The hook must set @bprm->secureexec
811 * It allows a check against the @bprm->cred->security value which was set in
827 * Prepare to install the new security attributes of a process being
844 * Tidy up after the installation of the new security attributes of a process
857 * security_fs_context_submount() - Initialise fc->security
861 * Fill out the ->security field for a new fs_context.
875 * Allocate and attach a security structure to sc->security. This pointer is
919 * Allocate and attach a security structure to the sb->s_security field. The
1015 * Extracts security system specific mount options and verifies no changes are
1127 * Set the security relevant mount options used for a superblock.
1156 * Copy all security options from a given superblock to another.
1207 * Allocate and attach a security structure to @inode->i_security. The
1261 * @xattr_name: name of the security/LSM xattr
1312 * Obtain the security attribute name suffix and value to set on a newly
1313 * created inode and set up the incore security field for the new inode. This
1319 * lsm_get_xattr_slot() to retrieve the slots reserved by the security module
1324 * the security module does not use security attributes or does not wish to put
1325 * a security attribute on this particular inode, then it should return
1329 * security attributes that are required, negative values otherwise.
1385 * Set up the incore security field for the new anonymous inode and return
1386 * whether the inode creation is permitted by the security module or not.
1388 * Return: Returns 0 on success, -EACCES if the security module denies the
1422 * security_path_post_mknod() - Update inode security after reg file creation
1426 * Update inode security field after a regular file has been created.
1635 * security_inode_post_create_tmpfile() - Update inode security of new tmpfile
1639 * Update inode security data after a tmpfile has been created.
1830 * existing Linux permission function, so a security module can use it to
1873 * Update inode security field after successful setting file attributes.
1966 * security_inode_post_set_acl() - Update inode security from posix acls set
1971 * Update inode security data after successfully setting posix acls on @dentry.
2021 * security_inode_post_remove_acl() - Update inode security after rm posix acls
2026 * Update inode security data after successfully removing posix acls on
2045 * Update inode security field after successful setxattr operation.
2194 * The @dentry's setuid bit is being removed. Remove similar security labels.
2207 * security_inode_getsecurity() - Get the xattr security label of an inode
2211 * @buffer: security label buffer
2214 * Retrieve a copy of the extended attribute representation of the security
2216 * remainder of the attribute name after the security prefix has been removed.
2234 * security_inode_setsecurity() - Set the xattr security label of an inode
2237 * @value: security label
2238 * @size: length of security label
2241 * Set the security label associated with @name for @inode from the extended
2244 * remainder of the attribute name after the security. prefix has been removed.
2259 * security_inode_listsecurity() - List the xattr security label names
2264 * Copy the extended attribute names for the security labels associated with
2320 * -EOPNOTSUPP if the security module does not know about attribute,
2360 * Initialize the security context of a newly created kernfs node based on its
2377 * by various operations that read or write files. A security module can use
2399 * Allocate and attach a security structure to the file->f_security field. The
2400 * security field is initialized to NULL when the structure is first created.
2431 * Deallocate and free any security structures stored in file->f_security.
2506 * by the security module.
2665 * security module.
2678 * Save owner security information (typically from current->security) in
2699 * so the file structure (and associated security information) can always be
2714 * This hook allows security modules to control the ability of a process to
2806 kfree(task->security);
2807 task->security = NULL;
2837 * Deallocate and clear the cred->security field in a set of credentials.
2843 * may result in a call here with ->security being NULL.
2845 if (unlikely(cred->security == NULL))
2850 kfree(cred->security);
2851 cred->security = NULL;
2891 * @c: credentials
2894 * Retrieve the security identifier of the cred structure @c. In case of
2897 void security_cred_getsecid(const struct cred *c, u32 *secid)
2900 call_void_hook(cred_getsecid, c, secid);
2906 * @c: credentials
2909 * Retrieve the security data of the cred structure @c. In case of
2912 void security_cred_getlsmprop(const struct cred *c, struct lsm_prop *prop)
2915 call_void_hook(cred_getlsmprop, c, prop);
3141 * Retrieve the subjective security identifier of the current task and return
3156 * Retrieve the objective security identifier of the task_struct in @p and
3335 * security_task_to_inode() - Set the security attributes of a task's inode
3339 * Set the security attributes for an inode based on an associated task's
3340 * security attributes, e.g. for /proc/pid inodes.
3392 * Allocate and attach a security structure to the msg->security field. The
3393 * security field is initialized to NULL when the structure is first created.
3413 * Deallocate the security structure for this message.
3418 kfree(msg->security);
3419 msg->security = NULL;
3426 * Allocate and attach a security structure to @msg. The security field is
3447 * Deallocate security field @perm->security for the message queue.
3452 kfree(msq->security);
3453 msq->security = NULL;
3529 * Allocate and attach a security structure to the @shp security field. The
3530 * security field is initialized to NULL when the structure is first created.
3550 * Deallocate the security structure @perm->security for the memory segment.
3555 kfree(shp->security);
3556 shp->security = NULL;
3613 * Allocate and attach a security structure to the @sma security field. The
3614 * security field is initialized to NULL when the structure is first created.
3634 * Deallocate security structure @sma->security for the semaphore.
3639 kfree(sma->security);
3640 sma->security = NULL;
3697 * Fill in @inode security information for a @dentry if allowed.
3708 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
3801 * Please keep this in sync with it's counterpart in security/lsm_syscalls.c
3922 * Convert secid to security context. If @cp is NULL the length of the
3939 * @lsmid: which security module to report
3941 * Convert a @prop entry to security context. If @cp is NULL the
3973 * Convert security context to secid.
3986 * @cp: the security context
3988 * Release the security context.
3998 * security_inode_invalidate_secctx() - Invalidate an inode's security label
4001 * Notify the security module that it must revalidate the security context of
4011 * security_inode_notifysecctx() - Notify the LSM of an inode's security label
4016 * Notify the security module of what the security context of an inode should
4017 * be. Initializes the incore security context managed by the security module
4019 * the security context in its incore inode to the value provided by the server
4032 * security_inode_setsecctx() - Change the security label of an inode
4037 * Change the security context of an inode. Updates the incore security
4038 * context managed by the security module and invokes the fs code as needed
4040 * context. Example usage: NFS server invokes this hook to change the security
4054 * security_inode_getsecctx() - Get the security label of an inode
4056 * @cp: security context
4058 * On success, returns 0 and fills out @cp with the security context
4111 * Save security information for a netlink message so that permission checking
4112 * can be performed when the message is processed. The security information
4202 * This hook allows a module to update or allocate a per-socket security
4203 * structure. Note that the security field was not added directly to the socket
4204 * structure, but rather, the socket security information is stored in the
4206 * and attach security information to SOCK_INODE(sock)->i_security. This hook
4430 * This hook allows the security module to provide peer socket security state
4451 * This hook allows the security module to provide peer socket security state
4454 * option via getsockopt. It can then retrieve the security state returned by
4486 * Allocate and attach a security structure to the sk->sk_security field, which
4487 * is used to copy security attributes between local stream sockets.
4507 * Deallocate security structure.
4521 * Clone/copy security structure.
4652 * @security: pointer to the LSM blob
4654 * This hook allows a module to allocate a security structure for a TUN device,
4655 * returning the pointer in @security.
4659 int security_tun_dev_alloc_security(void **security)
4663 rc = lsm_blob_alloc(security, blob_sizes.lbs_tun_dev, GFP_KERNEL);
4667 rc = call_int_hook(tun_dev_alloc_security, *security);
4669 kfree(*security);
4670 *security = NULL;
4678 * @security: LSM blob
4680 * This hook allows a module to free the security structure for a TUN device.
4682 void security_tun_dev_free_security(void *security)
4684 kfree(security);
4703 * @security: TUN device LSM blob
4709 int security_tun_dev_attach_queue(void *security)
4711 return call_int_hook(tun_dev_attach_queue, security);
4718 * @security: TUN device LSM blob
4720 * This hook can be used by the module to update any security state associated
4725 int security_tun_dev_attach(struct sock *sk, void *security)
4727 return call_int_hook(tun_dev_attach, sk, security);
4733 * @security: TUN device LSM blob
4735 * This hook can be used by the module to update any security state associated
4736 * with the TUN device's security structure.
4740 int security_tun_dev_open(void *security)
4742 return call_int_hook(tun_dev_open, security);
4806 * security module.
4894 * Allocate a security structure for Infiniband objects.
4919 * Deallocate an Infiniband security structure.
4931 * @ctxp: xfrm security context being added to the SPD
4932 * @sec_ctx: security label provided by userspace
4935 * Allocate a security structure to the xp->security field; the security field
4950 * @old_ctx: xfrm security context
4951 * @new_ctxp: target xfrm security context
4953 * Allocate a security structure in new_ctxp that contains the information from
4965 * security_xfrm_policy_free() - Free a xfrm security context
4966 * @ctx: xfrm security context
4978 * @ctx: xfrm security context
4992 * @sec_ctx: security label provided by userspace
4994 * Allocate a security structure to the @x->security field; the security field
5010 * @polsec: associated policy's security context
5013 * Allocate a security structure to the x->security field; the security field
5029 * Authorize deletion of x->security.
5043 * Deallocate x->security.
5052 * @ctx: target xfrm security context
5105 * Decode the packet in @skb and return the security label in @secid.
5131 * Permit allocation of a key and assign security data. Note that key does not
5153 * Notification of destruction; free security data.
5157 kfree(key->security);
5158 key->security = NULL;
5178 * security_key_getsecurity() - Get the key's security label
5180 * @buffer: security label buffer
5182 * Get a textual representation of the security context attached to a key for
5188 * there is no security label assigned to the key.
5264 * @prop: security label
5291 * the kernel. The actual security module can implement their own rules to
5447 * Clean up the security information stored inside bpf map.
5452 kfree(map->security);
5453 map->security = NULL;
5460 * Clean up the security information stored inside BPF program.
5465 kfree(prog->aux->security);
5466 prog->aux->security = NULL;
5473 * Clean up the security information stored inside BPF token.
5478 kfree(token->security);
5479 token->security = NULL;
5502 * Allocate and attach a security structure to @bdev->bd_security. The
5503 * security field is initialized to NULL when the bdev structure is
5528 * Deallocate the bdev security structure and set @bdev->bd_security to NULL.
5551 * Please note that the new hook should be invoked every time the security
5595 * Allocate and save perf_event security info.
5603 rc = lsm_blob_alloc(&event->security, blob_sizes.lbs_perf_event,
5610 kfree(event->security);
5611 event->security = NULL;
5620 * Release (free) perf_event security info.
5624 kfree(event->security);
5625 event->security = NULL;
5632 * Read perf_event security info if allowed.
5645 * Write perf_event security info if allowed.