1N/A/*
1N/A * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
1N/A * All rights reserved.
1N/A *
1N/A * By using this file, you agree to the terms and conditions set
1N/A * forth in the LICENSE file which can be found at the top level of
1N/A * the sendmail distribution.
1N/A *
1N/A * $Id: mbdb.h,v 1.6 2002/05/24 20:50:14 gshapiro Exp $
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#ifndef SM_MBDB_H
1N/A# define SM_MBDB_H
1N/A
1N/A#include <pwd.h>
1N/A#include <sm/types.h>
1N/A#include <sm/limits.h>
1N/A
1N/A/*
1N/A** This is an abstract interface for looking up local mail recipients.
1N/A*/
1N/A
1N/A#define MBDB_MAXNAME 256
1N/A#define SM_NO_UID ((uid_t)(-1))
1N/A#define SM_NO_GID ((gid_t)(-1))
1N/A
1N/Atypedef struct
1N/A{
1N/A uid_t mbdb_uid;
1N/A gid_t mbdb_gid;
1N/A char mbdb_name[MBDB_MAXNAME];
1N/A char mbdb_fullname[MBDB_MAXNAME];
1N/A char mbdb_homedir[PATH_MAX];
1N/A char mbdb_shell[PATH_MAX];
1N/A} SM_MBDB_T;
1N/A
1N/Aextern int sm_mbdb_initialize __P((char *));
1N/Aextern void sm_mbdb_terminate __P((void));
1N/Aextern int sm_mbdb_lookup __P((char *, SM_MBDB_T *));
1N/Aextern void sm_mbdb_frompw __P((SM_MBDB_T *, struct passwd *));
1N/Aextern void sm_pwfullname __P((char *, char *, char *, size_t));
1N/A
1N/A#endif /* ! SM_MBDB_H */