removed some debugs
authorArt Cancro <ajc@citadel.org>
Mon, 30 May 2022 22:33:41 +0000 (18:33 -0400)
committerArt Cancro <ajc@citadel.org>
Mon, 30 May 2022 22:33:41 +0000 (18:33 -0400)
citadel/chkpw.c
citadel/ldap.c
citadel/msgbase.c
libcitadel/lib/mime_parser.c

index 02e3c59b38bc623e885bdf259e14ccf9a45bdbd1..83e432fadb09a98e76af55939e924ba524b6c3e3 100644 (file)
@@ -1,5 +1,5 @@
 // 
-// Copyright (c) 1987-2021 by the citadel.org team
+// 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.
@@ -108,7 +108,6 @@ int main(int argc, char **argv) {
        char buf[256];
        struct passwd *p;
        int uid;
-       char ctdldir[PATH_MAX]=CTDLDIR;
        
        printf("\n\n ** host auth mode test utility **\n\n");
        start_chkpwd_daemon();
index 2205bf8a8499e396a4f80156e4ce2676eae7b16c..5c54953c1a668da9df86c90a86933e32974586f1 100644 (file)
@@ -517,6 +517,14 @@ int extract_email_addresses_from_ldap(char *ldap_dn, char *emailaddrs) {
 }
 
 
+// Remember that a particular user exists in the Citadel database.
+// As we scan the LDAP tree we will remove users from this list when we find them.
+// At the end of the scan, any users remaining in this list are stale and should be deleted.
+void ldap_note_user_in_citadel(char *username, void *data) {
+       return;
+}
+
+
 // Scan LDAP for users and populate Citadel's user database with everyone
 //
 // POSIX schema:       All objects of class "inetOrgPerson"
@@ -536,6 +544,9 @@ void CtdlSynchronizeUsersFromLDAP(void) {
 
        syslog(LOG_INFO, "ldap: synchronizing Citadel user database from LDAP");
 
+       // first, scan the existing Citadel user list
+       // ForEachUser(ldap_note_user_in_citadel, NULL);        // FIXME finish this
+
        ldserver = ctdl_ldap_bind();
        if (!ldserver) return;
 
index 406107e1c8e22a121005970b19a5cc43f96fb480..0fbfbb63ebc36721ea690c94256f3f54a65eb7a5 100644 (file)
@@ -1052,7 +1052,6 @@ void mime_spew_section(char *name, char *filename, char *partnum, char *disp,
                (!IsEmptyStr(partnum) && (!strcasecmp(CC->download_desired_section, partnum)))
        ||      (!IsEmptyStr(cbid) && (!strcasecmp(CC->download_desired_section, cbid)))
        ) {
-               syslog(LOG_DEBUG, "\033[32mYES part %s len %d\033[0m" , partnum, (int)length);
                *found_it = 1;
                cprintf("%d %d|-1|%s|%s|%s\n",
                        BINARY_FOLLOWS,
@@ -1063,14 +1062,10 @@ void mime_spew_section(char *name, char *filename, char *partnum, char *disp,
                );
                client_write(content, length);
        }
-       else {
-               syslog(LOG_DEBUG, "\033[31m NO part %s\033[0m", partnum);
-       }
 }
 
 
-struct CtdlMessage *CtdlDeserializeMessage(long msgnum, int with_body, const char *Buffer, long Length)
-{
+struct CtdlMessage *CtdlDeserializeMessage(long msgnum, int with_body, const char *Buffer, long Length) {
        struct CtdlMessage *ret = NULL;
        const char *mptr;
        const char *upper_bound;
@@ -3026,7 +3021,7 @@ StrBuf *CtdlReadMessageBodyBuf(char *terminator,  // token signalling EOT
        FreeStrBuf(&LineBuf);
 
        if (flushing) {
-               syslog(LOG_ERR, "msgbase: exceeded maximum message length of %d - message was truncated", maxlen);
+               syslog(LOG_ERR, "msgbase: exceeded maximum message length of %ld - message was truncated", maxlen);
        }
 
        return Message;
index 303bb54e0141a8d0240959cad1727f402536c47f..105d29a39c0297681a6550093ad9981c6a845e3e 100644 (file)
@@ -230,7 +230,6 @@ void mime_decode(char *partnum,
        if ((strcasecmp(encoding, "base64")) && (strcasecmp(encoding, "quoted-printable"))) {
                return;
        }
-       fprintf(stderr, "\033[33mSource encoded length: %d\033[0m\n", length);
 
        // Allocate a buffer for the decoded data.  The output buffer is slightly
        // larger than the input buffer; this assumes that the decoded data
@@ -247,7 +246,6 @@ void mime_decode(char *partnum,
        else if (!strcasecmp(encoding, "quoted-printable")) {
                bytes_decoded = CtdlDecodeQuotedPrintable(decoded, part_start, length);
        }
-       fprintf(stderr, "\033[33mTarget decoded length: %d\033[0m\n", bytes_decoded);
 
        if (bytes_decoded > 0) if (CallBack != NULL) {
                        char encoding_buf[SIZ];