/*
 * T.C.F.S. Utils 2.0 $Revision: 2.1 $
 *
 * Authors:	Giuseppe Cattaneo, <cattaneo@udsab.dia.unisa.it>
 *		Giuseppe Persiano, <giuper@udsab.dia.unisa.it>
 *		Luigi Catuogno, <luicat@mikonos.dia.unisa.it>
 *		Andrea Cozzolino, <andcoz@mikonos.dia.unisa.it>
 *		Angelo Celentano, <angcel@mikonos.dia.unisa.it>
 *		Aniello Del Sorbo, <anidel@mikonos.dia.unisa.it>
 *		Ermelindo Mauriello, <ermmau@mikonos.dia.unisa.it>
 *		Raffaele Pisapia, <rafpis@mikonos.dia.unisa.it>
 *
 * Permission  to use,  copy,  and modify this  software  without fee
 * is hereby granted, provided that this entire notice is included in
 * all  copies  of  any  software  which  is  or includes  a copy  or
 * modification of this  software and in all copies of the supporting
 * documentation for such software.
 *
 * This  software maybe  be used for  any purpose provided  the above 
 * copyright  notice  is  retained.  It is  supplied as  is, with  no 
 * warranty expressed or implied.
 */

/*
 *       $Source: /home/anidel/Wip/TCFS-2.2.0a/tcfslib-0.2/include/RCS/tcfspwdb.h,v $
 *        $State: Exp $
 *
 *     $Revision: 2.1 $
 *       $Author: anidel $
 *         $Date: 1998/12/10 10:31:27 $
 *       $Locker:  $
 */              
/* -+-_== */ 

#ifndef _TCFSPWDB_H_
#define _TCFSPWDB_H_

#include <unistd.h>
#include "tcfsdefines.h"

#define UserLen 	8
#define PassLen 	UUKEYSIZE
#define MaxLineLen 	100
#define MaxUserLen  	8
#define NumOfField   2

typedef struct tcfspwdb_r
{
	char user[UserLen];
	char upw[PassLen];
} tcfspwdb;

typedef struct tcfsgpwdb_r
{
	char user[UserLen];
	char gkey[PassLen];
	tcfs_gid_t gid;
	int n;
	int soglia;
} tcfsgpwdb;

#define U_DEL	0
#define U_NEW	1
#define U_CHG	2
#define U_CKL	3

#define F_USR			0x80
#define F_PWD			0x40
#define F_GID			0x20
#define F_GKEY			0x10
#define F_MEMBERS		0x08
#define F_THRESHOLD	0x04

#define TCFSPWDBSIZ	1024

#define TCFSPWDB	"/etc/tcfspwdb"
#define TCFSPWDFILE	"/etc/tcfspwdb"
#define TCFSPWDOLD	"/etc/tcfspwdb.old"
#define TCFSPWDLOCK	"/etc/tcfspwdb.lock"
#define TCFSPWDTMP	"/etc/tcfstmp"

#define TCFSGPWDB	"/etc/tcfsgpwdb"

#endif /* _TCFSPWDB_H_ */
