Modified some of the server source files to carry the new and improved version of...
authorArt Cancro <ajc@citadel.org>
Thu, 9 Jun 2022 20:21:20 +0000 (16:21 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 9 Jun 2022 20:21:20 +0000 (16:21 -0400)
citadel/server/database.c
citadel/server/default_timezone.c
citadel/server/domain.c
citadel/server/euidindex.c
citadel/server/genstamp.c
citadel/server/housekeeping.c
citadel/server/internet_addressing.c
citadel/server/journaling.c
citadel/server/ldap.c

index eb4dae515b63fdfa4616366676b42fbca17bd3be..fd88ffd5eee6adb4d08d3a397e1c56868f4c89d1 100644 (file)
@@ -2,13 +2,9 @@
 //
 // Copyright (c) 1987-2022 by the citadel.org team
 //
-// This program is open source software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 /*****************************************************************************
        Tunable configuration parameters for the Berkeley DB back end
index 6ce5c107e18b9d893c9f24ffd8d50ad50803da4e..383a3364d37d2da785efb955e896ce4da8a6ded3 100644 (file)
@@ -1,15 +1,9 @@
-/*
- * Copyright (c) 1987-2018 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include "sysdep.h"
 #include <stdlib.h>
 #include "ctdl_module.h"
 
 
-/*
- * Figure out which time zone needs to be used for timestamps that are
- * not UTC and do not have a time zone specified.
- */
+// Figure out which time zone needs to be used for timestamps that are
+// not UTC and do not have a time zone specified.
 icaltimezone *get_default_icaltimezone(void) {
 
         icaltimezone *zone = NULL;
index 79461f55a1cd6cc22b1893d284fe67a7e26c65c4..3e0f74e31d94a7c4b059ad4a09cde48fcb0136d5 100644 (file)
@@ -1,16 +1,10 @@
-/*
- * DNS lookup for SMTP sender
- *
- * Copyright (c) 1987-2021 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+// DNS lookup for SMTP sender
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include "sysdep.h"
 #include <stdio.h>
 #include "internet_addressing.h"
 
 
-/*
- * get_hosts() checks the Internet configuration for various types of
- * entries and returns them in the same format as getmx() does -- fill the
- * buffer with a delimited list of hosts and return the number of hosts.
- * 
- * This is used to fetch MX smarthosts, SpamAssassin hosts, etc.
- */
+// get_hosts() checks the Internet configuration for various types of
+// entries and returns them in the same format as getmx() does -- fill the
+// buffer with a delimited list of hosts and return the number of hosts.
+// 
+// This is used to fetch MX smarthosts, SpamAssassin hosts, etc.
 int get_hosts(char *mxbuf, char *rectype) {
        int config_lines;
        int i;
@@ -66,11 +58,9 @@ int get_hosts(char *mxbuf, char *rectype) {
 }
 
 
-/*
- * Compare the preference of two MX records.  First check by the actual
- * number listed in the MX record.  If they're identical, randomize the
- * result.
- */
+// Compare the preference of two MX records.  First check by the actual
+// number listed in the MX record.  If they're identical, randomize the
+// result.
 int mx_compare_pref(const void *mx1, const void *mx2) {
        int pref1;
        int pref2;
@@ -90,16 +80,13 @@ int mx_compare_pref(const void *mx1, const void *mx2) {
 }
 
 
-/* 
- * getmx()
- *
- * Return one or more MX's for a mail destination.
- *
- * Upon success, it fills 'mxbuf' with one or more MX hosts, separated by
- * vertical bar characters, and returns the number of hosts as its return
- * value.  If no MX's are found, it returns 0.
- *
- */
+// getmx()
+//
+// Return one or more MX's for a mail destination.
+//
+// Upon success, it fills 'mxbuf' with one or more MX hosts, separated by
+// vertical bar characters, and returns the number of hosts as its return
+// value.  If no MX's are found, it returns 0.
 int getmx(char *mxbuf, char *dest) {
 
 #ifdef HAVE_RESOLV_H
index 0e8daf9cebd318e830463350294e19d277098c37..6db2b4251a52cf6d3c27109411009e58178b21bd 100644 (file)
@@ -2,18 +2,13 @@
 //
 // Copyright (c) 1987-2022 by the citadel.org team
 //
-// This program is open source software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include "sysdep.h"
 #include <stdio.h>
 #include <libcitadel.h>
-
 #include "citserver.h"
 #include "room_ops.h"
 
@@ -208,6 +203,6 @@ char *ctdl_module_init_euidindex(void) {
        if (!threading) {
                CtdlRegisterProtoHook(cmd_euid, "EUID", "Perform operations on Extended IDs for messages");
        }
-       /* return our id for the log */
+       // return our id for the log
        return "euidindex";
 }
index e8d5dd86bc3f3b4c4c3a64168e4bc00add8b8d9b..1a3dc1e950159be66ef7226db266b5661a1b98ee 100644 (file)
@@ -1,3 +1,8 @@
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
+
+
 /*
  * Function to generate RFC822-compliant textual time/date stamp
  */
index 54cfe11b83fa0888917d8c384c683ef4844748cb..4f8b1a9d99596304e758f3436e685f9701ad4bce 100644 (file)
@@ -1,16 +1,11 @@
-/*
- * This file contains miscellaneous housekeeping tasks.
- *
- * Copyright (c) 1987-2021 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+// This file contains miscellaneous housekeeping tasks.
+//
+// Copyright (c) 1987-2021 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
+
 
 #include <stdio.h>
 #include <libcitadel.h>
@@ -31,10 +26,8 @@ void check_sched_shutdown(void) {
 }
 
 
-/*
- * Check (and fix) floor reference counts.  This doesn't need to be done
- * very often, since the counts should remain correct during normal operation.
- */
+// Check (and fix) floor reference counts.  This doesn't need to be done
+// very often, since the counts should remain correct during normal operation.
 void check_ref_counts_backend(struct ctdlroom *qrbuf, void *data) {
 
        int *new_refcounts;
@@ -75,9 +68,7 @@ void check_ref_counts(void) {
 }
 
 
-/*
- * Provide hints as to whether we have any memory leaks
- */
+// Provide hints as to whether we have any memory leaks
 void keep_an_eye_on_memory_usage(void) {
        static void *original_brk = NULL;
        if (!original_brk) original_brk = sbrk(0);      // Remember the original program break so we can test for leaks
@@ -85,12 +76,10 @@ void keep_an_eye_on_memory_usage(void) {
 }
 
 
-/*
- * This is the housekeeping loop.  Worker threads come through here after
- * processing client requests but before jumping back into the pool.  We
- * only allow housekeeping to execute once per minute, and we only allow one
- * instance to run at a time.
- */
+// This is the housekeeping loop.  Worker threads come through here after
+// processing client requests but before jumping back into the pool.  We
+// only allow housekeeping to execute once per minute, and we only allow one
+// instance to run at a time.
 static int housekeeping_in_progress = 0;
 static int housekeeping_disabled = 0;
 static time_t last_timer = 0L;
@@ -104,11 +93,9 @@ void do_housekeeping(void) {
                return;
        }
 
-       /*
-        * We do it this way instead of wrapping the whole loop in an
-        * S_HOUSEKEEPING critical section because it eliminates the need to
-        * potentially have multiple concurrent mutexes in progress.
-        */
+       // We do it this way instead of wrapping the whole loop in an
+       // S_HOUSEKEEPING critical section because it eliminates the need to
+       // potentially have multiple concurrent mutexes in progress.
        begin_critical_section(S_HOUSEKEEPING);
        if (housekeeping_in_progress == 0) {
                do_housekeeping_now = 1;
@@ -127,21 +114,19 @@ void do_housekeeping(void) {
                return;
        }
 
-       /*
-        * Ok, at this point we've made the decision to run the housekeeping
-        * loop.  Everything below this point is real work.
-        */
+       // Ok, at this point we've made the decision to run the housekeeping
+       // loop.  Everything below this point is real work.
 
        if ( (now - last_timer) > (time_t)60 ) {
                do_perminute_housekeeping_now = 1;
                last_timer = time(NULL);
        }
 
-       /* First, do the "as often as needed" stuff... */
+       // First, do the "as often as needed" stuff...
        JournalRunQueue();
        PerformSessionHooks(EVT_HOUSE);
 
-       /* Then, do the "once per minute" stuff... */
+       // Then, do the "once per minute" stuff...
        if (do_perminute_housekeeping_now) {
                cdb_check_handles();
                PerformSessionHooks(EVT_TIMER);         // Run all registered TIMER hooks
@@ -156,9 +141,7 @@ void do_housekeeping(void) {
        keep_an_eye_on_memory_usage();
        }
 
-       /*
-        * All done.
-        */
+       // All done.
        begin_critical_section(S_HOUSEKEEPING);
        housekeeping_in_progress = 0;
        end_critical_section(S_HOUSEKEEPING);
index 59e078f9cdcf4586c9c6c00dc64d8d6bbd52fc59..7b8c2963aead5099e1f95127e6cc0a83b2d02956 100644 (file)
@@ -3,13 +3,9 @@
 //
 // Copyright (c) 1987-2022 by the citadel.org team
 //
-// This program is open source software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include "sysdep.h"
 #include <stdlib.h>
index 939ec3b7d685b3aab69cb38a039ae613a4616fea..931169efb5c981e04874e181719413eefeea808f 100644 (file)
@@ -1,16 +1,10 @@
-/*
- * Message journaling functions.
- *
- * Copyright (c) 1987-2020 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+// Message journaling functions.
+//
+// Copyright (c) 1987-2022 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include <stdio.h>
 #include <libcitadel.h>
@@ -251,5 +245,3 @@ void JournalRunQueue(void) {
                JournalRunQueueMsg(jptr);
        }
 }
-
-
index 3a16117cdbbe1ba1314d7b84c903dee60b188e58..1807fcf0aa4b80c7484aac136714c52f33d00b35 100644 (file)
@@ -3,13 +3,9 @@
 //
 // Copyright (c) 2011-2022 by the citadel.org development team.
 //
-// This program is open source software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 // ldapsearch -D uid=admin,cn=users,cn=compat,dc=demo1,dc=freeipa,dc=org -w Secret123 -h ipa.demo1.freeipa.org