Lines Matching refs:groups
12 * Check that fanotify groups and marks limits are enforced correctly.
15 * Otherwise, we only check that global groups limit is enforced.
44 * The fanotify_init() man page documents the max groups limit is 128, but the
62 /* 0: unlimited groups in userns */
68 "Global groups limit in init user ns",
73 "Global groups limit in privileged user ns",
78 "Local groups limit in unprivileged user ns",
89 /* Verify that groups and marks cannot be created beyond limit */
90 static void verify_user_limits(unsigned int init_flags, int groups, int marks)
94 for (i = 0; i <= groups; i++) {
109 if (fd > 0 && i > groups) {
111 "Created %d groups and marks - "
112 "groups limit (%d) exceeded", i, groups);
115 "Created %d groups and marks - "
117 } else if (ret < 0 && errno == ENOSPC && marks < groups) {
128 * fanotify groups limit is reached.
131 "Created %d groups - "
132 "below groups limit (%d)", i, groups);
170 int groups = max_groups;
186 if (tc->max_user_groups && tc->max_user_groups < groups) {
187 /* Further limit user ns groups */
188 marks = groups = tc->max_user_groups;
189 SAFE_FILE_PRINTF(USERNS_MAX_GROUPS, "%d", groups);
197 verify_user_limits(tc->init_flags, groups, marks);