1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers. 3*7c478bd9Sstevel@tonic-gate * All rights reserved. 4*7c478bd9Sstevel@tonic-gate * 5*7c478bd9Sstevel@tonic-gate * By using this file, you agree to the terms and conditions set 6*7c478bd9Sstevel@tonic-gate * forth in the LICENSE file which can be found at the top level of 7*7c478bd9Sstevel@tonic-gate * the sendmail distribution. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * $Id: mbdb.h,v 1.6 2002/05/24 20:50:14 gshapiro Exp $ 10*7c478bd9Sstevel@tonic-gate */ 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 13*7c478bd9Sstevel@tonic-gate 14*7c478bd9Sstevel@tonic-gate #ifndef SM_MBDB_H 15*7c478bd9Sstevel@tonic-gate # define SM_MBDB_H 16*7c478bd9Sstevel@tonic-gate 17*7c478bd9Sstevel@tonic-gate #include <pwd.h> 18*7c478bd9Sstevel@tonic-gate #include <sm/types.h> 19*7c478bd9Sstevel@tonic-gate #include <sm/limits.h> 20*7c478bd9Sstevel@tonic-gate 21*7c478bd9Sstevel@tonic-gate /* 22*7c478bd9Sstevel@tonic-gate ** This is an abstract interface for looking up local mail recipients. 23*7c478bd9Sstevel@tonic-gate */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate #define MBDB_MAXNAME 256 26*7c478bd9Sstevel@tonic-gate #define SM_NO_UID ((uid_t)(-1)) 27*7c478bd9Sstevel@tonic-gate #define SM_NO_GID ((gid_t)(-1)) 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate typedef struct 30*7c478bd9Sstevel@tonic-gate { 31*7c478bd9Sstevel@tonic-gate uid_t mbdb_uid; 32*7c478bd9Sstevel@tonic-gate gid_t mbdb_gid; 33*7c478bd9Sstevel@tonic-gate char mbdb_name[MBDB_MAXNAME]; 34*7c478bd9Sstevel@tonic-gate char mbdb_fullname[MBDB_MAXNAME]; 35*7c478bd9Sstevel@tonic-gate char mbdb_homedir[PATH_MAX]; 36*7c478bd9Sstevel@tonic-gate char mbdb_shell[PATH_MAX]; 37*7c478bd9Sstevel@tonic-gate } SM_MBDB_T; 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate extern int sm_mbdb_initialize __P((char *)); 40*7c478bd9Sstevel@tonic-gate extern void sm_mbdb_terminate __P((void)); 41*7c478bd9Sstevel@tonic-gate extern int sm_mbdb_lookup __P((char *, SM_MBDB_T *)); 42*7c478bd9Sstevel@tonic-gate extern void sm_mbdb_frompw __P((SM_MBDB_T *, struct passwd *)); 43*7c478bd9Sstevel@tonic-gate extern void sm_pwfullname __P((char *, char *, char *, size_t)); 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate #endif /* ! SM_MBDB_H */ 46