From 2e4e67a1f7f65568abace99d13a71024ad06ebde Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 30 May 2022 18:33:41 -0400 Subject: [PATCH] removed some debugs --- citadel/chkpw.c | 3 +-- citadel/ldap.c | 11 +++++++++++ citadel/msgbase.c | 9 ++------- libcitadel/lib/mime_parser.c | 2 -- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/citadel/chkpw.c b/citadel/chkpw.c index 02e3c59b3..83e432fad 100644 --- a/citadel/chkpw.c +++ b/citadel/chkpw.c @@ -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(); diff --git a/citadel/ldap.c b/citadel/ldap.c index 2205bf8a8..5c54953c1 100644 --- a/citadel/ldap.c +++ b/citadel/ldap.c @@ -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; diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 406107e1c..0fbfbb63e 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -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; diff --git a/libcitadel/lib/mime_parser.c b/libcitadel/lib/mime_parser.c index 303bb54e0..105d29a39 100644 --- a/libcitadel/lib/mime_parser.c +++ b/libcitadel/lib/mime_parser.c @@ -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]; -- 2.30.2