comm: add -Wall
[unleashed.git] / include / userdefs.h
blobad8faf76af34e75cdf3e6ccd02c256fb35febbb1
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 #ifndef _USERDEFS_H
32 #define _USERDEFS_H
34 #include <project.h>
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
41 * The definitions in this file are local to the OA&M subsystem. General
42 * use is not encouraged.
45 /* User/group default values */
46 #define DEFGID 99 /* max reserved group id */
47 #define DEFRID 99
48 #define DEFPROJ 3
49 #define DEFPROJNAME "default"
50 #define DEFGROUP 1
51 #define DEFGNAME "other"
52 #define DEFPARENT "/home"
53 #define DEFSKL "/etc/skel"
54 #define DEFSHL "/bin/sh"
55 #define DEFROLESHL "/bin/pfsh"
56 #define DEFINACT 0
57 #define DEFEXPIRE ""
58 #define DEFAUTH ""
59 #define DEFPROF ""
60 #define DEFROLEPROF "All"
61 #define DEFROLE ""
62 #define DEFLIMPRIV ""
63 #define DEFDFLTPRIV ""
64 #define DEFLOCK_AFTER_RETRIES ""
66 /* Defaults file keywords */
67 #define RIDSTR "defrid="
68 #define GIDSTR "defgroup="
69 #define GNAMSTR "defgname="
70 #define PARSTR "defparent="
71 #define SKLSTR "defskel="
72 #define SHELLSTR "defshell="
73 #define INACTSTR "definact="
74 #define EXPIRESTR "defexpire="
75 #define AUTHSTR "defauthorization="
76 #define PROFSTR "defprofile="
77 #define ROLESTR "defrole="
78 #define PROJSTR "defproj="
79 #define PROJNMSTR "defprojname="
80 #define LIMPRSTR "deflimitpriv="
81 #define DFLTPRSTR "defdefaultpriv="
82 #define FHEADER "# Default values for useradd. Changed "
83 #define FHEADER_ROLE "# Default values for roleadd. Changed "
84 #define LOCK_AFTER_RETRIESSTR "deflock_after_retries="
86 #define GROUP "/etc/group"
88 /* various limits */
89 #define MAXGLEN 9 /* max length of group name */
90 #define MAXDLEN 80 /* max length of a date string */
92 /* defaults structure */
93 struct userdefs {
94 int defrid; /* highest reserved uid */
95 int defgroup; /* default group id */
96 char *defgname; /* default group name */
97 char *defparent; /* default base directory for new logins */
98 char *defskel; /* default skel directory */
99 char *defshell; /* default shell */
100 int definact; /* default inactive */
101 char *defexpire; /* default expire date */
102 char *defauth; /* default authorization */
103 char *defprof; /* default profile */
104 char *defrole; /* default role */
105 projid_t defproj; /* default project id */
106 char *defprojname; /* default project name */
107 char *deflimpriv; /* default limitpriv */
108 char *defdfltpriv; /* default defaultpriv */
109 char *deflock_after_retries; /* default lock_after_retries */
113 /* exit() values for user/group commands */
115 /* Everything succeeded */
116 #define EX_SUCCESS 0
118 /* No permission */
119 #define EX_NO_PERM 1
121 /* Command syntax error */
122 #define EX_SYNTAX 2
124 /* Invalid argument given */
125 #define EX_BADARG 3
127 /* A gid or uid already exists */
128 #define EX_ID_EXISTS 4
130 /* PASSWD and SHADOW are inconsistent with each other */
131 #define EX_INCONSISTENT 5
133 /* A group or user name doesn't exist */
134 #define EX_NAME_NOT_EXIST 6
136 /* GROUP, PASSWD, or SHADOW file missing */
137 #define EX_MISSING 7
139 /* GROUP, PASSWD, or SHAWOW file is busy */
140 #define EX_BUSY 8
142 /* A group or user name already exists */
143 #define EX_NAME_EXISTS 9
145 /* Unable to update GROUP, PASSWD, or SHADOW file */
146 #define EX_UPDATE 10
148 /* Not enough space */
149 #define EX_NOSPACE 11
151 /* Unable to create/remove/move home directory */
152 #define EX_HOMEDIR 12
154 /* new login already in use */
155 #define EX_NL_USED 13
157 /* Unexpected failure */
158 #define EX_FAILURE 14
160 /* A user name is in a non-local name service */
161 #define EX_NOT_LOCAL 15
163 #ifdef __cplusplus
165 #endif
167 #endif /* _USERDEFS_H */