diff options
author | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
---|---|---|
committer | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
commit | 7c478bd95313f5f23a4c958a745db2134aa03244 (patch) | |
tree | c871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/head/project.h | |
download | illumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz |
OpenSolaris Launch
Diffstat (limited to 'usr/src/head/project.h')
-rw-r--r-- | usr/src/head/project.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/usr/src/head/project.h b/usr/src/head/project.h new file mode 100644 index 0000000000..06f64da056 --- /dev/null +++ b/usr/src/head/project.h @@ -0,0 +1,76 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 1999-2001 by Sun Microsystems, Inc. + * All rights reserved. + */ + +#ifndef _PROJECT_H +#define _PROJECT_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <stdio.h> +#include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define PROJF_PATH "/etc/project" /* pathname of the "project" file */ +#define PROJNAME_MAX 64 /* maximum project name size */ +#define PROJECT_BUFSZ 4096 /* default buffer size */ + +#define SETPROJ_ERR_TASK (-1) /* error creating new task */ +#define SETPROJ_ERR_POOL (-2) /* error binding to pool */ + +struct project { + char *pj_name; /* name of the project */ + projid_t pj_projid; /* numerical project id */ + char *pj_comment; /* project description */ + char **pj_users; /* vector of pointers to project user names */ + char **pj_groups; /* vector of pointers to project group names */ + char *pj_attr; /* project attributes string */ +}; + +extern void setprojent(void); +extern void endprojent(void); +extern struct project *getprojent(struct project *, void *, size_t); +extern struct project *getprojbyname(const char *, + struct project *, void *, size_t); +extern struct project *getprojbyid(projid_t, struct project *, void *, size_t); +extern struct project *getdefaultproj(const char *, + struct project *, void *, size_t); +extern struct project *fgetprojent(FILE *, struct project *, void *, size_t); +extern int inproj(const char *, const char *, void *, size_t); +extern projid_t getprojidbyname(const char *); + +extern projid_t getprojid(void); + +extern projid_t setproject(const char *, const char *, int); +extern int project_walk(int (*)(projid_t, void *), void *); + +#ifdef __cplusplus +} +#endif + +#endif /* _PROJECT_H */ |