* Began (but did not finish) applying GPL3+ declarations to each source file. This...
[citadel.git] / citadel / control.c
1 /*
2  * $Id$
3  *
4  * This module handles states which are global to the entire server.
5  *
6  * Copyright (c) 1987-2009 by the citadel.org team
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #include "sysdep.h"
24 #include <stdlib.h>
25 #include <unistd.h>
26 #include <stdio.h>
27 #include <fcntl.h>
28 #include <signal.h>
29
30 #if TIME_WITH_SYS_TIME
31 # include <sys/time.h>
32 # include <time.h>
33 #else
34 # if HAVE_SYS_TIME_H
35 #  include <sys/time.h>
36 # else
37 #  include <time.h>
38 # endif
39 #endif
40
41 #include <ctype.h>
42 #include <string.h>
43 #include <errno.h>
44 #include <limits.h>
45 #include <sys/types.h>
46 #include <sys/file.h>
47 #include <sys/stat.h>
48 #include <libcitadel.h>
49 #include "citadel.h"
50 #include "server.h"
51 #include "control.h"
52 #include "sysdep_decls.h"
53 #include "support.h"
54 #include "config.h"
55 #include "msgbase.h"
56 #include "citserver.h"
57 #include "room_ops.h"
58 #include "user_ops.h"
59 #include "database.h"
60 #include "threads.h"
61
62 #ifndef HAVE_SNPRINTF
63 #include "snprintf.h"
64 #endif
65
66 #include "ctdl_module.h"
67
68 struct CitControl CitControl;
69 extern struct config config;
70 FILE *control_fp = NULL;
71 long control_highest_user = 0;
72
73
74 /*
75  * lock_control  -  acquire a lock on the control record file.
76  *                  This keeps multiple citservers from running concurrently.
77  */
78 void lock_control(void)
79 {
80 #ifdef HAVE_FLOCK
81 /*
82  * TODO: solaris manpages describe this function, but the headers
83  * don't show it! 
84  */
85
86         if (flock(fileno(control_fp), (LOCK_EX | LOCK_NB))) {
87                 CtdlLogPrintf(CTDL_EMERG, "citserver: unable to lock %s.\n", file_citadel_control);
88                 CtdlLogPrintf(CTDL_EMERG, "Is another citserver already running?\n");
89                 exit(CTDLEXIT_CONTROL);
90         }
91 #endif
92 }
93
94 /*
95  * callback to get highest room number when rebuilding control file
96  */
97 void control_find_highest(struct ctdlroom *qrbuf, void *data)
98 {
99         struct ctdlroom room;
100         struct cdbdata *cdbfr;
101         long *msglist;
102         int num_msgs=0;
103         int c;
104         int room_fixed = 0;
105         int message_fixed = 0;
106         
107         if (qrbuf->QRnumber > CitControl.MMnextroom)
108         {
109                 CitControl.MMnextroom = qrbuf->QRnumber;
110                 room_fixed = 1;
111         }
112                 
113         getroom (&room, qrbuf->QRname);
114         
115         /* Load the message list */
116         cdbfr = cdb_fetch(CDB_MSGLISTS, &room.QRnumber, sizeof(long));
117         if (cdbfr != NULL) {
118                 msglist = (long *) cdbfr->ptr;
119                 num_msgs = cdbfr->len / sizeof(long);
120         } else {
121                 return; /* No messages at all?  No further action. */
122         }
123
124         if (num_msgs>0)
125         {
126                 for (c=0; c<num_msgs; c++)
127                 {
128                         if (msglist[c] > CitControl.MMhighest)
129                         {
130                                 CitControl.MMhighest = msglist[c];
131                                 message_fixed = 1;
132                         }
133                 }
134         }
135         cdb_free(cdbfr);
136         if (room_fixed)
137                 CtdlLogPrintf(CTDL_INFO, "Control record checking....Fixed room counter\n");
138         if (message_fixed)
139                 CtdlLogPrintf(CTDL_INFO, "Control record checking....Fixed message count\n");
140         return;
141 }
142
143
144 /*
145  * Callback to get highest user number.
146  */
147  
148 void control_find_user (struct ctdluser *EachUser, void *out_data)
149 {
150         int user_fixed = 0;
151         
152         if (EachUser->usernum > CitControl.MMnextuser)
153         {
154                 CitControl.MMnextuser = EachUser->usernum;
155                 user_fixed = 1;
156         }
157         if(user_fixed)
158                 CtdlLogPrintf(CTDL_INFO, "Control record checking....Fixed user count\n");
159 }
160
161
162 /*
163  * get_control  -  read the control record into memory.
164  */
165 void get_control(void)
166 {
167         static int already_have_control = 0;
168         int rv = 0;
169
170         /*
171          * If we already have the control record in memory, there's no point
172          * in reading it from disk again.
173          */
174         if (already_have_control) return;
175
176         /* Zero it out.  If the control record on disk is missing or short,
177          * the system functions with all control record fields initialized
178          * to zero.
179          */
180         memset(&CitControl, 0, sizeof(struct CitControl));
181         if (control_fp == NULL) {
182                 control_fp = fopen(file_citadel_control, "rb+");
183                 if (control_fp != NULL) {
184                         lock_control();
185                         rv = fchown(fileno(control_fp), config.c_ctdluid, -1);
186                         rv = fchmod(fileno(control_fp), S_IRUSR|S_IWUSR);
187                 }
188         }
189         if (control_fp == NULL) {
190                 control_fp = fopen(file_citadel_control, "wb+");
191                 if (control_fp != NULL) {
192                         lock_control();
193                         rv = fchown(fileno(control_fp), config.c_ctdluid, -1);
194                         rv = fchmod(fileno(control_fp), S_IRUSR|S_IWUSR);
195                         memset(&CitControl, 0, sizeof(struct CitControl));
196                         rv = fwrite(&CitControl, sizeof(struct CitControl), 1, control_fp);
197                         rewind(control_fp);
198                 }
199         }
200         if (control_fp == NULL) {
201                 CtdlLogPrintf(CTDL_ALERT, "ERROR opening %s: %s\n", file_citadel_control, strerror(errno));
202                 return;
203         }
204
205         rewind(control_fp);
206         rv = fread(&CitControl, sizeof(struct CitControl), 1, control_fp);
207         already_have_control = 1;
208         rv = chown(file_citadel_control, config.c_ctdluid, (-1));
209         
210 }
211
212 /*
213  * put_control  -  write the control record to disk.
214  */
215 void put_control(void)
216 {
217         int rv = 0;
218
219         if (control_fp != NULL) {
220                 rewind(control_fp);
221                 rv = fwrite(&CitControl, sizeof(struct CitControl), 1, control_fp);
222                 fflush(control_fp);
223         }
224 }
225
226
227 /*
228  * check_control   -  check the control record has sensible values for message, user and room numbers
229  */
230 void check_control(void)
231 {
232         CtdlLogPrintf(CTDL_INFO, "Checking/re-building control record\n");
233         get_control();
234         // Find highest room number and message number.
235         ForEachRoom(control_find_highest, NULL);
236         ForEachUser(control_find_user, NULL);
237         put_control();
238 }
239
240
241 /**
242  * release_control - close our fd on exit
243  */
244 void release_control(void)
245 {
246         if (control_fp != NULL)
247                 fclose(control_fp);
248         control_fp = NULL;
249 }
250
251 /*
252  * get_new_message_number()  -  Obtain a new, unique ID to be used for a message.
253  */
254 long get_new_message_number(void)
255 {
256         long retval = 0L;
257         begin_critical_section(S_CONTROL);
258         get_control();
259         retval = ++CitControl.MMhighest;
260         put_control();
261         end_critical_section(S_CONTROL);
262         return(retval);
263 }
264
265
266 /*
267  * CtdlGetCurrentMessageNumber()  -  Obtain the current highest message number in the system
268  * This provides a quick way to initialise a variable that might be used to indicate
269  * messages that should not be processed. EG. a new Sieve script will use this
270  * to record determine that messages older than this should not be processed.
271  */
272 long CtdlGetCurrentMessageNumber(void)
273 {
274         long retval = 0L;
275         begin_critical_section(S_CONTROL);
276         get_control();
277         retval = CitControl.MMhighest;
278         end_critical_section(S_CONTROL);
279         return(retval);
280 }
281
282
283 /*
284  * get_new_user_number()  -  Obtain a new, unique ID to be used for a user.
285  */
286 long get_new_user_number(void)
287 {
288         long retval = 0L;
289         begin_critical_section(S_CONTROL);
290         get_control();
291         retval = ++CitControl.MMnextuser;
292         put_control();
293         end_critical_section(S_CONTROL);
294         return(retval);
295 }
296
297
298
299 /*
300  * get_new_room_number()  -  Obtain a new, unique ID to be used for a room.
301  */
302 long get_new_room_number(void)
303 {
304         long retval = 0L;
305         begin_critical_section(S_CONTROL);
306         get_control();
307         retval = ++CitControl.MMnextroom;
308         put_control();
309         end_critical_section(S_CONTROL);
310         return(retval);
311 }
312
313
314
315 /* 
316  * Get or set global configuration options
317  */
318 void cmd_conf(char *argbuf)
319 {
320         char cmd[16];
321         char buf[256];
322         int a;
323         char *confptr;
324         char confname[128];
325
326         if (CtdlAccessCheck(ac_aide)) return;
327
328         extract_token(cmd, argbuf, 0, '|', sizeof cmd);
329         if (!strcasecmp(cmd, "GET")) {
330                 cprintf("%d Configuration...\n", LISTING_FOLLOWS);
331                 cprintf("%s\n", config.c_nodename);
332                 cprintf("%s\n", config.c_fqdn);
333                 cprintf("%s\n", config.c_humannode);
334                 cprintf("%s\n", config.c_phonenum);
335                 cprintf("%d\n", config.c_creataide);
336                 cprintf("%d\n", config.c_sleeping);
337                 cprintf("%d\n", config.c_initax);
338                 cprintf("%d\n", config.c_regiscall);
339                 cprintf("%d\n", config.c_twitdetect);
340                 cprintf("%s\n", config.c_twitroom);
341                 cprintf("%s\n", config.c_moreprompt);
342                 cprintf("%d\n", config.c_restrict);
343                 cprintf("%s\n", config.c_site_location);
344                 cprintf("%s\n", config.c_sysadm);
345                 cprintf("%d\n", config.c_maxsessions);
346                 cprintf("xxx\n"); /* placeholder -- field no longer in use */
347                 cprintf("%d\n", config.c_userpurge);
348                 cprintf("%d\n", config.c_roompurge);
349                 cprintf("%s\n", config.c_logpages);
350                 cprintf("%d\n", config.c_createax);
351                 cprintf("%ld\n", config.c_maxmsglen);
352                 cprintf("%d\n", config.c_min_workers);
353                 cprintf("%d\n", config.c_max_workers);
354                 cprintf("%d\n", config.c_pop3_port);
355                 cprintf("%d\n", config.c_smtp_port);
356                 cprintf("%d\n", config.c_rfc822_strict_from);
357                 cprintf("%d\n", config.c_aide_zap);
358                 cprintf("%d\n", config.c_imap_port);
359                 cprintf("%ld\n", config.c_net_freq);
360                 cprintf("%d\n", config.c_disable_newu);
361                 cprintf("1\n"); /* niu */
362                 cprintf("%d\n", config.c_purge_hour);
363 #ifdef HAVE_LDAP
364                 cprintf("%s\n", config.c_ldap_host);
365                 cprintf("%d\n", config.c_ldap_port);
366                 cprintf("%s\n", config.c_ldap_base_dn);
367                 cprintf("%s\n", config.c_ldap_bind_dn);
368                 cprintf("%s\n", config.c_ldap_bind_pw);
369 #else
370                 cprintf("\n");
371                 cprintf("0\n");
372                 cprintf("\n");
373                 cprintf("\n");
374                 cprintf("\n");
375 #endif
376                 cprintf("%s\n", config.c_ip_addr);
377                 cprintf("%d\n", config.c_msa_port);
378                 cprintf("%d\n", config.c_imaps_port);
379                 cprintf("%d\n", config.c_pop3s_port);
380                 cprintf("%d\n", config.c_smtps_port);
381                 cprintf("%d\n", config.c_enable_fulltext);
382                 cprintf("%d\n", config.c_auto_cull);
383                 cprintf("%d\n", config.c_instant_expunge);
384                 cprintf("%d\n", config.c_allow_spoofing);
385                 cprintf("%d\n", config.c_journal_email);
386                 cprintf("%d\n", config.c_journal_pubmsgs);
387                 cprintf("%s\n", config.c_journal_dest);
388                 cprintf("%s\n", config.c_default_cal_zone);
389                 cprintf("%d\n", config.c_pftcpdict_port);
390                 cprintf("%d\n", config.c_managesieve_port);
391                 cprintf("%d\n", config.c_auth_mode);
392                 cprintf("%s\n", config.c_funambol_host);
393                 cprintf("%d\n", config.c_funambol_port);
394                 cprintf("%s\n", config.c_funambol_source);
395                 cprintf("%s\n", config.c_funambol_auth);
396                 cprintf("%d\n", config.c_rbl_at_greeting);
397                 cprintf("%s\n", config.c_master_user);
398                 cprintf("%s\n", config.c_master_pass);
399                 cprintf("%s\n", config.c_pager_program);
400                 cprintf("%d\n", config.c_imap_keep_from);
401                 cprintf("%d\n", config.c_xmpp_c2s_port);
402                 cprintf("%d\n", config.c_xmpp_s2s_port);
403                 cprintf("%ld\n", config.c_pop3_fetch);
404                 cprintf("%ld\n", config.c_pop3_fastest);
405                 cprintf("%d\n", config.c_spam_flag_only);
406                 cprintf("000\n");
407         }
408
409         else if (!strcasecmp(cmd, "SET")) {
410                 unbuffer_output();
411                 cprintf("%d Send configuration...\n", SEND_LISTING);
412                 a = 0;
413                 while (client_getln(buf, sizeof buf) >= 0 && strcmp(buf, "000")) {
414                         switch (a) {
415                         case 0:
416                                 safestrncpy(config.c_nodename, buf,
417                                             sizeof config.c_nodename);
418                                 break;
419                         case 1:
420                                 safestrncpy(config.c_fqdn, buf,
421                                             sizeof config.c_fqdn);
422                                 break;
423                         case 2:
424                                 safestrncpy(config.c_humannode, buf,
425                                             sizeof config.c_humannode);
426                                 break;
427                         case 3:
428                                 safestrncpy(config.c_phonenum, buf,
429                                             sizeof config.c_phonenum);
430                                 break;
431                         case 4:
432                                 config.c_creataide = atoi(buf);
433                                 break;
434                         case 5:
435                                 config.c_sleeping = atoi(buf);
436                                 break;
437                         case 6:
438                                 config.c_initax = atoi(buf);
439                                 if (config.c_initax < 1)
440                                         config.c_initax = 1;
441                                 if (config.c_initax > 6)
442                                         config.c_initax = 6;
443                                 break;
444                         case 7:
445                                 config.c_regiscall = atoi(buf);
446                                 if (config.c_regiscall != 0)
447                                         config.c_regiscall = 1;
448                                 break;
449                         case 8:
450                                 config.c_twitdetect = atoi(buf);
451                                 if (config.c_twitdetect != 0)
452                                         config.c_twitdetect = 1;
453                                 break;
454                         case 9:
455                                 safestrncpy(config.c_twitroom, buf,
456                                             sizeof config.c_twitroom);
457                                 break;
458                         case 10:
459                                 safestrncpy(config.c_moreprompt, buf,
460                                             sizeof config.c_moreprompt);
461                                 break;
462                         case 11:
463                                 config.c_restrict = atoi(buf);
464                                 if (config.c_restrict != 0)
465                                         config.c_restrict = 1;
466                                 break;
467                         case 12:
468                                 safestrncpy(config.c_site_location, buf,
469                                             sizeof config.c_site_location);
470                                 break;
471                         case 13:
472                                 safestrncpy(config.c_sysadm, buf,
473                                             sizeof config.c_sysadm);
474                                 break;
475                         case 14:
476                                 config.c_maxsessions = atoi(buf);
477                                 if (config.c_maxsessions < 0)
478                                         config.c_maxsessions = 0;
479                                 break;
480                         case 15:
481                                 /* placeholder -- field no longer in use */
482                                 break;
483                         case 16:
484                                 config.c_userpurge = atoi(buf);
485                                 break;
486                         case 17:
487                                 config.c_roompurge = atoi(buf);
488                                 break;
489                         case 18:
490                                 safestrncpy(config.c_logpages, buf,
491                                             sizeof config.c_logpages);
492                                 break;
493                         case 19:
494                                 config.c_createax = atoi(buf);
495                                 if (config.c_createax < 1)
496                                         config.c_createax = 1;
497                                 if (config.c_createax > 6)
498                                         config.c_createax = 6;
499                                 break;
500                         case 20:
501                                 if (atoi(buf) >= 8192)
502                                         config.c_maxmsglen = atoi(buf);
503                                 break;
504                         case 21:
505                                 if (atoi(buf) >= 2)
506                                         config.c_min_workers = atoi(buf);
507                         case 22:
508                                 if (atoi(buf) >= config.c_min_workers)
509                                         config.c_max_workers = atoi(buf);
510                         case 23:
511                                 config.c_pop3_port = atoi(buf);
512                                 break;
513                         case 24:
514                                 config.c_smtp_port = atoi(buf);
515                                 break;
516                         case 25:
517                                 config.c_rfc822_strict_from = atoi(buf);
518                                 break;
519                         case 26:
520                                 config.c_aide_zap = atoi(buf);
521                                 if (config.c_aide_zap != 0)
522                                         config.c_aide_zap = 1;
523                                 break;
524                         case 27:
525                                 config.c_imap_port = atoi(buf);
526                                 break;
527                         case 28:
528                                 config.c_net_freq = atol(buf);
529                                 break;
530                         case 29:
531                                 config.c_disable_newu = atoi(buf);
532                                 if (config.c_disable_newu != 0)
533                                         config.c_disable_newu = 1;
534                                 break;
535                         case 30:
536                                 /* niu */
537                                 break;
538                         case 31:
539                                 if ((config.c_purge_hour >= 0)
540                                    && (config.c_purge_hour <= 23)) {
541                                         config.c_purge_hour = atoi(buf);
542                                 }
543                                 break;
544 #ifdef HAVE_LDAP
545                         case 32:
546                                 safestrncpy(config.c_ldap_host, buf,
547                                             sizeof config.c_ldap_host);
548                                 break;
549                         case 33:
550                                 config.c_ldap_port = atoi(buf);
551                                 break;
552                         case 34:
553                                 safestrncpy(config.c_ldap_base_dn, buf,
554                                             sizeof config.c_ldap_base_dn);
555                                 break;
556                         case 35:
557                                 safestrncpy(config.c_ldap_bind_dn, buf,
558                                             sizeof config.c_ldap_bind_dn);
559                                 break;
560                         case 36:
561                                 safestrncpy(config.c_ldap_bind_pw, buf,
562                                             sizeof config.c_ldap_bind_pw);
563                                 break;
564 #endif
565                         case 37:
566                                 safestrncpy(config.c_ip_addr, buf,
567                                                 sizeof config.c_ip_addr);
568                         case 38:
569                                 config.c_msa_port = atoi(buf);
570                                 break;
571                         case 39:
572                                 config.c_imaps_port = atoi(buf);
573                                 break;
574                         case 40:
575                                 config.c_pop3s_port = atoi(buf);
576                                 break;
577                         case 41:
578                                 config.c_smtps_port = atoi(buf);
579                                 break;
580                         case 42:
581                                 config.c_enable_fulltext = atoi(buf);
582                                 break;
583                         case 43:
584                                 config.c_auto_cull = atoi(buf);
585                                 break;
586                         case 44:
587                                 config.c_instant_expunge = atoi(buf);
588                                 break;
589                         case 45:
590                                 config.c_allow_spoofing = atoi(buf);
591                                 break;
592                         case 46:
593                                 config.c_journal_email = atoi(buf);
594                                 break;
595                         case 47:
596                                 config.c_journal_pubmsgs = atoi(buf);
597                                 break;
598                         case 48:
599                                 safestrncpy(config.c_journal_dest, buf,
600                                                 sizeof config.c_journal_dest);
601                         case 49:
602                                 safestrncpy(config.c_default_cal_zone, buf,
603                                                 sizeof config.c_default_cal_zone);
604                                 break;
605                         case 50:
606                                 config.c_pftcpdict_port = atoi(buf);
607                                 break;
608                         case 51:
609                                 config.c_managesieve_port = atoi(buf);
610                                 break;
611                         case 52:
612                                 config.c_auth_mode = atoi(buf);
613                         case 53:
614                                 safestrncpy(config.c_funambol_host, buf,
615                                         sizeof config.c_funambol_host);
616                                 break;
617                         case 54:
618                                 config.c_funambol_port = atoi(buf);
619                                 break;
620                         case 55:
621                                 safestrncpy(config.c_funambol_source,
622                                         buf, 
623                                         sizeof config.c_funambol_source);
624                                 break;
625                         case 56:
626                                 safestrncpy(config.c_funambol_auth,
627                                         buf,
628                                         sizeof config.c_funambol_auth);
629                                 break;
630                         case 57:
631                                 config.c_rbl_at_greeting = atoi(buf);
632                                 break;
633                         case 58:
634                                 safestrncpy(config.c_master_user, buf, sizeof config.c_master_user);
635                                 break;
636                         case 59:
637                                 safestrncpy(config.c_master_pass, buf, sizeof config.c_master_pass);
638                                 break;
639                         case 60:
640                                 safestrncpy(config.c_pager_program,
641                                         buf,
642                                         sizeof config.c_pager_program);
643                                 break;
644                         case 61:
645                                 config.c_imap_keep_from = atoi(buf);
646                                 break;
647                         case 62:
648                                 config.c_xmpp_c2s_port = atoi(buf);
649                                 break;
650                         case 63:
651                                 config.c_xmpp_s2s_port = atoi(buf);
652                                 break;
653                         case 64:
654                                 config.c_pop3_fetch = atol(buf);
655                                 break;
656                         case 65:
657                                 config.c_pop3_fastest = atol(buf);
658                                 break;
659                         case 66:
660                                 config.c_spam_flag_only = atoi(buf);
661                                 break;
662                         }
663                         ++a;
664                 }
665                 put_config();
666                 snprintf(buf, sizeof buf,
667                          "The global system configuration has been edited by %s.\n",
668                          CC->curr_user);
669                 aide_message(buf,"Citadel Configuration Manager Message");
670
671                 if (!IsEmptyStr(config.c_logpages))
672                         create_room(config.c_logpages, 3, "", 0, 1, 1, VIEW_BBS);
673
674                 /* If full text indexing has been disabled, invalidate the
675                  * index so it doesn't try to use it later.
676                  */
677                 if (config.c_enable_fulltext == 0) {
678                         CitControl.fulltext_wordbreaker = 0;
679                         put_control();
680                 }
681         }
682
683         else if (!strcasecmp(cmd, "GETSYS")) {
684                 extract_token(confname, argbuf, 1, '|', sizeof confname);
685                 confptr = CtdlGetSysConfig(confname);
686                 if (confptr != NULL) {
687                         cprintf("%d %s\n", LISTING_FOLLOWS, confname);
688                         client_write(confptr, strlen(confptr));
689                         if (confptr[strlen(confptr) - 1] != 10)
690                                 client_write("\n", 1);
691                         cprintf("000\n");
692                         free(confptr);
693                 } else {
694                         cprintf("%d No such configuration.\n",
695                                 ERROR + ILLEGAL_VALUE);
696                 }
697         }
698
699         else if (!strcasecmp(cmd, "PUTSYS")) {
700                 extract_token(confname, argbuf, 1, '|', sizeof confname);
701                 unbuffer_output();
702                 cprintf("%d %s\n", SEND_LISTING, confname);
703                 confptr = CtdlReadMessageBody("000", config.c_maxmsglen, NULL, 0, 0);
704                 CtdlPutSysConfig(confname, confptr);
705                 free(confptr);
706         }
707
708         else {
709                 cprintf("%d Illegal option(s) specified.\n",
710                         ERROR + ILLEGAL_VALUE);
711         }
712 }
713
714
715 /*****************************************************************************/
716 /*                      MODULE INITIALIZATION STUFF                          */
717 /*****************************************************************************/
718
719
720 CTDL_MODULE_INIT(control)
721 {
722         CtdlRegisterProtoHook(cmd_conf, "CONF", "Autoconverted. TODO: document me.");
723         /* return our Subversion id for the Log */
724         return "$Id$";
725 }