kernel: fix set groups for kernel 4.9-

This commit is contained in:
weishu
2023-06-06 20:45:33 +08:00
parent ab1dc894e1
commit 1408175a35

View File

@@ -75,7 +75,11 @@ static void setup_groups(struct root_profile *profile, struct cred *cred)
put_group_info(group_info); put_group_info(group_info);
return; return;
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
group_info->gid[i] = kgid; group_info->gid[i] = kgid;
#else
GROUP_AT(group_info, i) = kgid;
#endif
} }
groups_sort(group_info); groups_sort(group_info);