78 * authorization - One or more comma separated authorizations defined
79 * in auth_attr(4).
80 * profile - One or more comma separated execution profiles defined
81 * in prof_attr(4)
82 * role - One or more comma-separated role names defined in user_attr(4)
83 * project - One or more comma-separated project names or numbers
84 *
85 */
86
87 extern struct userdefs *getusrdef();
88 extern void dispusrdef();
89
90 static void cleanup();
91
92 extern int check_perm(), valid_expire();
93 extern int putusrdef(), valid_uid();
94 extern int call_passmgmt(), edit_group(), create_home();
95 extern int edit_project();
96 extern int **valid_lgroup();
97 extern projid_t **valid_lproject();
98 extern void update_def(struct userdefs *);
99 extern void import_def(struct userdefs *);
100 extern int get_default_zfs_flags();
101
102 static uid_t uid; /* new uid */
103 static char *logname; /* login name to add */
104 static struct userdefs *usrdefs; /* defaults for useradd */
105
106 char *cmdname;
107
108 static char homedir[ PATH_MAX + 1 ]; /* home directory */
109 static char gidstring[32]; /* group id string representation */
110 static gid_t gid; /* gid of new login */
111 static char uidstring[32]; /* user id string representation */
112 static char *uidstr = NULL; /* uid from command line */
113 static char *base_dir = NULL; /* base_dir from command line */
114 static char *group = NULL; /* group from command line */
115 static char *grps = NULL; /* multi groups from command line */
116 static char *dir = NULL; /* home dir from command line */
117 static char *shell = NULL; /* shell from command line */
118 static char *comment = NULL; /* comment from command line */
119 static char *skel_dir = NULL; /* skel dir from command line */
|
78 * authorization - One or more comma separated authorizations defined
79 * in auth_attr(4).
80 * profile - One or more comma separated execution profiles defined
81 * in prof_attr(4)
82 * role - One or more comma-separated role names defined in user_attr(4)
83 * project - One or more comma-separated project names or numbers
84 *
85 */
86
87 extern struct userdefs *getusrdef();
88 extern void dispusrdef();
89
90 static void cleanup();
91
92 extern int check_perm(), valid_expire();
93 extern int putusrdef(), valid_uid();
94 extern int call_passmgmt(), edit_group(), create_home();
95 extern int edit_project();
96 extern int **valid_lgroup();
97 extern projid_t **valid_lproject();
98 extern int get_default_zfs_flags();
99
100 static uid_t uid; /* new uid */
101 static char *logname; /* login name to add */
102 static struct userdefs *usrdefs; /* defaults for useradd */
103
104 char *cmdname;
105
106 static char homedir[ PATH_MAX + 1 ]; /* home directory */
107 static char gidstring[32]; /* group id string representation */
108 static gid_t gid; /* gid of new login */
109 static char uidstring[32]; /* user id string representation */
110 static char *uidstr = NULL; /* uid from command line */
111 static char *base_dir = NULL; /* base_dir from command line */
112 static char *group = NULL; /* group from command line */
113 static char *grps = NULL; /* multi groups from command line */
114 static char *dir = NULL; /* home dir from command line */
115 static char *shell = NULL; /* shell from command line */
116 static char *comment = NULL; /* comment from command line */
117 static char *skel_dir = NULL; /* skel dir from command line */
|