geniconvtbl: small cstyle fix
[unleashed.git] / include / userdefs.h
blob7c6407cd17859117dba88f2e7318128601d3d392
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 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.7.1.1 */
36 #include <project.h>
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
43 * The definitions in this file are local to the OA&M subsystem. General
44 * use is not encouraged.
47 /* User/group default values */
48 #define DEFGID 99 /* max reserved group id */
49 #define DEFRID 99
50 #define DEFPROJ 3
51 #define DEFPROJNAME "default"
52 #define DEFGROUP 1
53 #define DEFGNAME "other"
54 #define DEFPARENT "/home"
55 #define DEFSKL "/etc/skel"
56 #define DEFSHL "/bin/sh"
57 #define DEFROLESHL "/bin/pfsh"
58 #define DEFINACT 0
59 #define DEFEXPIRE ""
60 #define DEFAUTH ""
61 #define DEFPROF ""
62 #define DEFROLEPROF "All"
63 #define DEFROLE ""
64 #define DEFLIMPRIV ""
65 #define DEFDFLTPRIV ""
66 #define DEFLOCK_AFTER_RETRIES ""
68 /* Defaults file keywords */
69 #define RIDSTR "defrid="
70 #define GIDSTR "defgroup="
71 #define GNAMSTR "defgname="
72 #define PARSTR "defparent="
73 #define SKLSTR "defskel="
74 #define SHELLSTR "defshell="
75 #define INACTSTR "definact="
76 #define EXPIRESTR "defexpire="
77 #define AUTHSTR "defauthorization="
78 #define PROFSTR "defprofile="
79 #define ROLESTR "defrole="
80 #define PROJSTR "defproj="
81 #define PROJNMSTR "defprojname="
82 #define LIMPRSTR "deflimitpriv="
83 #define DFLTPRSTR "defdefaultpriv="
84 #define FHEADER "# Default values for useradd. Changed "
85 #define FHEADER_ROLE "# Default values for roleadd. Changed "
86 #define LOCK_AFTER_RETRIESSTR "deflock_after_retries="
88 /* Defaults file */
89 #define DEFFILE "/usr/sadm/defadduser"
90 #define DEFROLEFILE "/usr/sadm/defaddrole"
91 #define GROUP "/etc/group"
93 /* various limits */
94 #define MAXGLEN 9 /* max length of group name */
95 #define MAXDLEN 80 /* max length of a date string */
97 /* defaults structure */
98 struct userdefs {
99 int defrid; /* highest reserved uid */
100 int defgroup; /* default group id */
101 char *defgname; /* default group name */
102 char *defparent; /* default base directory for new logins */
103 char *defskel; /* default skel directory */
104 char *defshell; /* default shell */
105 int definact; /* default inactive */
106 char *defexpire; /* default expire date */
107 char *defauth; /* default authorization */
108 char *defprof; /* default profile */
109 char *defrole; /* default role */
110 projid_t defproj; /* default project id */
111 char *defprojname; /* default project name */
112 char *deflimpriv; /* default limitpriv */
113 char *defdfltpriv; /* default defaultpriv */
114 char *deflock_after_retries; /* default lock_after_retries */
118 /* exit() values for user/group commands */
120 /* Everything succeeded */
121 #define EX_SUCCESS 0
123 /* No permission */
124 #define EX_NO_PERM 1
126 /* Command syntax error */
127 #define EX_SYNTAX 2
129 /* Invalid argument given */
130 #define EX_BADARG 3
132 /* A gid or uid already exists */
133 #define EX_ID_EXISTS 4
135 /* PASSWD and SHADOW are inconsistent with each other */
136 #define EX_INCONSISTENT 5
138 /* A group or user name doesn't exist */
139 #define EX_NAME_NOT_EXIST 6
141 /* GROUP, PASSWD, or SHADOW file missing */
142 #define EX_MISSING 7
144 /* GROUP, PASSWD, or SHAWOW file is busy */
145 #define EX_BUSY 8
147 /* A group or user name already exists */
148 #define EX_NAME_EXISTS 9
150 /* Unable to update GROUP, PASSWD, or SHADOW file */
151 #define EX_UPDATE 10
153 /* Not enough space */
154 #define EX_NOSPACE 11
156 /* Unable to create/remove/move home directory */
157 #define EX_HOMEDIR 12
159 /* new login already in use */
160 #define EX_NL_USED 13
162 /* Unexpected failure */
163 #define EX_FAILURE 14
165 /* A user name is in a non-local name service */
166 #define EX_NOT_LOCAL 15
168 #ifdef __cplusplus
170 #endif
172 #endif /* _USERDEFS_H */