table.c revision 114594
133965Sjdp/*- 233965Sjdp * Copyright (c) 1990, 1993, 1994 338889Sjdp * The Regents of the University of California. All rights reserved. 460484Sobrien * 533965Sjdp * Redistribution and use in source and binary forms, with or without 633965Sjdp * modification, are permitted provided that the following conditions 738889Sjdp * are met: 838889Sjdp * 1. Redistributions of source code must retain the above copyright 938889Sjdp * notice, this list of conditions and the following disclaimer. 10130561Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1189857Sobrien * notice, this list of conditions and the following disclaimer in the 12130561Sobrien * documentation and/or other materials provided with the distribution. 1338889Sjdp * 3. All advertising materials mentioning features or use of this software 1489857Sobrien * must display the following acknowledgement: 1589857Sobrien * This product includes software developed by the University of 1689857Sobrien * California, Berkeley and its contributors. 1789857Sobrien * 4. Neither the name of the University nor the names of its contributors 1889857Sobrien * may be used to endorse or promote products derived from this software 1989857Sobrien * without specific prior written permission. 20130561Sobrien * 2189857Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2289857Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2389857Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2489857Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2589857Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2638889Sjdp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2738889Sjdp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2838889Sjdp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2938889Sjdp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3038889Sjdp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3138889Sjdp * SUCH DAMAGE. 3238889Sjdp */ 3338889Sjdp 3438889Sjdp#if 0 3538889Sjdp#ifndef lint 3638889Sjdpstatic const char sccsid[] = "@(#)table.c 8.3 (Berkeley) 4/2/94"; 3733965Sjdp#endif /* not lint */ 3833965Sjdp#endif 3933965Sjdp#include <sys/cdefs.h> 4033965Sjdp__FBSDID("$FreeBSD: head/usr.bin/chpass/table.c 114594 2003-05-03 19:44:46Z obrien $"); 4133965Sjdp 4233965Sjdp#include <sys/types.h> 4333965Sjdp#include <stddef.h> 4433965Sjdp#include "chpass.h" 4533965Sjdp 4633965Sjdpchar e1[] = ": "; 4733965Sjdpchar e2[] = ":,"; 4833965Sjdp 4933965SjdpENTRY list[] = { 5033965Sjdp { "login", p_login, 1, 5, e1, NULL }, 5133965Sjdp { "password", p_passwd, 1, 8, e1, NULL }, 5233965Sjdp { "uid", p_uid, 1, 3, e1, NULL }, 5333965Sjdp { "gid", p_gid, 1, 3, e1, NULL }, 5433965Sjdp { "class", p_class, 1, 5, e1, NULL }, 5533965Sjdp { "change", p_change, 1, 6, NULL, NULL }, 5633965Sjdp { "expire", p_expire, 1, 6, NULL, NULL }, 5733965Sjdp#ifdef RESTRICT_FULLNAME_CHANGE /* do not allow fullname changes */ 5833965Sjdp { "full name", p_gecos, 1, 9, e2, NULL }, 5933965Sjdp#else 6033965Sjdp { "full name", p_gecos, 0, 9, e2, NULL }, 6133965Sjdp#endif 6233965Sjdp { "office phone", p_gecos, 0, 12, e2, NULL }, 6333965Sjdp { "home phone", p_gecos, 0, 10, e2, NULL }, 6433965Sjdp { "office location", p_gecos, 0, 15, e2, NULL }, 6533965Sjdp { "other information", p_gecos, 0, 11, e1, NULL }, 6633965Sjdp { "home directory", p_hdir, 1, 14, e1, NULL }, 6789857Sobrien { "shell", p_shell, 0, 5, e1, NULL }, 6877298Sobrien { NULL, NULL, 0, 0, NULL, NULL }, 6977298Sobrien}; 7077298Sobrien