Lines Matching defs:project
31 #include <project.h>
53 static int ismember(struct project *, const char *, gid_t, int);
79 struct project *
80 _getprojent(struct project *result, void *buffer, size_t buflen)
86 return ((struct project *)NSS_XbyY_FINI(&arg));
89 struct project *
90 _fgetprojent(FILE *f, struct project *result, void *buffer, size_t buflen)
97 return ((struct project *)NSS_XbyY_FINI(&arg));
100 struct project *
101 _getprojbyid(projid_t projid, struct project *result,
110 return ((struct project *)NSS_XbyY_FINI(&arg));
113 struct project *
114 _getprojbyname(const char *name, struct project *result,
122 return ((struct project *)NSS_XbyY_FINI(&arg));
127 * is allowed to join the project specified as project structure in first
129 * the project specified in the first argument is user's default project
136 ismember(struct project *proj, const char *user, gid_t gid, int is_default)
152 * Scan project's user list.
165 * Scan project's group list.
182 * Check if user is a member of one of project's groups.
193 struct project *
194 _getdefaultproj(const char *user, struct project *result,
216 if ((attrproj = kva_match(uattr->attr, "project")) != NULL) {
262 struct project proj;
278 return (0); /* project does not exist */
281 * 1. Check for special "default" project.
290 if ((attrproj = kva_match(uattr->attr, "project")) != NULL) {
301 * 3. Check if this is a special "user.username" project.
303 * User "username" is considered to be a member of project
304 * "user.username" even if project's user lists do not
312 * 4. Check if this is a special "group.groupname" project.
315 * to be a member of project "group.groupname" even if project's
338 struct project proj;
377 struct project *project = ent;
402 * empty or very long project names are not allowed
406 project->pj_name = p;
415 project->pj_projid = (projid_t)strtol(p, NULL, 10);
416 if (project->pj_projid < 0) {
420 project->pj_projid = 0;
431 project->pj_comment = p;
454 project->pj_attr = next;
458 project->pj_users = uglist;
472 project->pj_groups = uglist;