pw.h (a86e343db61f1af0b001f7d4766debd7fb14e581) | pw.h (d2d022b9fdebd6bfe2983bb688818ed8bfc422a6) |
---|---|
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 --- 64 unchanged lines hidden (view full) --- 73 74LIST_HEAD(cargs, carg); 75 76#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO) 77#define _PATH_PW_CONF "/etc/pw.conf" 78#define _UC_MAXLINE 1024 79#define _UC_MAXSHELLS 32 80 | 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 --- 64 unchanged lines hidden (view full) --- 73 74LIST_HEAD(cargs, carg); 75 76#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO) 77#define _PATH_PW_CONF "/etc/pw.conf" 78#define _UC_MAXLINE 1024 79#define _UC_MAXSHELLS 32 80 |
81struct userconf *get_userconfig(const char *cfg); |
|
81struct userconf *read_userconfig(char const * file); | 82struct userconf *read_userconfig(char const * file); |
82int write_userconfig(char const * file); | 83int write_userconfig(struct userconf *cnf, char const * file); |
83struct carg *addarg(struct cargs * _args, int ch, char *argstr); 84struct carg *getarg(struct cargs * _args, int ch); 85 | 84struct carg *addarg(struct cargs * _args, int ch, char *argstr); 85struct carg *getarg(struct cargs * _args, int ch); 86 |
86int pw_user(int mode, char *name, long id, struct cargs * _args); 87int pw_usernext(struct userconf *cnf, bool quiet); 88int pw_group(int mode, char *name, long id, struct cargs * _args); | 87int pw_group_add(int argc, char **argv, char *name); 88int pw_group_del(int argc, char **argv, char *name); 89int pw_group_mod(int argc, char **argv, char *name); 90int pw_group_next(int argc, char **argv, char *name); 91int pw_group_show(int argc, char **argv, char *name); 92int pw_user_add(int argc, char **argv, char *name); 93int pw_user_add(int argc, char **argv, char *name); 94int pw_user_add(int argc, char **argv, char *name); 95int pw_user_add(int argc, char **argv, char *name); 96int pw_user_del(int argc, char **argv, char *name); 97int pw_user_lock(int argc, char **argv, char *name); 98int pw_user_mod(int argc, char **argv, char *name); 99int pw_user_next(int argc, char **argv, char *name); 100int pw_user_show(int argc, char **argv, char *name); 101int pw_user_unlock(int argc, char **argv, char *name); |
89int pw_groupnext(struct userconf *cnf, bool quiet); 90char *pw_checkname(char *name, int gecos); | 102int pw_groupnext(struct userconf *cnf, bool quiet); 103char *pw_checkname(char *name, int gecos); |
104uintmax_t pw_checkid(char *nptr, uintmax_t maxval); 105int pw_checkfd(char *nptr); |
|
91 92int addnispwent(const char *path, struct passwd *pwd); 93int delnispwent(const char *path, const char *login); 94int chgnispwent(const char *path, const char *login, struct passwd *pwd); 95 | 106 107int addnispwent(const char *path, struct passwd *pwd); 108int delnispwent(const char *path, const char *login); 109int chgnispwent(const char *path, const char *login, struct passwd *pwd); 110 |
111int groupadd(struct userconf *, char *name, gid_t id, char *members, int fd, 112 bool dryrun, bool pretty, bool precrypted); 113 114int nis_update(void); 115 |
|
96int boolean_val(char const * str, int dflt); 97char const *boolean_str(int val); 98char *newstr(char const * p); 99 100void pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) __printflike(4, 5); 101char *pw_pwcrypt(char *password); 102 103extern const char *Modes[]; 104extern const char *Which[]; 105 106uintmax_t strtounum(const char * __restrict, uintmax_t, uintmax_t, 107 const char ** __restrict); | 116int boolean_val(char const * str, int dflt); 117char const *boolean_str(int val); 118char *newstr(char const * p); 119 120void pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) __printflike(4, 5); 121char *pw_pwcrypt(char *password); 122 123extern const char *Modes[]; 124extern const char *Which[]; 125 126uintmax_t strtounum(const char * __restrict, uintmax_t, uintmax_t, 127 const char ** __restrict); |