|
1 // Copyright (C) 1999,2000 Bruce Guenter <bruceg@em.ca> |
|
2 // |
|
3 // This program is free software; you can redistribute it and/or modify |
|
4 // it under the terms of the GNU General Public License as published by |
|
5 // the Free Software Foundation; either version 2 of the License, or |
|
6 // (at your option) any later version. |
|
7 // |
|
8 // This program is distributed in the hope that it will be useful, |
|
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 // GNU General Public License for more details. |
|
12 // |
|
13 // You should have received a copy of the GNU General Public License |
|
14 // along with this program; if not, write to the Free Software |
|
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
16 |
|
17 #ifndef VMAILMGR__VMAILMGRD__H__ |
|
18 #define VMAILMGR__VMAILMGRD__H__ |
|
19 |
|
20 #include <unistd.h> |
|
21 #include <sys/types.h> |
|
22 #include <pwd.h> |
|
23 #include "mystring/mystring.h" |
|
24 #include "misc/pwentry.h" |
|
25 #include "vpwentry/vpwentry.h" |
|
26 #include "misc/pwcrypt.h" |
|
27 #include "misc/itoa.h" |
|
28 #include "config/configrc.h" |
|
29 #include "state.h" |
|
30 #include "misc/response.h" |
|
31 #include "command.h" |
|
32 #include "log.h" |
|
33 #include "vdomain/vdomain.h" |
|
34 |
|
35 typedef unsigned char uchar; |
|
36 |
|
37 // from dispatch.cc |
|
38 extern response dispatch_cmd(command& args, int fd); |
|
39 |
|
40 #define CMD(NAME) response NAME##_cmd (command& args, int) |
|
41 #define CMD_FD(NAME) response NAME##_cmd (command& args, int fd) |
|
42 |
|
43 // from lookup.cc |
|
44 extern bool lookup_baseuser(mystring, pwentry*&, mystring&); |
|
45 extern response lookup_and_validate(const mystring&, pwentry*&, vpwentry*&, |
|
46 const mystring& password, |
|
47 bool mustexist = true, |
|
48 bool userpass = false); |
|
49 |
|
50 // from fork.cc |
|
51 extern void handle_children(int); |
|
52 extern pid_t do_fork(); |
|
53 |
|
54 #define OK_RESPONSE(FN) do { response resp = (FN); if(!resp) return resp; } while(0) |
|
55 |
|
56 #endif |