summaryrefslogtreecommitdiff
path: root/libexec/popa3d/virtual.h
diff options
context:
space:
mode:
authorCamiel Dobbelaar <camield@cvs.openbsd.org>2001-08-13 20:03:22 +0000
committerCamiel Dobbelaar <camield@cvs.openbsd.org>2001-08-13 20:03:22 +0000
commit9b80930a98b45e288345a7e869d320fab4f0a698 (patch)
tree1fd86ad990f07f8f8868ecdca6c0e0d38d845fca /libexec/popa3d/virtual.h
parentef62c6d658b92504a3b38095b540e66cefb1d83f (diff)
Solar Designer's popa3d POP3 daemon, version 0.4.9.1
Changes so far: - removed auth_pam.c - removed auth_shadow.c - add BSD makefile - remove md5, in favour of libc md5 - params.h: AUTH_PASSWD and MAIL_SPOOL_PATH
Diffstat (limited to 'libexec/popa3d/virtual.h')
-rw-r--r--libexec/popa3d/virtual.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/libexec/popa3d/virtual.h b/libexec/popa3d/virtual.h
new file mode 100644
index 00000000000..92173a32bc9
--- /dev/null
+++ b/libexec/popa3d/virtual.h
@@ -0,0 +1,34 @@
+/*
+ * 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