Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\tomoyo.c Create Date:2022-07-28 19:46:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_path_chown - Target for security_path_chown().*@path: Pointer to "struct path".*@uid: Owner ID.*@gid: Group ID.* Returns 0 on success, negative value otherwise.

Proto:static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid)

Type:int

Parameter:

TypeParameterName
const struct path *path
kuid_tuid
kgid_tgid
363  error = 0
365  If uid_valid(uid) Then error = moyo_path_number_perm - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".*@type: Type of operation.*@path: Pointer to "struct path".*@number: Number.* Returns 0 on success, negative value otherwise.
368  If Not error && gid_valid(gid) Then error = moyo_path_number_perm - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".*@type: Type of operation.*@path: Pointer to "struct path".*@number: Number.* Returns 0 on success, negative value otherwise.
371  Return error