/*
    slforum version 1.x - Simple chat room usable via telnet.
    Copyright (C) 2000 Jeremy D. Monin, Dan Chin, Matt Lochansky
	(forum@shadowlands.org).
    Based on jdkchat version 1.3, J.D.Koftinoff Software, Ltd. (GPL'd)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef __PASSWD_H
#define __PASSWD_H 1


#ifdef __cplusplus
extern "C" {
#endif

#include <utmp.h>

/* for writeloginentry */
#define UT_LINE_FMT "slforum/%d"


struct slf_userinfo *validate (char *uname, char *passwd, char *hostname);
void initlogentry (struct utmp *pentry,
		   char *fromhost, unsigned long hostaddr);
void writeloginentry (struct utmp *pentry, char *username,
		      const char *fname );
void writelogoutentry (struct utmp *pentry, const char *fname);

struct slf_userinfo *slf_getpwnam(const char * name);
struct slf_userinfo *slf_getpwuid(uid_t uid);
void slf_virtuser_set_admin_gid (gid_t admingid);

#include "passwd-db-inc.h"


#ifdef __cplusplus
	   }
#endif	/* defined __cplusplus */
#endif	/* ndef'd __PASSWD_H */
