Deleted Added
full compact
pwupd.h (285408) pwupd.h (285412)
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/pw/pwupd.h 285408 2015-07-11 21:09:50Z bapt $
26 * $FreeBSD: head/usr.sbin/pw/pwupd.h 285412 2015-07-11 23:07:17Z bapt $
27 */
28
29#ifndef _PWUPD_H_
30#define _PWUPD_H_
31
32#include <sys/cdefs.h>
33#include <sys/param.h>
34#include <sys/types.h>
35
36#include <pwd.h>
37#include <grp.h>
38#include <stdbool.h>
27 */
28
29#ifndef _PWUPD_H_
30#define _PWUPD_H_
31
32#include <sys/cdefs.h>
33#include <sys/param.h>
34#include <sys/types.h>
35
36#include <pwd.h>
37#include <grp.h>
38#include <stdbool.h>
39#include <stringlist.h>
39
40#if defined(__FreeBSD__)
41#define RET_SETGRENT int
42#else
43#define RET_SETGRENT void
44#endif
45
46struct pwf {

--- 6 unchanged lines hidden (view full) ---

53 RET_SETGRENT (*_setgrent)(void);
54 void (*_endgrent)(void);
55 struct group * (*_getgrent)(void);
56 struct group * (*_getgrgid)(gid_t gid);
57 struct group * (*_getgrnam)(const char * nam);
58};
59
60struct userconf {
40
41#if defined(__FreeBSD__)
42#define RET_SETGRENT int
43#else
44#define RET_SETGRENT void
45#endif
46
47struct pwf {

--- 6 unchanged lines hidden (view full) ---

54 RET_SETGRENT (*_setgrent)(void);
55 void (*_endgrent)(void);
56 struct group * (*_getgrent)(void);
57 struct group * (*_getgrgid)(gid_t gid);
58 struct group * (*_getgrnam)(const char * nam);
59};
60
61struct userconf {
61 int default_password; /* Default password for new users? */
62 int reuse_uids; /* Reuse uids? */
63 int reuse_gids; /* Reuse gids? */
64 char *nispasswd; /* Path to NIS version of the passwd file */
65 char *dotdir; /* Where to obtain skeleton files */
66 char *newmail; /* Mail to send to new accounts */
67 char *logfile; /* Where to log changes */
68 char *home; /* Where to create home directory */
69 mode_t homemode; /* Home directory permissions */
70 char *shelldir; /* Where shells are located */
71 char **shells; /* List of shells */
72 char *shell_default; /* Default shell */
73 char *default_group; /* Default group number */
74 char **groups; /* Default (additional) groups */
75 char *default_class; /* Default user class */
76 uid_t min_uid, max_uid; /* Allowed range of uids */
77 gid_t min_gid, max_gid; /* Allowed range of gids */
78 int expire_days; /* Days to expiry */
79 int password_days; /* Days to password expiry */
80 int numgroups; /* (internal) size of default_group array */
62 int default_password; /* Default password for new users? */
63 int reuse_uids; /* Reuse uids? */
64 int reuse_gids; /* Reuse gids? */
65 char *nispasswd; /* Path to NIS version of the passwd file */
66 char *dotdir; /* Where to obtain skeleton files */
67 char *newmail; /* Mail to send to new accounts */
68 char *logfile; /* Where to log changes */
69 char *home; /* Where to create home directory */
70 mode_t homemode; /* Home directory permissions */
71 char *shelldir; /* Where shells are located */
72 char **shells; /* List of shells */
73 char *shell_default; /* Default shell */
74 char *default_group; /* Default group number */
75 StringList *groups; /* Default (additional) groups */
76 char *default_class; /* Default user class */
77 uid_t min_uid, max_uid; /* Allowed range of uids */
78 gid_t min_gid, max_gid; /* Allowed range of gids */
79 int expire_days; /* Days to expiry */
80 int password_days; /* Days to password expiry */
81};
82
83struct pwconf {
84 char rootdir[MAXPATHLEN];
85 char etcpath[MAXPATHLEN];
86 char *newname;
87 char *config;
88 char *gecos;

--- 64 unchanged lines hidden (view full) ---

153struct group * vgetgrent(void);
154struct group * vgetgrgid(gid_t gid);
155struct group * vgetgrnam(const char * nam);
156RET_SETGRENT vsetgrent(void);
157void vendgrent(void);
158
159void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid);
160void rm_r(char const * dir, uid_t uid);
81};
82
83struct pwconf {
84 char rootdir[MAXPATHLEN];
85 char etcpath[MAXPATHLEN];
86 char *newname;
87 char *config;
88 char *gecos;

--- 64 unchanged lines hidden (view full) ---

153struct group * vgetgrent(void);
154struct group * vgetgrgid(gid_t gid);
155struct group * vgetgrnam(const char * nam);
156RET_SETGRENT vsetgrent(void);
157void vendgrent(void);
158
159void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid);
160void rm_r(char const * dir, uid_t uid);
161int extendarray(char ***buf, int *buflen, int needed);
162__END_DECLS
163
164#endif /* !_PWUPD_H */
161__END_DECLS
162
163#endif /* !_PWUPD_H */