diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-19 13:05:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-19 13:05:58 +0000 |
commit | a6a38350f779ddf3a6febf67dda7714fe368e492 (patch) | |
tree | b8ffbc248c20776618b1d6aa93ec16abb19e78d1 /usr.sbin/popa3d/virtual.h | |
parent | 580e400b41d341c2ad1bfe153d5ca6553351703a (diff) |
libexec is the wrong place for popa3d, since it can be started WITHOUT inetd
Diffstat (limited to 'usr.sbin/popa3d/virtual.h')
-rw-r--r-- | usr.sbin/popa3d/virtual.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/usr.sbin/popa3d/virtual.h b/usr.sbin/popa3d/virtual.h new file mode 100644 index 00000000000..312e7c99743 --- /dev/null +++ b/usr.sbin/popa3d/virtual.h @@ -0,0 +1,36 @@ +/* $OpenBSD: virtual.h,v 1.1 2001/08/19 13:05:57 deraadt 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, mailbox is set to the username. Returns the template + * user to run as if the authentication is successful, or NULL otherwise. + */ +extern struct passwd *virtual_userpass(char *user, char *pass, char **mailbox); + +#endif |