* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 913 // This version
+#define REV_LEVEL 914 // This version
#define REV_MIN 591 // Oldest compatible database
#define EXPORT_REV_MIN 760 // Oldest compatible export files
-#define LIBCITADEL_MIN 903 // Minimum required version of libcitadel
+#define LIBCITADEL_MIN 914 // Minimum required version of libcitadel
#define SERVER_TYPE 0 // zero for stock Citadel; other developers please
// obtain SERVER_TYPE codes for your implementations
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([Citadel], [912], [http://www.citadel.org/])
+AC_INIT([Citadel], [914], [http://www.citadel.org/])
AC_REVISION([$Revision: 5108 $])
AC_CONFIG_SRCDIR([citserver.c])
AC_CONFIG_HEADER(sysdep.h)
+citadel (9.14-1) stable; urgency=low
+
+ * new release
+
+ -- Wilfried Goesgens <w.goesgens@outgesourced.org> Wed, 26 Dec 2017 12:56:30 -0400
+
citadel (9.01-1) stable; urgency=low
* new release
char host[256], type[256];
int found = 0;
+ syslog(LOG_DEBUG, "EVQ: CtdlHostAlias(%s)", fqdn);
if (fqdn == NULL) return(hostalias_nomatch);
if (IsEmptyStr(fqdn)) return(hostalias_nomatch);
if (!strcasecmp(fqdn, "localhost")) return(hostalias_localhost);
if (inetcfg == NULL) return(hostalias_nomatch);
config_lines = num_tokens(inetcfg, '\n');
+ syslog(LOG_DEBUG, "EVQ: inetcfg config_lines is %d", config_lines);
for (i=0; i<config_lines; ++i) {
extract_token(buf, inetcfg, i, '\n', sizeof buf);
extract_token(host, buf, 0, '|', sizeof host);
void inetcfg_init(void) {
+ syslog(LOG_DEBUG, "EVQ: called inetcfg_init()");
if (CtdlGetRoom(&CC->room, SYSCONFIGROOM) != 0) {
return;
}
}
CtdlPutUserLock(&us);
if ((us.uid > 0) && (us.uid != NATIVE_AUTH_UID)) { // if non-native auth , index by uid
-
- syslog(LOG_DEBUG, "\033[31m attaching %d to %s \033[0m", us.uid , us.fullname);
-
-
StrBuf *claimed_id = NewStrBuf();
StrBufPrintf(claimed_id, "uid:%d", us.uid);
attach_extauth(&us, claimed_id);
}
}
+
/*
* Build extauth index of all users with uid-based join (system auth, LDAP auth)
* Also changes all users with a uid of CTDLUID to NATIVE_AUTH_UID (-1)
}
-
/*
* These accounts may have been created by code that ran between mid 2008 and early 2011.
* If present they are no longer in use and may be deleted.
* Based on the server version number reported by the existing database,
* run in-place data format upgrades until everything is up to date.
*/
-void check_server_upgrades(void) {
+void pre_startup_upgrades(void) {
oldver = CtdlGetConfigInt("MM_hosted_upgrade_level");
syslog(LOG_INFO, "Existing database version on disk is %d", oldver);
update_config();
if (oldver < REV_LEVEL) {
- syslog(LOG_WARNING, "Server hosted updates need to be processed at this time. Please wait...");
+ syslog(LOG_WARNING, "Running pre-startup database upgrades.");
}
else {
return;
ingest_old_roominfo_and_roompic_files();
}
- if ((oldver > 000) && (oldver < 912)) {
- move_inet_addrs_from_vcards_to_user_records();
- }
-
CtdlSetConfigInt("MM_hosted_upgrade_level", REV_LEVEL);
/*
}
+/*
+ * Based on the server version number reported by the existing database,
+ * run in-place data format upgrades until everything is up to date.
+ */
+void post_startup_upgrades(void) {
+
+ syslog(LOG_INFO, "Existing database version on disk is %d", oldver);
+
+ if (oldver < REV_LEVEL) {
+ syslog(LOG_WARNING, "Running post-startup database upgrades.");
+ }
+ else {
+ return;
+ }
+
+ if ((oldver > 000) && (oldver < 912)) {
+ move_inet_addrs_from_vcards_to_user_records();
+ }
+}
+
+
CTDL_MODULE_UPGRADE(upgrade)
{
- check_server_upgrades();
+ pre_startup_upgrades();
/* return our module id for the Log */
return "upgrade";
}
+
+CTDL_MODULE_INIT(upgrade)
+{
+ if(!threading)
+ {
+ post_startup_upgrades();
+ }
+
+ /* return our module name for the log */
+ return "upgrade";
+}
if (CM_IsEmpty(msg, eAuthor)) return;
if (CM_IsEmpty(msg, eNodeName)) return;
- snprintf(citadel_address, sizeof citadel_address, "%s @ %s",
- msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]);
+ snprintf(citadel_address, sizeof citadel_address, "%s @ %s", msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]);
v = vcard_load(msg->cm_fields[eMesageText]);
if (v == NULL) return;
void extract_inet_email_addrs(char *emailaddrbuf, size_t emailaddrbuf_len,
char *secemailaddrbuf, size_t secemailaddrbuf_len,
struct vCard *v,
- int local_addrs_only)
-{
+ int local_addrs_only
+) {
struct CitContext *CCC = CC; /* put this on the stack, just for speed */
char *s, *k, *addr;
int instance = 0;
striplt(addr);
if (!IsEmptyStr(addr)) {
IsDirectoryAddress = IsDirectory(addr, 1);
+
+ syslog(LOG_DEBUG, "EVQ: addr=<%s> IsDirectoryAddress=<%d> local_addrs_only=<%d>", addr, IsDirectoryAddress, local_addrs_only);
+
if ( IsDirectoryAddress || !local_addrs_only)
{
++saved_instance;
syslog(LOG_DEBUG, "\033[31m FIXME BORK BORK BORK try lookup by uid , or maybe dn?\033[0m");
-
found_user = CtdlTryUserLDAP(usbuf->fullname, ldap_dn, sizeof ldap_dn, ldap_cn, sizeof ldap_cn, &usbuf->uid);
if (found_user == 0) {
if (Ctdl_LDAP_to_vCard(ldap_dn, v)) {
CtdlRegisterSessionHook(vcard_session_login_hook, EVT_LOGIN, PRIO_LOGIN + 70);
CtdlRegisterMessageHook(vcard_upload_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(vcard_upload_aftersave, EVT_AFTERSAVE);
- CtdlRegisterDeleteHook(vcard_delete_remove);
CtdlRegisterProtoHook(cmd_regi, "REGI", "Enter registration info");
CtdlRegisterProtoHook(cmd_greg, "GREG", "Get registration info");
CtdlRegisterProtoHook(cmd_qdir, "QDIR", "Query Directory");
CtdlRegisterProtoHook(cmd_dvca, "DVCA", "Dump VCard Addresses");
CtdlRegisterUserHook(vcard_newuser, EVT_NEWUSER);
CtdlRegisterUserHook(vcard_purge, EVT_PURGEUSER);
- CtdlRegisterNetprocHook(vcard_extract_from_network);
+
+ CtdlRegisterDeleteHook(vcard_delete_remove); // FIXME this is obsolete, right?
+ CtdlRegisterNetprocHook(vcard_extract_from_network); // FIXME this is obsolete, right?
+
CtdlRegisterSessionHook(store_harvested_addresses, EVT_TIMER, PRIO_CLEANUP + 470);
CtdlRegisterFixedOutputHook("text/x-vcard", vcard_fixed_output);
CtdlRegisterFixedOutputHook("text/vcard", vcard_fixed_output);
qr.QRep.expire_mode = EXPIRE_MANUAL;
qr.QRdefaultview = VIEW_ADDRESSBOOK; /* 2 = address book view */
CtdlPutRoomLock(&qr);
-
- /*
- * Also make sure it has a netconfig file, so the networker runs
- * on this room even if we don't share it with any other nodes.
- * This allows the CANCEL messages (i.e. "Purge this vCard") to be
- * purged.
- *
- * FIXME this no longer works
- *
- */
- //assoc_file_name(filename, sizeof filename, &qr, ctdl_netcfg_dir);
- //fp = fopen(filename, "a");
- //if (fp != NULL) {
- //fclose(fp);
- //rv = chown(filename, CTDLUID, (-1));
- //if (rv == -1) {
- //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %m", filename);
- //}
- //rv = chmod(filename, 0600);
- //if (rv == -1) {
- //syslog(LOG_ERR, "vcard: failed to adjust ownership of %s: %m", filename);
- //}
- //}
- //else {
- //syslog(LOG_ERR, "vcard: cannot create %s: %m", filename);
- //}
}
/* for postfix tcpdict */
dnl Ensure that libcitadel is configured with autoconf 2.52 or newer
AC_PREREQ(2.52)
-AC_INIT(libcitadel, 904, http://uncensored.citadel.org)
+AC_INIT(libcitadel, 914, http://uncensored.citadel.org)
AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(conftools)
dnl
LIBCURRENT=4
-LIBREVISION=904
+LIBREVISION=914
LIBAGE=0
sinclude(conftools/libtool.m4)
+libcitadel (9.14-1) stable; urgency=low
+
+ * new release
+
+ -- Wilfried Goesgens <w.goesgens@outgesourced.org> Wed, 26 Dec 2017 12:56:30 -0400
+
libcitadel (9.01-1) stable; urgency=low
* new release
#include <sys/types.h>
#include <netinet/in.h>
-#define LIBCITADEL_VERSION_NUMBER 904
+#define LIBCITADEL_VERSION_NUMBER 914
/*
* Here's a bunch of stupid magic to make the MIME parser portable.
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
-AC_INIT([WebCit], [912], [http://www.citadel.org/])
+AC_INIT([WebCit], [914], [http://www.citadel.org/])
AC_SUBST(PROG_SUBDIRS)
-webcit (9.01-1) stable; urgency=low
+webcit (9.14-1) stable; urgency=low
* new release
- -- Wilfried Goesgens <w.goesgens@outgesourced.org> Wed, 01 Apr 2015 12:56:30 -0400
+ -- Wilfried Goesgens <w.goesgens@outgesourced.org> Wed, 26 Dec 2017 12:56:30 -0400
webcit (8.29-1) stable; urgency=low
#define PORT_NUM 2000 /* port number to listen on */
#define DEVELOPER_ID 0
#define CLIENT_ID 4
-#define CLIENT_VERSION 912 /* This version of WebCit */
-#define MINIMUM_CIT_VERSION 912 /* Minimum required version of Citadel server */
-#define LIBCITADEL_MIN 903 /* Minimum required version of libcitadel */
+#define CLIENT_VERSION 914 /* This version of WebCit */
+#define MINIMUM_CIT_VERSION 914 /* Minimum required version of Citadel server */
+#define LIBCITADEL_MIN 914 /* Minimum required version of libcitadel */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define TARGET "webcit01" /* Window target for inline URL's */