summaryrefslogtreecommitdiffstats
path: root/pw/pw.h
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-06-07 14:34:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-06-07 14:34:38 +0000
commit9abed571e35148d563a116eca8c222a7afa18adc (patch)
tree5eeab2ebb6b54baad8fd66879aa383260489baaa /pw/pw.h
parent64c0761c094841650f4a2f526423c5e0116b5425 (diff)
downloadpw-darwin-9abed571e35148d563a116eca8c222a7afa18adc.tar.gz
pw-darwin-9abed571e35148d563a116eca8c222a7afa18adc.tar.zst
pw-darwin-9abed571e35148d563a116eca8c222a7afa18adc.zip
Add a new global struct pwconf to store etcpath, rootdir and struct userconf
Do not add anymore -R and -V to arglist Add an error message if both -V and -R are set in arguments
Diffstat (limited to 'pw/pw.h')
-rw-r--r--pw/pw.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/pw/pw.h b/pw/pw.h
index 5950681..9c0aa32 100644
--- a/pw/pw.h
+++ b/pw/pw.h
@@ -72,30 +72,6 @@ struct carg
LIST_HEAD(cargs, carg);
-struct userconf
-{
- int default_password; /* Default password for new users? */
- int reuse_uids; /* Reuse uids? */
- int reuse_gids; /* Reuse gids? */
- char *nispasswd; /* Path to NIS version of the passwd file */
- char *dotdir; /* Where to obtain skeleton files */
- char *newmail; /* Mail to send to new accounts */
- char *logfile; /* Where to log changes */
- char *home; /* Where to create home directory */
- mode_t homemode; /* Home directory permissions */
- char *shelldir; /* Where shells are located */
- char **shells; /* List of shells */
- char *shell_default; /* Default shell */
- char *default_group; /* Default group number */
- char **groups; /* Default (additional) groups */
- char *default_class; /* Default user class */
- uid_t min_uid, max_uid; /* Allowed range of uids */
- gid_t min_gid, max_gid; /* Allowed range of gids */
- int expire_days; /* Days to expiry */
- int password_days; /* Days to password expiry */
- int numgroups; /* (internal) size of default_group array */
-};
-
#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO)
#define _PATH_PW_CONF "/etc/pw.conf"
#define _UC_MAXLINE 1024
@@ -106,8 +82,8 @@ int write_userconfig(char const * file);
struct carg *addarg(struct cargs * _args, int ch, char *argstr);
struct carg *getarg(struct cargs * _args, int ch);
-int pw_user(struct userconf * cnf, int mode, struct cargs * _args);
-int pw_group(struct userconf * cnf, int mode, struct cargs * _args);
+int pw_user(int mode, struct cargs * _args);
+int pw_group(int mode, struct cargs * _args);
char *pw_checkname(char *name, int gecos);
int addnispwent(const char *path, struct passwd *pwd);