pw.h (219408) | pw.h (242349) |
---|---|
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/pw.h 219408 2011-03-08 20:13:29Z jkim $ | 26 * $FreeBSD: head/usr.sbin/pw/pw.h 242349 2012-10-30 08:00:53Z bapt $ |
27 */ 28 29#include <stdio.h> 30#include <stdlib.h> 31#include <string.h> 32#include <unistd.h> 33#include <stdarg.h> 34#include <errno.h> --- 69 unchanged lines hidden (view full) --- 104int write_userconfig(char const * file); 105struct carg *addarg(struct cargs * _args, int ch, char *argstr); 106struct carg *getarg(struct cargs * _args, int ch); 107 108int pw_user(struct userconf * cnf, int mode, struct cargs * _args); 109int pw_group(struct userconf * cnf, int mode, struct cargs * _args); 110char *pw_checkname(u_char *name, int gecos); 111 | 27 */ 28 29#include <stdio.h> 30#include <stdlib.h> 31#include <string.h> 32#include <unistd.h> 33#include <stdarg.h> 34#include <errno.h> --- 69 unchanged lines hidden (view full) --- 104int write_userconfig(char const * file); 105struct carg *addarg(struct cargs * _args, int ch, char *argstr); 106struct carg *getarg(struct cargs * _args, int ch); 107 108int pw_user(struct userconf * cnf, int mode, struct cargs * _args); 109int pw_group(struct userconf * cnf, int mode, struct cargs * _args); 110char *pw_checkname(u_char *name, int gecos); 111 |
112int addpwent(struct passwd * pwd); 113int delpwent(struct passwd * pwd); 114int chgpwent(char const * login, struct passwd * pwd); 115int fmtpwent(char *buf, struct passwd * pwd); 116 | |
117int addnispwent(const char *path, struct passwd *pwd); 118int delnispwent(const char *path, const char *login); 119int chgnispwent(const char *path, const char *login, struct passwd *pwd); 120 | 112int addnispwent(const char *path, struct passwd *pwd); 113int delnispwent(const char *path, const char *login); 114int chgnispwent(const char *path, const char *login, struct passwd *pwd); 115 |
121int addgrent(struct group * grp); 122int delgrent(struct group * grp); 123int chggrent(char const * login, struct group * grp); 124 | |
125int boolean_val(char const * str, int dflt); 126char const *boolean_str(int val); 127char *newstr(char const * p); 128 129void pw_log(struct userconf * cnf, int mode, int which, char const * fmt,...) __printflike(4, 5); 130char *pw_pwcrypt(char *password); 131 132extern const char *Modes[]; 133extern const char *Which[]; | 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[]; |