//
-// 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.
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();
}
+// 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"
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;
(!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,
);
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;
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;
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
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];