Commit | Line | Data |
---|---|---|
36e42cb8 AC |
1 | (* HCoop Domtool (http://hcoop.sourceforge.net/) |
2 | * Copyright (c) 2006, Adam Chlipala | |
617696c6 | 3 | * Copyright (c) 2011,2014 Clinton Ebadi <clinton@unknownlamer.org> |
36e42cb8 AC |
4 | * |
5 | * This program is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU General Public License | |
7 | * as published by the Free Software Foundation; either version 2 | |
8 | * of the License, or (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
18 | *) | |
19 | ||
20 | (* Network message data structures *) | |
21 | ||
22 | structure MsgTypes = struct | |
23 | ||
737c68d4 AC |
24 | datatype socket_permission = |
25 | Any | |
26 | | Client | |
27 | | Server | |
28 | | Nada | |
29 | ||
a95a0107 AC |
30 | datatype query = |
31 | QApt of string | |
32 | (* Is this apt package installed? *) | |
d351d679 AC |
33 | | QCron of string |
34 | (* Is this user allowed to use cron? *) | |
35 | | QFtp of string | |
36 | (* Is this user allowed to use FTP? *) | |
4d5126e1 AC |
37 | | QTrustedPath of string |
38 | (* Is this user restricted to trusted-path executables? *) | |
737c68d4 AC |
39 | | QSocket of string |
40 | (* What socket permissions does this user have? *) | |
167cffff | 41 | | QFirewall of {node : string, user : string} |
f9548f16 | 42 | (* What firewall rules does this user have? *) |
991d8e66 CE |
43 | | QAptExists of string |
44 | (* Does this apt package exist *) | |
a95a0107 | 45 | |
36e42cb8 AC |
46 | datatype msg = |
47 | MsgOk | |
48 | (* Your request was processed successfully. *) | |
49 | | MsgError of string | |
50 | (* Your request went wrong in some way. *) | |
51 | | MsgConfig of string | |
52 | (* Configuration source code *) | |
53 | | MsgFile of Slave.file_status | |
54 | (* The status of a configuration file has changed. *) | |
55 | | MsgDoFiles | |
56 | (* Perform the actions associated with the MsgFiles sent previously. *) | |
5ee41dd0 | 57 | | MsgGrant of Acl.acl |
411a85f2 AC |
58 | (* Grant a permission *) |
59 | | MsgRevoke of Acl.acl | |
60 | (* Revoke a permission *) | |
08a04eb4 AC |
61 | | MsgListPerms of string |
62 | (* List all of a user's permissions *) | |
63 | | MsgPerms of (string * string list) list | |
64 | (* A response to MsgListPerms, giving a permission class and all values | |
65 | * for which the user is authorized in that class *) | |
094877b1 AC |
66 | | MsgWhoHas of {class : string, value : string} |
67 | (* Which users have this permission? *) | |
68 | | MsgWhoHasResponse of string list | |
69 | (* These are the users! *) | |
c53e82e4 AC |
70 | | MsgMultiConfig of string list |
71 | (* Multiple Domtool sources in dependency order *) | |
e69e60cc AC |
72 | | MsgRmdom of string list |
73 | (* Remove all configuration associated with some domains and revoke | |
74 | * rights to those domains from all users. *) | |
1824f573 AC |
75 | | MsgRegenerate |
76 | (* Make a clean slate of it and reprocess all configuration from scratch. *) | |
e69e60cc AC |
77 | | MsgRmuser of string |
78 | (* Remove all ACL entries for a user, and remove all domains to which | |
79 | * that user and no one else has rights. *) | |
21d921a5 | 80 | | MsgCreateDbUser of {dbtype : string, passwd : string option} |
d541c618 | 81 | (* Request creation of a user for the named DBMS type *) |
fe789bea | 82 | | MsgCreateDb of {dbtype : string, dbname : string, encoding : string option} |
35659203 AC |
83 | (* Request creation of a DBMS database *) |
84 | | MsgDropDb of {dbtype : string, dbname : string} | |
85 | (* Request dropping of a DBMS database *) | |
08688401 AC |
86 | | MsgNewMailbox of {domain : string, user : string, |
87 | passwd : string, mailbox : string} | |
88 | (* Request creation of a new vmail mapping *) | |
89 | | MsgPasswdMailbox of {domain : string, user : string, passwd : string} | |
90 | (* Change a vmail account's password *) | |
0e0442b0 CE |
91 | | MsgPortalPasswdMailbox of {domain : string, user : string, oldpasswd : string, newpasswd : string} |
92 | (* Change a vmail account's password if the old password matches *) | |
08688401 AC |
93 | | MsgRmMailbox of {domain : string, user : string} |
94 | (* Remove a vmail mapping *) | |
1d3ef80e AC |
95 | | MsgListMailboxes of string |
96 | (* List all mailboxes for a domain *) | |
2fc6b0dd | 97 | | MsgMailboxes of {user : string, mailbox : string} list |
1d3ef80e | 98 | (* Reply to MsgListMailboxes *) |
2e96b9d4 AC |
99 | | MsgSaQuery of string |
100 | (* Check on the SpamAsssassin filtering status of a user or e-mail address *) | |
101 | | MsgSaStatus of bool | |
102 | (* Response to MsgSaQuery *) | |
103 | | MsgSaSet of string * bool | |
104 | (* Set the filtering status of a user or e-mail address *) | |
ebb51f80 CE |
105 | | MsgSaChanged |
106 | (* Reload spamassassin addrs *) | |
2bc5ed22 AC |
107 | | MsgSmtpLogReq of string |
108 | (* Request all current SMTP log lines about a domain *) | |
109 | | MsgSmtpLogRes of string | |
110 | (* One line of a response to MsgSmtpLogReq *) | |
86aa5de7 AC |
111 | | MsgDbPasswd of {dbtype : string, passwd : string} |
112 | (* Change a DBMS user's password *) | |
9f27d58f AC |
113 | | MsgShutdown |
114 | (* Halt the server *) | |
75585a67 AC |
115 | | MsgYes |
116 | | MsgNo | |
117 | (* Answers to boolean queries *) | |
a95a0107 AC |
118 | | MsgQuery of query |
119 | (* Ask for host-specific information *) | |
737c68d4 AC |
120 | | MsgSocket of socket_permission |
121 | (* Answer to a QSocket query *) | |
f9548f16 AC |
122 | | MsgFirewall of string list |
123 | (* Answer to a QFirewall query *) | |
fb6fac97 AC |
124 | | MsgRegenerateTc |
125 | (* MsgRegenerate without actual publishing of configuration *) | |
99cc4144 AC |
126 | | MsgGrantDb of {dbtype : string, dbname : string} |
127 | (* Grant all allowed privileges on a DBMS database to the user *) | |
00a077ab AC |
128 | | MsgMysqlFixperms |
129 | (* Run the script to grant DROP privileges on MySQL tables to owning users *) | |
1ffc47a6 AC |
130 | | MsgDescribe of string |
131 | (* Ask for a listing of all of a domain's real configuration *) | |
132 | | MsgDescription of string | |
133 | (* Reply to MsgDescribe *) | |
563e7792 AC |
134 | | MsgReUsers |
135 | (* Rerun all callbacks for cases where the set of users has changed *) | |
9b8c6dc8 AC |
136 | | MsgVmailChanged |
137 | (* Server tells slave that vmail user information has changed *) | |
73b95423 CE |
138 | | MsgFirewallRegen |
139 | (* Regenerate firewall on user machines *) | |
f296c496 CE |
140 | | MsgAptQuery of {section : string, description : string} |
141 | (* Answer to QAptExists query *) | |
36e42cb8 AC |
142 | |
143 | end |