Lines Matching refs:gid
1134 static BOOL staticgroupmember(struct SECURITY_CONTEXT *scx, uid_t uid, gid_t gid) in staticgroupmember() argument
1149 while ((--grcnt >= 0) && (groups[grcnt] != gid)) { } in staticgroupmember()
1167 static BOOL groupmember(struct SECURITY_CONTEXT *scx, uid_t uid, gid_t gid) in groupmember() argument
1193 ismember = staticgroupmember(scx, uid, gid); in groupmember()
1202 if (basecreds.pr_egid == gid) in groupmember()
1210 && (*p != gid)) { in groupmember()
1254 static BOOL groupmember(struct SECURITY_CONTEXT *scx, uid_t uid, gid_t gid) in groupmember() argument
1270 ismember = staticgroupmember(scx, uid, gid); in groupmember()
1319 ismember = (grp == gid); in groupmember()
1497 || (cached->gid != item->gid) in compare()
1506 || (cached->gid != item->gid) in compare()
1574 ntfs_inode *ni, uid_t uid, gid_t gid, in enter_cache() argument
1578 ntfs_inode *ni, uid_t uid, gid_t gid, mode_t mode) in enter_cache()
1609 cacheentry->gid = gid; in enter_cache()
1655 cacheentry->gid = gid; in enter_cache()
1690 wanted.perm.gid = gid; in enter_cache()
1930 uid_t uid, gid_t gid) in access_check_posix() argument
2029 && ((gid == scx->gid) in access_check_posix()
2030 || groupmember(scx, scx->uid, gid))) in access_check_posix()
2077 gid_t gid; in ntfs_get_perm() local
2089 gid = cached->gid; in ntfs_get_perm()
2090 perm = access_check_posix(scx,cached->pxdesc,request,uid,gid); in ntfs_get_perm()
2101 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in ntfs_get_perm()
2145 gid, pxdesc); in ntfs_get_perm()
2148 perm = access_check_posix(scx,pxdesc,request,uid,gid); in ntfs_get_perm()
2154 uid = gid = 0; in ntfs_get_perm()
2179 gid_t gid; in ntfs_get_posix_acl() local
2234 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in ntfs_get_posix_acl()
2237 gid, pxdesc); in ntfs_get_posix_acl()
2311 gid_t gid; in ntfs_get_perm() local
2322 gid = cached->gid; in ntfs_get_perm()
2333 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in ntfs_get_perm()
2369 gid, perm); in ntfs_get_perm()
2374 uid = gid = 0; in ntfs_get_perm()
2393 if ((gid == scx->gid) in ntfs_get_perm()
2396 && groupmember(scx, scx->uid, gid))) in ntfs_get_perm()
2466 stbuf->st_gid = cached->gid; in ntfs_get_owner_mode()
2565 gid_t gid; in inherit_posix() local
2572 gid = cached->gid; in inherit_posix()
2589 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in inherit_posix()
2622 gid, pxdesc); in inherit_posix()
2648 uid_t uid, gid_t gid, ntfs_inode *dir_ni, in ntfs_alloc_securid() argument
2673 wanted.gid = gid; in ntfs_alloc_securid()
2690 gsid = ntfs_find_gsid(scx->mapping[MAPGROUPS],gid,(SID*)&defgsid); in ntfs_alloc_securid()
2693 (int)uid, (int)gid); in ntfs_alloc_securid()
2730 ntfs_inode *ni, uid_t uid, gid_t gid, in ntfs_set_inherited_posix() argument
2747 gsid = ntfs_find_gsid(scx->mapping[MAPGROUPS],gid,(SID*)&defgsid); in ntfs_set_inherited_posix()
2750 (int)uid, (int)gid); in ntfs_set_inherited_posix()
2793 uid_t uid, gid_t gid, mode_t mode, BOOL isdir) in ntfs_alloc_securid() argument
2813 wanted.gid = gid; in ntfs_alloc_securid()
2829 gsid = ntfs_find_gsid(scx->mapping[MAPGROUPS],gid,(SID*)&defgsid); in ntfs_alloc_securid()
2832 (int)uid, (int)gid); in ntfs_alloc_securid()
2871 uid_t uid, gid_t gid, mode_t mode, in ntfs_set_owner_mode() argument
2875 uid_t uid, gid_t gid, mode_t mode) in ntfs_set_owner_mode()
2894 wanted.gid = gid; in ntfs_set_owner_mode()
2934 gsid = ntfs_find_gsid(scx->mapping[MAPGROUPS],gid,(SID*)&defgsid); in ntfs_set_owner_mode()
2937 uid, gid); in ntfs_set_owner_mode()
3085 uid_t gid; in ntfs_set_posix_acl() local
3109 gid = cached->gid; in ntfs_set_posix_acl()
3126 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in ntfs_set_posix_acl()
3157 if (processuid && (gid != scx->gid) in ntfs_set_posix_acl()
3158 && !groupmember(scx, scx->uid, gid)) { in ntfs_set_posix_acl()
3161 res = ntfs_set_owner_mode(scx, ni, uid, gid, in ntfs_set_posix_acl()
3261 uid_t gid; in ntfs_set_mode() local
3275 gid = cached->gid; in ntfs_set_mode()
3303 gid = ntfs_find_group(scx->mapping[MAPGROUPS],gsid); in ntfs_set_mode()
3324 if (processuid && (gid != scx->gid) in ntfs_set_mode()
3325 && !groupmember(scx, scx->uid, gid)) in ntfs_set_mode()
3330 res = ntfs_set_owner_mode(scx, ni, uid, gid, in ntfs_set_mode()
3333 res = ntfs_set_owner_mode(scx, ni, uid, gid, in ntfs_set_mode()
3336 res = ntfs_set_owner_mode(scx, ni, uid, gid, mode); in ntfs_set_mode()
3550 *pgid = scx->gid; in ntfs_allowed_create()
3629 uid_t uid, gid_t gid) in ntfs_set_owner() argument
3653 filegid = cached->gid; in ntfs_set_owner()
3706 && ((gid == scx->gid) || groupmember(scx, scx->uid, gid)) in ntfs_set_owner()
3712 if ((int)gid < 0) in ntfs_set_owner()
3713 gid = filegid; in ntfs_set_owner()
3721 res = ntfs_set_owner_mode(scx, ni, uid, gid, in ntfs_set_owner()
3724 res = ntfs_set_owner_mode(scx, ni, uid, gid, mode); in ntfs_set_owner()
3753 uid_t uid, gid_t gid, const mode_t mode) in ntfs_set_ownmod() argument
3776 filegid = cached->gid; in ntfs_set_ownmod()
3828 && ((gid == scx->gid) || groupmember(scx, scx->uid, gid)) in ntfs_set_ownmod()
3834 if ((int)gid < 0) in ntfs_set_ownmod()
3835 gid = filegid; in ntfs_set_ownmod()
3837 res = ntfs_set_owner_mode(scx, ni, uid, gid, in ntfs_set_ownmod()
3840 res = ntfs_set_owner_mode(scx, ni, uid, gid, mode); in ntfs_set_ownmod()
3892 gsid = ntfs_find_gsid(scx->mapping[MAPGROUPS], scx->gid, (SID*)&defgsid); in build_inherited_id()
3929 if (!scx->gid) in build_inherited_id()
4046 && (cached->uid == scx->uid) && (cached->gid == scx->gid)) in ntfs_inherited_id()
4068 && (cached->gid == scx->gid)) { in ntfs_inherited_id()
4087 gid_t gid) in link_single_group() argument
4096 group = getgrgid(gid); in link_single_group()
4110 groups[grcnt++] = gid; in link_single_group()
4170 uid_t uid, gid_t gid, const SID *usid) in ntfs_do_default_mapping() argument
4191 groupmapping->xid = gid; in ntfs_do_default_mapping()
4265 scx->uid, scx->gid, usid);
5252 int ntfs_get_gsid(struct SECURITY_API *scapi, gid_t gid, char *buf) in ntfs_get_gsid() argument
5260 gsid = ntfs_find_gsid(scapi->security.mapping[MAPGROUPS], gid, (SID*)&defgsid); in ntfs_get_gsid()
5305 int gid; in ntfs_get_group() local
5307 gid = -1; in ntfs_get_group()
5310 gid = 0; in ntfs_get_group()
5312 gid = ntfs_find_group(scapi->security.mapping[MAPGROUPS], gsid); in ntfs_get_group()
5313 if (!gid) { in ntfs_get_group()
5314 gid = -1; in ntfs_get_group()
5320 return (gid); in ntfs_get_group()
5356 scx->gid = getgid(); in ntfs_initialize_file_security()