[BACK]Return to virtual.h CVS log [TXT][DIR] Up to [local] / src / usr.sbin / popa3d

File: [local] / src / usr.sbin / popa3d / Attic / virtual.h (download)

Revision 1.3, Wed Mar 27 14:08:43 2002 UTC (22 years, 2 months ago) by camield
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.2: +2 -2 lines

Mostly cosmetic update so we can call it 0.5.

ok millert@, fgsch@

/* $OpenBSD: virtual.h,v 1.3 2002/03/27 14:08:43 camield Exp $ */

/*
 * Virtual domain support.
 */

#ifndef _POP_VIRTUAL_H
#define _POP_VIRTUAL_H

#include <pwd.h>
#include <sys/types.h>

/*
 * These are set by the authentication routine, below.
 */
extern char *virtual_domain;
extern char *virtual_spool;

/*
 * Initializes the virtual domain support at startup. Note that this will
 * only be called once in standalone mode, so don't expect an open socket
 * here. Returns a non-zero value on error.
 */
extern int virtual_startup(void);

/*
 * Tries to authenticate a username/password pair for the virtual domain
 * indicated either by the connected IP address (the socket is available
 * on fd 0), or as a part of the username. If the virtual domain is known,
 * virtual_domain and virtual_spool are set appropriately. If the username
 * is known as well, known is set. Returns the template user to run as if
 * authentication succeeds, or NULL otherwise.
 */
extern struct passwd *virtual_userpass(char *user, char *pass, int *known);

#endif