2 * This module handles states which are global to the entire server.
4 * Copyright (c) 1987-2018 by the citadel.org team
6 * This program is open source software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
17 #include <libcitadel.h>
19 #include "ctdl_module.h"
21 #include "citserver.h"
24 long control_highest_user = 0;
27 * This is the legacy "control record" format for the message base. If found
28 * on disk, its contents will be migrated into the system configuration. Never
31 struct legacy_ctrl_format {
32 long MMhighest; /* highest message number in file */
33 unsigned MMflags; /* Global system flags */
34 long MMnextuser; /* highest user number on system */
35 long MMnextroom; /* highest room number on system */
36 int MM_hosted_upgrade_level; /* Server-hosted upgrade level */
37 int MM_fulltext_wordbreaker; /* ID of wordbreaker in use */
38 long MMfulltext; /* highest message number indexed */
39 int MMdbversion; /* Version of Berkeley DB used on previous server run */
44 * Callback to get highest room number when rebuilding message base metadata
46 * sanity_diag_mode (can be set by -s flag at startup) may be:
47 * 0 = attempt to fix inconsistencies
48 * 1 = show inconsistencies but don't repair them, exit after complete
49 * 2 = show inconsistencies but don't repair them, continue execution
51 void control_find_highest(struct ctdlroom *qrbuf, void *data)
54 struct cdbdata *cdbfr;
59 if (qrbuf->QRnumber > CtdlGetConfigLong("MMnextroom")) {
60 syslog(LOG_DEBUG, "control: fixing MMnextroom %ld > %ld , found in %s",
61 qrbuf->QRnumber, CtdlGetConfigLong("MMnextroom"), qrbuf->QRname
63 if (!sanity_diag_mode) {
64 CtdlSetConfigLong("MMnextroom", qrbuf->QRnumber);
68 CtdlGetRoom(&room, qrbuf->QRname);
70 /* Load the message list */
71 cdbfr = cdb_fetch(CDB_MSGLISTS, &room.QRnumber, sizeof(long));
73 msglist = (long *) cdbfr->ptr;
74 num_msgs = cdbfr->len / sizeof(long);
76 return; /* No messages at all? No further action. */
80 for (c=0; c<num_msgs; c++) {
81 if (msglist[c] > CtdlGetConfigLong("MMhighest")) {
82 syslog(LOG_DEBUG, "control: fixing MMhighest %ld > %ld , found in %s",
83 msglist[c], CtdlGetConfigLong("MMhighest"), qrbuf->QRname
85 if (!sanity_diag_mode) {
86 CtdlSetConfigLong("MMhighest", msglist[c]);
97 * Callback to get highest user number.
99 void control_find_user(struct ctdluser *EachUser, void *out_data)
101 if (EachUser->usernum > CtdlGetConfigLong("MMnextuser")) {
102 syslog(LOG_DEBUG, "control: fixing MMnextuser %ld > %ld , found in %s",
103 EachUser->usernum, CtdlGetConfigLong("MMnextuser"), EachUser->fullname
105 if (!sanity_diag_mode) {
106 CtdlSetConfigLong("MMnextuser", EachUser->usernum);
113 * If we have a legacy format control record on disk, import it.
115 void migrate_legacy_control_record(void)
118 struct legacy_ctrl_format c;
119 memset(&c, 0, sizeof(c));
121 fp = fopen(file_citadel_control, "rb+");
123 syslog(LOG_INFO, "control: legacy format record found -- importing to db");
124 fread(&c, sizeof(struct legacy_ctrl_format), 1, fp);
126 CtdlSetConfigLong( "MMhighest", c.MMhighest);
127 CtdlSetConfigInt( "MMflags", c.MMflags);
128 CtdlSetConfigLong( "MMnextuser", c.MMnextuser);
129 CtdlSetConfigLong( "MMnextroom", c.MMnextroom);
130 CtdlSetConfigInt( "MM_hosted_upgrade_level", c.MM_hosted_upgrade_level);
131 CtdlSetConfigInt( "MM_fulltext_wordbreaker", c.MM_fulltext_wordbreaker);
132 CtdlSetConfigLong( "MMfulltext", c.MMfulltext);
135 if (unlink(file_citadel_control) != 0) {
136 fprintf(stderr, "Unable to remove legacy control record %s after migrating it.\n", file_citadel_control);
137 fprintf(stderr, "Exiting to prevent data corruption.\n");
138 exit(CTDLEXIT_CONFIG);
145 * check_control - check the control record has sensible values for message, user and room numbers
147 void check_control(void)
149 syslog(LOG_INFO, "control: sanity checking the recorded highest message and room numbers");
150 CtdlForEachRoom(control_find_highest, NULL);
151 syslog(LOG_INFO, "control: sanity checking the recorded highest user number");
152 ForEachUser(control_find_user, NULL);
153 syslog(LOG_INFO, "control: sanity checks complete");
154 if (sanity_diag_mode == 1) {
155 syslog(LOG_INFO, "control: sanity check diagnostic mode is active - exiting now");
162 * get_new_message_number() - Obtain a new, unique ID to be used for a message.
164 long get_new_message_number(void)
167 begin_critical_section(S_CONTROL);
168 retval = CtdlGetConfigLong("MMhighest");
170 CtdlSetConfigLong("MMhighest", retval);
171 end_critical_section(S_CONTROL);
177 * CtdlGetCurrentMessageNumber() - Obtain the current highest message number in the system
178 * This provides a quick way to initialise a variable that might be used to indicate
179 * messages that should not be processed. EG. a new Sieve script will use this
180 * to record determine that messages older than this should not be processed.
182 * (Why is this function here? Can't we just go straight to the config variable it fetches?)
184 long CtdlGetCurrentMessageNumber(void)
186 return CtdlGetConfigLong("MMhighest");
191 * get_new_user_number() - Obtain a new, unique ID to be used for a user.
193 long get_new_user_number(void)
196 begin_critical_section(S_CONTROL);
197 retval = CtdlGetConfigLong("MMnextuser");
199 CtdlSetConfigLong("MMnextuser", retval);
200 end_critical_section(S_CONTROL);
206 * get_new_room_number() - Obtain a new, unique ID to be used for a room.
208 long get_new_room_number(void)
211 begin_critical_section(S_CONTROL);
212 retval = CtdlGetConfigLong("MMnextroom");
214 CtdlSetConfigLong("MMnextroom", retval);
215 end_critical_section(S_CONTROL);
221 * Helper function for cmd_conf() to handle boolean values
223 int confbool(char *v)
225 if (IsEmptyStr(v)) return(0);
226 if (atoi(v) != 0) return(1);
232 * Get or set global configuration options
234 * IF YOU ADD OR CHANGE FIELDS HERE, YOU *MUST* DOCUMENT YOUR CHANGES AT:
235 * http://www.citadel.org/doku.php/documentation:appproto:system_config
238 void cmd_conf(char *argbuf)
247 if (CtdlAccessCheck(ac_aide)) return;
249 extract_token(cmd, argbuf, 0, '|', sizeof cmd);
251 // CONF GET - retrieve system configuration in legacy format
252 // This is deprecated; please do not add fields or change their order.
253 if (!strcasecmp(cmd, "GET")) {
254 cprintf("%d Configuration...\n", LISTING_FOLLOWS);
255 cprintf("%s\n", CtdlGetConfigStr("c_nodename"));
256 cprintf("%s\n", CtdlGetConfigStr("c_fqdn"));
257 cprintf("%s\n", CtdlGetConfigStr("c_humannode"));
258 cprintf("xxx\n"); /* placeholder -- field no longer in use */
259 cprintf("%d\n", CtdlGetConfigInt("c_creataide"));
260 cprintf("%d\n", CtdlGetConfigInt("c_sleeping"));
261 cprintf("%d\n", CtdlGetConfigInt("c_initax"));
262 cprintf("%d\n", CtdlGetConfigInt("c_regiscall"));
263 cprintf("%d\n", CtdlGetConfigInt("c_twitdetect"));
264 cprintf("%s\n", CtdlGetConfigStr("c_twitroom"));
265 cprintf("%s\n", CtdlGetConfigStr("c_moreprompt"));
266 cprintf("%d\n", CtdlGetConfigInt("c_restrict"));
267 cprintf("%s\n", CtdlGetConfigStr("c_site_location"));
268 cprintf("%s\n", CtdlGetConfigStr("c_sysadm"));
269 cprintf("%d\n", CtdlGetConfigInt("c_maxsessions"));
270 cprintf("xxx\n"); /* placeholder -- field no longer in use */
271 cprintf("%d\n", CtdlGetConfigInt("c_userpurge"));
272 cprintf("%d\n", CtdlGetConfigInt("c_roompurge"));
273 cprintf("%s\n", CtdlGetConfigStr("c_logpages"));
274 cprintf("%d\n", CtdlGetConfigInt("c_createax"));
275 cprintf("%ld\n", CtdlGetConfigLong("c_maxmsglen"));
276 cprintf("%d\n", CtdlGetConfigInt("c_min_workers"));
277 cprintf("%d\n", CtdlGetConfigInt("c_max_workers"));
278 cprintf("%d\n", CtdlGetConfigInt("c_pop3_port"));
279 cprintf("%d\n", CtdlGetConfigInt("c_smtp_port"));
280 cprintf("%d\n", CtdlGetConfigInt("c_rfc822_strict_from"));
281 cprintf("%d\n", CtdlGetConfigInt("c_aide_zap"));
282 cprintf("%d\n", CtdlGetConfigInt("c_imap_port"));
283 cprintf("%ld\n", CtdlGetConfigLong("c_net_freq"));
284 cprintf("%d\n", CtdlGetConfigInt("c_disable_newu"));
285 cprintf("1\n"); /* niu */
286 cprintf("%d\n", CtdlGetConfigInt("c_purge_hour"));
288 cprintf("%s\n", CtdlGetConfigStr("c_ldap_host"));
289 cprintf("%d\n", CtdlGetConfigInt("c_ldap_port"));
290 cprintf("%s\n", CtdlGetConfigStr("c_ldap_base_dn"));
291 cprintf("%s\n", CtdlGetConfigStr("c_ldap_bind_dn"));
292 cprintf("%s\n", CtdlGetConfigStr("c_ldap_bind_pw"));
300 cprintf("%s\n", CtdlGetConfigStr("c_ip_addr"));
301 cprintf("%d\n", CtdlGetConfigInt("c_msa_port"));
302 cprintf("%d\n", CtdlGetConfigInt("c_imaps_port"));
303 cprintf("%d\n", CtdlGetConfigInt("c_pop3s_port"));
304 cprintf("%d\n", CtdlGetConfigInt("c_smtps_port"));
305 cprintf("%d\n", CtdlGetConfigInt("c_enable_fulltext"));
306 cprintf("%d\n", CtdlGetConfigInt("c_auto_cull"));
308 cprintf("%d\n", CtdlGetConfigInt("c_allow_spoofing"));
309 cprintf("%d\n", CtdlGetConfigInt("c_journal_email"));
310 cprintf("%d\n", CtdlGetConfigInt("c_journal_pubmsgs"));
311 cprintf("%s\n", CtdlGetConfigStr("c_journal_dest"));
312 cprintf("%s\n", CtdlGetConfigStr("c_default_cal_zone"));
313 cprintf("%d\n", CtdlGetConfigInt("c_pftcpdict_port"));
314 cprintf("%d\n", CtdlGetConfigInt("c_managesieve_port"));
315 cprintf("%d\n", CtdlGetConfigInt("c_auth_mode"));
320 cprintf("%d\n", CtdlGetConfigInt("c_rbl_at_greeting"));
321 cprintf("%s\n", CtdlGetConfigStr("c_master_user"));
322 cprintf("%s\n", CtdlGetConfigStr("c_master_pass"));
323 cprintf("%s\n", CtdlGetConfigStr("c_pager_program"));
324 cprintf("%d\n", CtdlGetConfigInt("c_imap_keep_from"));
325 cprintf("%d\n", CtdlGetConfigInt("c_xmpp_c2s_port"));
326 cprintf("%d\n", CtdlGetConfigInt("c_xmpp_s2s_port"));
327 cprintf("%ld\n", CtdlGetConfigLong("c_pop3_fetch"));
328 cprintf("%ld\n", CtdlGetConfigLong("c_pop3_fastest"));
329 cprintf("%d\n", CtdlGetConfigInt("c_spam_flag_only"));
330 cprintf("%d\n", CtdlGetConfigInt("c_guest_logins"));
331 cprintf("%d\n", CtdlGetConfigInt("c_port_number"));
332 cprintf("%d\n", ctdluid);
333 cprintf("%d\n", CtdlGetConfigInt("c_nntp_port"));
334 cprintf("%d\n", CtdlGetConfigInt("c_nntps_port"));
338 // CONF SET - set system configuration in legacy format
339 // This is deprecated; please do not add fields or change their order.
340 else if (!strcasecmp(cmd, "SET")) {
342 cprintf("%d Send configuration...\n", SEND_LISTING);
344 while (client_getln(buf, sizeof buf) >= 0 && strcmp(buf, "000")) {
347 CtdlSetConfigStr("c_nodename", buf);
350 CtdlSetConfigStr("c_fqdn", buf);
353 CtdlSetConfigStr("c_humannode", buf);
356 /* placeholder -- field no longer in use */
359 CtdlSetConfigInt("c_creataide", confbool(buf));
362 CtdlSetConfigInt("c_sleeping", atoi(buf));
368 CtdlSetConfigInt("c_initax", i);
371 CtdlSetConfigInt("c_regiscall", confbool(buf));
374 CtdlSetConfigInt("c_twitdetect", confbool(buf));
377 CtdlSetConfigStr("c_twitroom", buf);
380 CtdlSetConfigStr("c_moreprompt", buf);
383 CtdlSetConfigInt("c_restrict", confbool(buf));
386 CtdlSetConfigStr("c_site_location", buf);
389 CtdlSetConfigStr("c_sysadm", buf);
394 CtdlSetConfigInt("c_maxsessions", i);
397 /* placeholder -- field no longer in use */
400 CtdlSetConfigInt("c_userpurge", atoi(buf));
403 CtdlSetConfigInt("c_roompurge", atoi(buf));
406 CtdlSetConfigStr("c_logpages", buf);
412 CtdlSetConfigInt("c_createax", i);
417 CtdlSetConfigLong("c_maxmsglen", ii);
422 if (i >= 3) { // minimum value
423 CtdlSetConfigInt("c_min_workers", i);
428 if (i >= CtdlGetConfigInt("c_min_workers")) { // max must be >= min
429 CtdlSetConfigInt("c_max_workers", i);
433 CtdlSetConfigInt("c_pop3_port", atoi(buf));
436 CtdlSetConfigInt("c_smtp_port", atoi(buf));
439 CtdlSetConfigInt("c_rfc822_strict_from", atoi(buf));
442 CtdlSetConfigInt("c_aide_zap", confbool(buf));
445 CtdlSetConfigInt("c_imap_port", atoi(buf));
448 CtdlSetConfigLong("c_net_freq", atol(buf));
451 CtdlSetConfigInt("c_disable_newu", confbool(buf));
458 if ((i >= 0) && (i <= 23)) {
459 CtdlSetConfigInt("c_purge_hour", i);
463 CtdlSetConfigStr("c_ldap_host", buf);
466 CtdlSetConfigInt("c_ldap_port", atoi(buf));
469 CtdlSetConfigStr("c_ldap_base_dn", buf);
472 CtdlSetConfigStr("c_ldap_bind_dn", buf);
475 CtdlSetConfigStr("c_ldap_bind_pw", buf);
478 CtdlSetConfigStr("c_ip_addr", buf);
481 CtdlSetConfigInt("c_msa_port", atoi(buf));
484 CtdlSetConfigInt("c_imaps_port", atoi(buf));
487 CtdlSetConfigInt("c_pop3s_port", atoi(buf));
490 CtdlSetConfigInt("c_smtps_port", atoi(buf));
493 CtdlSetConfigInt("c_enable_fulltext", confbool(buf));
496 CtdlSetConfigInt("c_auto_cull", confbool(buf));
502 CtdlSetConfigInt("c_allow_spoofing", confbool(buf));
505 CtdlSetConfigInt("c_journal_email", confbool(buf));
508 CtdlSetConfigInt("c_journal_pubmsgs", confbool(buf));
511 CtdlSetConfigStr("c_journal_dest", buf);
514 CtdlSetConfigStr("c_default_cal_zone", buf);
517 CtdlSetConfigInt("c_pftcpdict_port", atoi(buf));
520 CtdlSetConfigInt("c_managesieve_port", atoi(buf));
523 CtdlSetConfigInt("c_auth_mode", atoi(buf));
538 CtdlSetConfigInt("c_rbl_at_greeting", confbool(buf));
541 CtdlSetConfigStr("c_master_user", buf);
544 CtdlSetConfigStr("c_master_pass", buf);
547 CtdlSetConfigStr("c_pager_program", buf);
550 CtdlSetConfigInt("c_imap_keep_from", confbool(buf));
553 CtdlSetConfigInt("c_xmpp_c2s_port", atoi(buf));
556 CtdlSetConfigInt("c_xmpp_s2s_port", atoi(buf));
559 CtdlSetConfigLong("c_pop3_fetch", atol(buf));
562 CtdlSetConfigLong("c_pop3_fastest", atol(buf));
565 CtdlSetConfigInt("c_spam_flag_only", confbool(buf));
568 CtdlSetConfigInt("c_guest_logins", confbool(buf));
571 CtdlSetConfigInt("c_port_number", atoi(buf));
577 CtdlSetConfigInt("c_nntp_port", atoi(buf));
580 CtdlSetConfigInt("c_nntps_port", atoi(buf));
585 snprintf(buf, sizeof buf,
586 "The global system configuration has been edited by %s.\n",
587 (CC->logged_in ? CC->curr_user : "an administrator")
589 CtdlAideMessage(buf, "Citadel Configuration Manager Message");
591 if (!IsEmptyStr(CtdlGetConfigStr("c_logpages")))
592 CtdlCreateRoom(CtdlGetConfigStr("c_logpages"), 3, "", 0, 1, 1, VIEW_BBS);
594 /* If full text indexing has been disabled, invalidate the
595 * index so it doesn't try to use it later.
597 if (CtdlGetConfigInt("c_enable_fulltext") == 0) {
598 CtdlSetConfigInt("MM_fulltext_wordbreaker", 0);
602 // CONF GETSYS - retrieve arbitrary system configuration stanzas stored in the message base
603 else if (!strcasecmp(cmd, "GETSYS")) {
604 extract_token(confname, argbuf, 1, '|', sizeof confname);
605 confptr = CtdlGetSysConfig(confname);
606 if (confptr != NULL) {
609 len = strlen(confptr);
610 cprintf("%d %s\n", LISTING_FOLLOWS, confname);
611 client_write(confptr, len);
612 if ((len > 0) && (confptr[len - 1] != 10))
613 client_write("\n", 1);
617 cprintf("%d No such configuration.\n",
618 ERROR + ILLEGAL_VALUE);
622 // CONF PUTSYS - store arbitrary system configuration stanzas in the message base
623 else if (!strcasecmp(cmd, "PUTSYS")) {
624 extract_token(confname, argbuf, 1, '|', sizeof confname);
626 cprintf("%d %s\n", SEND_LISTING, confname);
627 confptr = CtdlReadMessageBody(HKEY("000"), CtdlGetConfigLong("c_maxmsglen"), NULL, 0);
628 CtdlPutSysConfig(confname, confptr);
632 // CONF GETVAL - retrieve configuration variables from the database
633 // CONF LOADVAL - same thing but can handle variables bigger than 1 KB
634 else if ( (!strcasecmp(cmd, "GETVAL")) || (!strcasecmp(cmd, "LOADVAL")) ) {
635 extract_token(confname, argbuf, 1, '|', sizeof confname);
636 char *v = CtdlGetConfigStr(confname);
637 if ( (v) && (!strcasecmp(cmd, "GETVAL")) ) {
638 cprintf("%d %s|\n", CIT_OK, v);
640 else if ( (v) && (!strcasecmp(cmd, "LOADVAL")) ) {
641 cprintf("%d %d\n", BINARY_FOLLOWS, (int)strlen(v));
642 client_write(v, strlen(v));
645 cprintf("%d |\n", ERROR);
649 // CONF PUTVAL - store configuration variables in the database
650 else if (!strcasecmp(cmd, "PUTVAL")) {
651 if (num_tokens(argbuf, '|') < 3) {
652 cprintf("%d name and value required\n", ERROR);
655 extract_token(confname, argbuf, 1, '|', sizeof confname);
656 extract_token(buf, argbuf, 2, '|', sizeof buf);
657 CtdlSetConfigStr(confname, buf);
658 cprintf("%d setting '%s' to '%s'\n", CIT_OK, confname, buf);
662 // CONF STOREVAL - store configuration variables in the database bigger than 1 KB
663 else if (!strcasecmp(cmd, "STOREVAL")) {
664 if (num_tokens(argbuf, '|') < 3) {
665 cprintf("%d name and length required\n", ERROR);
668 extract_token(confname, argbuf, 1, '|', sizeof confname);
669 int bytes = extract_int(argbuf, 2);
670 char *valbuf = malloc(bytes + 1);
671 cprintf("%d %d\n", SEND_BINARY, bytes);
672 client_read(valbuf, bytes);
674 CtdlSetConfigStr(confname, valbuf);
679 // CONF LISTVAL - list configuration variables in the database and their values
680 else if (!strcasecmp(cmd, "LISTVAL")) {
681 struct cdbdata *cdbcfg;
686 cprintf("%d all configuration variables\n", LISTING_FOLLOWS);
687 cdb_rewind(CDB_CONFIG);
688 while (cdbcfg = cdb_next_item(CDB_CONFIG), cdbcfg != NULL) {
689 if (cdbcfg->len < 1020) {
690 keylen = strlen(cdbcfg->ptr);
692 value = cdbcfg->ptr + keylen + 1;
693 cprintf("%s|%s\n", key, value);
701 cprintf("%d Illegal option(s) specified.\n", ERROR + ILLEGAL_VALUE);
706 typedef struct __ConfType {
711 ConfType CfgNames[] = {
712 { {HKEY("localhost") }, 0},
713 { {HKEY("directory") }, 0},
714 { {HKEY("smarthost") }, 2},
715 { {HKEY("fallbackhost") }, 2},
716 { {HKEY("rbl") }, 3},
717 { {HKEY("spamassassin") }, 3},
718 { {HKEY("masqdomain") }, 1},
719 { {HKEY("clamav") }, 3},
720 { {HKEY("notify") }, 3},
724 HashList *CfgNameHash = NULL;
725 void cmd_gvdn(char *argbuf)
727 const ConfType *pCfg;
729 long min = atol(argbuf);
730 const char *Pos = NULL;
731 const char *PPos = NULL;
742 List = NewHash(1, NULL);
743 Cfg = NewStrBufPlain(CtdlGetConfigStr("c_fqdn"), -1);
744 Put(List, SKEY(Cfg), Cfg, HFreeStrBuf);
747 confptr = CtdlGetSysConfig(INTERNETCFG);
748 Config = NewStrBufPlain(confptr, -1);
751 Line = NewStrBufPlain(NULL, StrLength(Config));
752 CfgToken = NewStrBufPlain(NULL, StrLength(Config));
753 while (StrBufSipLine(Line, Config, &Pos))
756 Cfg = NewStrBufPlain(NULL, StrLength(Line));
758 StrBufExtract_NextToken(Cfg, Line, &PPos, '|');
759 StrBufExtract_NextToken(CfgToken, Line, &PPos, '|');
760 if (GetHash(CfgNameHash, SKEY(CfgToken), &vptr) &&
763 pCfg = (ConfType *) vptr;
764 if (pCfg->Type <= min)
766 Put(List, SKEY(Cfg), Cfg, HFreeStrBuf);
772 cprintf("%d Valid Domains\n", LISTING_FOLLOWS);
773 It = GetNewHashPos(List, 1);
774 while (GetNextHashPos(List, It, &HKLen, &HKey, &vptr))
785 FreeStrBuf(&CfgToken);
789 /*****************************************************************************/
790 /* MODULE INITIALIZATION STUFF */
791 /*****************************************************************************/
793 void control_cleanup(void)
795 DeleteHash(&CfgNameHash);
797 CTDL_MODULE_INIT(control)
802 CfgNameHash = NewHash(1, NULL);
803 for (i = 0; CfgNames[i].Name.Key != NULL; i++)
804 Put(CfgNameHash, CKEY(CfgNames[i].Name), &CfgNames[i], reference_free_handler);
806 CtdlRegisterProtoHook(cmd_gvdn, "GVDN", "get valid domain names");
807 CtdlRegisterProtoHook(cmd_conf, "CONF", "get/set system configuration");
808 CtdlRegisterCleanupHook(control_cleanup);
811 /* return our id for the Log */