Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cred.c Create Date:2022-07-28 09:32:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:red_fscmp - Compare two credentials with respect to filesystem access.*@a: The first credential*@b: The second credential* cred_cmp() will return zero if both credentials have the same* fsuid, fsgid, and supplementary groups. That is, if they will both

Proto:int cred_fscmp(const struct cred *a, const struct cred *b)

Type:int

Parameter:

TypeParameterName
const struct cred *a
const struct cred *b
618  If a == b Then Return 0
620  If uid_lt( UID for VFS ops , UID for VFS ops ) Then Return -1
622  If uid_gt( UID for VFS ops , UID for VFS ops ) Then Return 1
625  If gid_lt( GID for VFS ops , GID for VFS ops ) Then Return -1
627  If gid_gt( GID for VFS ops , GID for VFS ops ) Then Return 1
630  ga = supplementary groups for euid/fsgid
631  gb = supplementary groups for euid/fsgid
632  If ga == gb Then Return 0
634  If (ga == NULL) Then Return -1
636  If (gb == NULL) Then Return 1
638  If ngroups < ngroups Then Return -1
640  If ngroups > ngroups Then Return 1
643  When g < ngroups cycle
644  If gid_lt(gid[g], gid[g]) Then Return -1
646  If gid_gt(gid[g], gid[g]) Then Return 1
649  Return 0