11.6Schristos/* $NetBSD: compat_pwd.h,v 1.6 2009/01/18 01:44:09 christos Exp $ */ 21.1Stv 31.1Stv/*- 41.1Stv * Copyright (c) 2001 The NetBSD Foundation, Inc. 51.1Stv * All rights reserved. 61.1Stv * 71.1Stv * This code is derived from software contributed to The NetBSD Foundation 81.1Stv * by Todd Vierling. 91.1Stv * 101.1Stv * Redistribution and use in source and binary forms, with or without 111.1Stv * modification, are permitted provided that the following conditions 121.1Stv * are met: 131.1Stv * 1. Redistributions of source code must retain the above copyright 141.1Stv * notice, this list of conditions and the following disclaimer. 151.1Stv * 2. Redistributions in binary form must reproduce the above copyright 161.1Stv * notice, this list of conditions and the following disclaimer in the 171.1Stv * documentation and/or other materials provided with the distribution. 181.1Stv * 191.1Stv * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Stv * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Stv * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Stv * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Stv * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Stv * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Stv * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Stv * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Stv * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Stv * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Stv * POSSIBILITY OF SUCH DAMAGE. 301.1Stv */ 311.1Stv 321.1Stv#ifndef _COMPAT_PWD_H_ 331.1Stv#define _COMPAT_PWD_H_ 341.1Stv 351.1Stv/* A very special version of <pwd.h> for pwd_mkdb(8) and __nbcompat_pwscan(3). */ 361.2Spooka 371.1Stv#include "../../include/pwd.h" 381.1Stv 391.1Stv#define passwd __nbcompat_passwd 401.1Stv#define pw_scan __nbcompat_pw_scan 411.4Sjmc#ifdef LOGIN_NAME_MAX 421.4Sjmc#undef LOGIN_NAME_MAX 431.4Sjmc#endif 441.4Sjmc/* Taken from syslimits.h. Need the NetBSD def, not the local system def */ 451.4Sjmc#define LOGIN_NAME_MAX 17 461.1Stv 471.1Stv/* All elements exactly sized: */ 481.1Stvstruct passwd { 491.1Stv char *pw_name; 501.1Stv char *pw_passwd; 511.1Stv int32_t pw_uid; 521.1Stv int32_t pw_gid; 531.6Schristos int64_t pw_change; 541.1Stv char *pw_class; 551.1Stv char *pw_gecos; 561.1Stv char *pw_dir; 571.1Stv char *pw_shell; 581.6Schristos int64_t pw_expire; 591.1Stv}; 601.1Stv 611.1Stvint pw_scan(char *, struct passwd *, int *); 621.1Stv 631.1Stv#endif /* !_PWD_H_ */ 64