[Pkg-citadel-commit] r209 - citadel/trunk/debian/patches
meskes at alioth.debian.org
meskes at alioth.debian.org
Mon Feb 23 09:17:23 UTC 2009
Author: meskes
Date: 2009-02-23 09:17:23 +0000 (Mon, 23 Feb 2009)
New Revision: 209
Removed:
citadel/trunk/debian/patches/r6612_fixes.diff
citadel/trunk/debian/patches/r6718_fix_sieve_header_hickup.diff
citadel/trunk/debian/patches/r6951_empty_user.diff
citadel/trunk/debian/patches/r7073_msg4_long_lines.diff
Modified:
citadel/trunk/debian/patches/series
Log:
Removed patches included in new upstream version.
Deleted: citadel/trunk/debian/patches/r6612_fixes.diff
===================================================================
--- citadel/trunk/debian/patches/r6612_fixes.diff 2009-02-23 09:16:29 UTC (rev 208)
+++ citadel/trunk/debian/patches/r6612_fixes.diff 2009-02-23 09:17:23 UTC (rev 209)
@@ -1,675 +0,0 @@
-diff -ruN citadel-7.38/citadel_dirs.c citadel-7.38/citadel_dirs.c
---- citadel-7.38/citadel_dirs.c 2008-09-13 06:07:31.000000000 +0200
-+++ citadel-7.38/citadel_dirs.c 2008-09-21 22:52:57.000000000 +0200
-@@ -128,7 +128,7 @@
- #else
- basedir=STATICDATA_DIR;
- #endif
-- COMPUTE_DIRECTORY(ctdl_hlp_dir);
-+ COMPUTE_DIRECTORY(ctdl_message_dir);
-
- #ifndef HAVE_HELP_DIR
- basedir=ctdldir;
-diff -ruN citadel-7.38/docs/citadel.html citadel-7.38/docs/citadel.html
---- citadel-7.38/docs/citadel.html 2008-09-13 06:07:23.000000000 +0200
-+++ citadel-7.38/docs/citadel.html 2008-09-21 22:52:56.000000000 +0200
-@@ -2321,7 +2321,7 @@
- server from a shell and watch it load. It might look something like
- this:</p>
- <font size="-2"> </font>
--<pre><font size="-2">smw @ pixel % ./citserver<br><br>Multithreaded message server for Citadel<br>Copyright (C) 1987-2006 by the Citadel development team.<br>Citadel is open source, covered by the GNU General Public License, and<br>you are welcome to change it and/or distribute copies of it under certain<br>conditions. There is absolutely no warranty for this software. Please<br>read the 'COPYING.txt' file for details.<br><br>Loading citadel.config<br>Opening databases<br>This is GDBM version 1.8.0, as of May 19, 1999.<br>Checking floor reference counts<br>Creating base rooms (if necessary)<br>Registered a new service (TCP port 504)<br>Registered a new service (TCP port 0)<br>Initializing loadable modules<br>Registered server command CHAT (Begin real-time chat)<br>Registered server command PEXP (Poll for instant messages)<br>Registered server command GEXP (Get instant messages)<br>Registered server command SEXP (Send an instant message)<br>Registered server command DEXP (Disable instant messages)<br>Registered a new session function (type 0)<br>Registered a new x-msg function (priority 0)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Registered a new session function (type 1)<br>Registered a new message function (type 201)<br>Registered a new message function (type 202)<br>Registered server command REGI (Enter registration info)<br>Registered server command GREG (Get registration info)<br>Registered a new user function (type 100)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Server-hosted upgrade level is 5.62<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Registered server command EXPI (Expire old system objects)<br>Registered server command FSCK (Check message ref counts)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br><b>citserver: Can't bind: Address already in use<br>ERROR: could not bind to TCP port 25.</b><br>Registered a new service (TCP port 0)<br>Registered a new session function (type 50)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br><b>citserver: Can't bind: Address already in use<br>ERROR: could not bind to TCP port 110.</b><br>Registered a new session function (type 0)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Registered a new message function (type 202)Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Registered server command RWHO (Display who is online)<br>Registered server command HCHG (Masquerade hostname)<br>Registered server command RCHG (Masquerade roomname)<br>Registered server command UCHG (Masquerade username)<br>Registered server command STEL (Enter/exit stealth mode)<br>Loaded module: $Id: citadel.html 5896 2007-12-29 17:14:05Z ajc $<br>Changing uid to 513<br>Starting housekeeper thread<br></font></pre>
-+<pre><font size="-2">smw @ pixel % ./citserver<br><br>Multithreaded message server for Citadel<br>Copyright (C) 1987-2006 by the Citadel development team.<br>Citadel is open source, covered by the GNU General Public License, and<br>you are welcome to change it and/or distribute copies of it under certain<br>conditions. There is absolutely no warranty for this software. Please<br>read the 'COPYING.txt' file for details.<br><br>Loading citadel.config<br>Opening databases<br>This is GDBM version 1.8.0, as of May 19, 1999.<br>Checking floor reference counts<br>Creating base rooms (if necessary)<br>Registered a new service (TCP port 504)<br>Registered a new service (TCP port 0)<br>Initializing loadable modules<br>Registered server command CHAT (Begin real-time chat)<br>Registered server command PEXP (Poll for instant messages)<br>Registered server command GEXP (Get instant messages)<br>Registered server command SEXP (Send an instant message)<br>Registered server command DEXP (Disable instant messages)<br>Registered a new session function (type 0)<br>Registered a new x-msg function (priority 0)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Registered a new session function (type 1)<br>Registered a new message function (type 201)<br>Registered a new message function (type 202)<br>Registered server command REGI (Enter registration info)<br>Registered server command GREG (Get registration info)<br>Registered a new user function (type 100)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Server-hosted upgrade level is 5.62<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Registered server command EXPI (Expire old system objects)<br>Registered server command FSCK (Check message ref counts)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br><b>citserver: Can't bind: Address already in use<br>ERROR: could not bind to TCP port 25.</b><br>Registered a new service (TCP port 0)<br>Registered a new session function (type 50)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br><b>citserver: Can't bind: Address already in use<br>ERROR: could not bind to TCP port 110.</b><br>Registered a new session function (type 0)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Registered a new message function (type 202)Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Registered server command RWHO (Display who is online)<br>Registered server command HCHG (Masquerade hostname)<br>Registered server command RCHG (Masquerade roomname)<br>Registered server command UCHG (Masquerade username)<br>Registered server command STEL (Enter/exit stealth mode)<br>Loaded module: $Id: citadel.html 6607 2008-09-17 14:14:12Z ajc $<br>Changing uid to 513<br>Starting housekeeper thread<br></font></pre>
- <p>The lines emphasized in boldface in the above log output tell you
- that Citadel "can't bind" to various ports. The error 'address already
- in use' generally means that something else is already running on the
-@@ -2688,15 +2688,12 @@
- <h3><a name="Database_repair"></a>Database repair</h3>
- Although Citadel's data store is quite reliable, database corruption
- can occur in rare instances. External factors such as an
--operating
--system crash or an unexpected loss of power might leave the database in
--an unknown state. A utility is provided which may be able to
--repair
--your database if this occurs. If you find that your Citadel
--server
--is not running, and reading the logs shows that it is crashing because
--of
--an inability to validate a database, follow these steps:<br>
-+operating system crash or an unexpected loss of power might leave the
-+database in an unknown state. A utility is provided which may
-+be able to repair your database if this occurs. If you find
-+that your Citadel server is not running, and reading the logs shows
-+that it is crashing because of an inability to validate a database,
-+follow these steps:<br>
- <ol>
- <li>Edit <tt>/etc/inittab</tt> and switch the Citadel service from
- "respawn" to "off." Type <tt>init q</tt> to make this setting
-@@ -2714,6 +2711,11 @@
- </ol>
- If this procedure does not work, you must restore from your most recent
- backup.<br>
-+<b>Please note: this utility should <i>only</i> be used for recovering
-+a database that is causing the Citadel server to crash upon startup. If
-+you have some other type of problem, but the citserver process is not
-+aborting with "Berkeley DB Panic" errors, this is <i>not</i> the way to
-+fix it.</b><br>
- <br>
- <h3><a name="ImportingExporting_your_Citadel"></a>Importing/Exporting
- your Citadel database<br>
-diff -ruN citadel-7.38/Makefile.in citadel-7.38/Makefile.in
---- citadel-7.38/Makefile.in 2008-09-13 06:07:31.000000000 +0200
-+++ citadel-7.38/Makefile.in 2008-09-21 22:52:58.000000000 +0200
-@@ -8,7 +8,7 @@
- # 2. Send e-mail to ajc at uncensored.citadel.org and let me know what you
- # did, so any necessary changes can be put into the next release.
- #
--# $Id: Makefile.in 6589 2008-09-11 16:09:00Z dothebart $
-+# $Id: Makefile.in 6604 2008-09-15 22:24:55Z dothebart $
- #
- ########################################################################
-
-@@ -228,7 +228,7 @@
-
- $(srcdir)/mkinstalldirs $(DESTDIR)$(STATICDATA_DIR)/messages
- @for i in \
-- `$(srcdir)/messages -type f | grep -v .svn`; do \
-+ `find $(srcdir)/messages -type f | grep -v .svn`; do \
- echo $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
- $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
- done
-diff -ruN citadel-7.38/modules/expire/serv_expire.c citadel-7.38/modules/expire/serv_expire.c
---- citadel-7.38/modules/expire/serv_expire.c 2008-09-13 06:07:28.000000000 +0200
-+++ citadel-7.38/modules/expire/serv_expire.c 2008-09-21 22:52:57.000000000 +0200
-@@ -1,5 +1,5 @@
- /*
-- * $Id: serv_expire.c 6571 2008-09-07 14:49:53Z davew $
-+ * $Id: serv_expire.c 6606 2008-09-17 12:24:51Z ajc $
- *
- * This module handles the expiry of old messages and the purging of old users.
- *
-@@ -935,6 +935,10 @@
- /*****************************************************************************/
-
-
-+/* The FSCK command has been removed because people were misusing it */
-+
-+#if 0
-+
- void do_fsck_msg(long msgnum, void *userdata) {
- struct ctdlroomref *ptr;
-
-@@ -1013,6 +1017,7 @@
-
- }
-
-+#endif /* end of commented-out fsck cmd */
-
- /*
- * Manually initiate a run of The Dreaded Auto-Purger (tm)
-@@ -1030,11 +1035,11 @@
- {
- if (!threading)
- {
-- CtdlRegisterProtoHook(cmd_fsck, "FSCK", "Check message ref counts");
-+ /* CtdlRegisterProtoHook(cmd_fsck, "FSCK", "Check message ref counts"); */
- CtdlRegisterProtoHook(cmd_tdap, "TDAP", "Manually initiate auto-purger");
- }
- else
- CtdlThreadCreate("Auto Purger", CTDLTHREAD_BIGSTACK, purge_databases, NULL);
- /* return our Subversion id for the Log */
-- return "$Id: serv_expire.c 6571 2008-09-07 14:49:53Z davew $";
-+ return "$Id: serv_expire.c 6606 2008-09-17 12:24:51Z ajc $";
- }
-diff -ruN citadel-7.38/msgbase.c citadel-7.38/msgbase.c
---- citadel-7.38/msgbase.c 2008-09-13 06:07:31.000000000 +0200
-+++ citadel-7.38/msgbase.c 2008-09-21 22:52:58.000000000 +0200
-@@ -1,5 +1,5 @@
- /*
-- * $Id: msgbase.c 6565 2008-09-04 01:59:23Z ajc $
-+ * $Id: msgbase.c 6609 2008-09-20 06:08:44Z ajc $
- *
- * Implements the message store.
- *
-@@ -89,7 +89,8 @@
- "hnod",
- "msgn",
- "jrnl",
-- NULL, NULL,
-+ NULL,
-+ "list",
- "text",
- "node",
- "room",
-@@ -339,8 +340,6 @@
- int was_seen = 0;
- long lo = (-1L);
- long hi = (-1L);
-- long t = (-1L);
-- int trimming = 0;
- struct visit vbuf;
- long *msglist;
- int num_msgs = 0;
-@@ -348,26 +347,35 @@
- char *is_set; /* actually an array of booleans */
- int num_sets;
- int s;
-+ int w = 0;
- char setstr[SIZ], lostr[SIZ], histr[SIZ];
-- size_t tmp;
-
- /* Don't bother doing *anything* if we were passed a list of zero messages */
- if (num_target_msgnums < 1) {
- return;
- }
-
-- CtdlLogPrintf(CTDL_DEBUG, "CtdlSetSeen(%d msgs starting with %ld, %d, %d)\n",
-+ /* If no room was specified, we go with the current room. */
-+ if (!which_room) {
-+ which_room = &CC->room;
-+ }
-+
-+ /* If no user was specified, we go with the current user. */
-+ if (!which_user) {
-+ which_user = &CC->user;
-+ }
-+
-+ CtdlLogPrintf(CTDL_DEBUG, "CtdlSetSeen(%d msgs starting with %ld, %s, %d) in <%s>\n",
- num_target_msgnums, target_msgnums[0],
-- target_setting, which_set);
-+ (target_setting ? "SET" : "CLEAR"),
-+ which_set,
-+ which_room->QRname);
-
- /* Learn about the user and room in question */
-- CtdlGetRelationship(&vbuf,
-- ((which_user != NULL) ? which_user : &CC->user),
-- ((which_room != NULL) ? which_room : &CC->room)
-- );
-+ CtdlGetRelationship(&vbuf, which_user, which_room);
-
- /* Load the message list */
-- cdbfr = cdb_fetch(CDB_MSGLISTS, &CC->room.QRnumber, sizeof(long));
-+ cdbfr = cdb_fetch(CDB_MSGLISTS, &which_room->QRnumber, sizeof(long));
- if (cdbfr != NULL) {
- msglist = (long *) cdbfr->ptr;
- cdbfr->ptr = NULL; /* CtdlSetSeen() now owns this memory */
-@@ -390,7 +398,19 @@
- break;
- }
-
-- /* CtdlLogPrintf(CTDL_DEBUG, "before optimize: %s\n", vset); */
-+
-+#if 0 /* This is a special diagnostic section. Do not allow it to run during normal operation. */
-+ CtdlLogPrintf(CTDL_DEBUG, "There are %d messages in the room.\n", num_msgs);
-+ for (i=0; i<num_msgs; ++i) {
-+ if (i > 0) if (msglist[i] <= msglist[i-1]) abort();
-+ }
-+ CtdlLogPrintf(CTDL_DEBUG, "We are twiddling %d of them.\n", num_target_msgnums);
-+ for (k=0; k<num_target_msgnums; ++k) {
-+ if (k > 0) if (target_msgnums[k] <= target_msgnums[k-1]) abort();
-+ }
-+#endif
-+
-+ CtdlLogPrintf(CTDL_DEBUG, "before update: %s\n", vset);
-
- /* Translate the existing sequence set into an array of booleans */
- num_sets = num_tokens(vset, ',');
-@@ -400,15 +420,17 @@
- extract_token(lostr, setstr, 0, ':', sizeof lostr);
- if (num_tokens(setstr, ':') >= 2) {
- extract_token(histr, setstr, 1, ':', sizeof histr);
-- if (!strcmp(histr, "*")) {
-- snprintf(histr, sizeof histr, "%ld", LONG_MAX);
-- }
- }
- else {
- strcpy(histr, lostr);
- }
- lo = atol(lostr);
-- hi = atol(histr);
-+ if (!strcmp(histr, "*")) {
-+ hi = LONG_MAX;
-+ }
-+ else {
-+ hi = atol(histr);
-+ }
-
- for (i = 0; i < num_msgs; ++i) {
- if ((msglist[i] >= lo) && (msglist[i] <= hi)) {
-@@ -417,84 +439,86 @@
- }
- }
-
-+
- /* Now translate the array of booleans back into a sequence set */
- strcpy(vset, "");
-- lo = (-1L);
-- hi = (-1L);
-+ was_seen = 0;
-+ lo = (-1);
-+ hi = (-1);
-
- for (i=0; i<num_msgs; ++i) {
-+ is_seen = is_set[i];
-
-- is_seen = is_set[i]; /* Default to existing setting */
--
-+ /* Apply changes */
- for (k=0; k<num_target_msgnums; ++k) {
- if (msglist[i] == target_msgnums[k]) {
- is_seen = target_setting;
- }
- }
-
-- if (is_seen) {
-- if (lo < 0L) lo = msglist[i];
-- hi = msglist[i];
-+ w = 0; /* set to 1 if we write something to the string */
-+
-+ if ((was_seen == 0) && (is_seen == 1)) {
-+ lo = msglist[i];
- }
-+ else if ((was_seen == 1) && (is_seen == 0)) {
-+ hi = msglist[i-1];
-+ w = 1;
-
-- if ( ((is_seen == 0) && (was_seen == 1))
-- || ((is_seen == 1) && (i == num_msgs-1)) ) {
--
-- /* begin trim-o-matic code */
-- j=9;
-- trimming = 0;
-- while ( (strlen(vset) + 20) > sizeof vset) {
-- remove_token(vset, 0, ',');
-- trimming = 1;
-- if (j--) break; /* loop no more than 9 times */
-+ if (!IsEmptyStr(vset)) {
-+ strcat(vset, ",");
- }
-- if ( (trimming) && (which_set == ctdlsetseen_seen) ) {
-- t = atol(vset);
-- if (t<2) t=2;
-- --t;
-- snprintf(lostr, sizeof lostr,
-- "1:%ld,%s", t, vset);
-- safestrncpy(vset, lostr, sizeof vset);
-+ if (lo == hi) {
-+ sprintf(&vset[strlen(vset)], "%ld", hi);
- }
-- /* end trim-o-matic code */
--
-- tmp = strlen(vset);
-- if (tmp > 0) {
-+ else {
-+ sprintf(&vset[strlen(vset)], "%ld:%ld", lo, hi);
-+ }
-+ }
-+ else if ((is_seen) && (i == num_msgs - 1)) {
-+ w = 1;
-+ if (!IsEmptyStr(vset)) {
- strcat(vset, ",");
-- ++tmp;
- }
-- if (lo == hi) {
-- snprintf(&vset[tmp], (sizeof vset) - tmp,
-- "%ld", lo);
-+ if ((i==0) || (was_seen == 0)) {
-+ sprintf(&vset[strlen(vset)], "%ld", msglist[i]);
- }
- else {
-- snprintf(&vset[tmp], (sizeof vset) - tmp,
-- "%ld:%ld", lo, hi);
-+ sprintf(&vset[strlen(vset)], "%ld:%ld", lo, msglist[i]);
- }
-- lo = (-1L);
-- hi = (-1L);
- }
-+
-+ /* If the string is getting too long, truncate it at the beginning; repeat up to 9 times */
-+ if (w) for (j=0; j<9; ++j) {
-+ if ((strlen(vset) + 20) > sizeof vset) {
-+ remove_token(vset, 0, ',');
-+ if (which_set == ctdlsetseen_seen) {
-+ char temp[SIZ];
-+ sprintf(temp, "1:%ld,", atol(vset)-1L);
-+ strcat(temp, vset);
-+ strcpy(vset, temp);
-+ }
-+ }
-+ }
-+
- was_seen = is_seen;
- }
-
-+ CtdlLogPrintf(CTDL_DEBUG, " after update: %s\n", vset);
-+
- /* Decide which message set we're manipulating */
- switch (which_set) {
- case ctdlsetseen_seen:
- safestrncpy(vbuf.v_seen, vset, sizeof vbuf.v_seen);
- break;
- case ctdlsetseen_answered:
-- safestrncpy(vbuf.v_answered, vset,
-- sizeof vbuf.v_answered);
-+ safestrncpy(vbuf.v_answered, vset, sizeof vbuf.v_answered);
- break;
- }
-- free(is_set);
-
-- /* CtdlLogPrintf(CTDL_DEBUG, " after optimize: %s\n", vset); */
-+ free(is_set);
- free(msglist);
-- CtdlSetRelationship(&vbuf,
-- ((which_user != NULL) ? which_user : &CC->user),
-- ((which_room != NULL) ? which_room : &CC->room)
-- );
-+ CtdlSetRelationship(&vbuf, which_user, which_room);
- }
-
-
-diff -ruN citadel-7.38/setup.c citadel-7.38/setup.c
---- citadel-7.38/setup.c 2008-09-13 06:07:31.000000000 +0200
-+++ citadel-7.38/setup.c 2008-09-21 22:52:58.000000000 +0200
-@@ -1,5 +1,5 @@
- /*
-- * $Id: setup.c 6411 2008-06-29 04:13:52Z ajc $
-+ * $Id: setup.c 6612 2008-09-21 20:19:04Z dothebart $
- *
- * Citadel setup utility
- *
-@@ -27,6 +27,10 @@
- #include "sysdep.h"
- #include "config.h"
- #include "citadel_dirs.h"
-+#if HAVE_BACKTRACE
-+#include <execinfo.h>
-+#endif
-+
-
- #define MAXSETUP 6 /* How many setup questions to ask */
-
-@@ -56,6 +60,28 @@
- "Authentication mode"
- };
-
-+/**
-+ * \brief print the actual stack frame.
-+ */
-+void cit_backtrace(void)
-+{
-+#ifdef HAVE_BACKTRACE
-+ void *stack_frames[50];
-+ size_t size, i;
-+ char **strings;
-+
-+
-+ size = backtrace(stack_frames, sizeof(stack_frames) / sizeof(void*));
-+ strings = backtrace_symbols(stack_frames, size);
-+ for (i = 0; i < size; i++) {
-+ if (strings != NULL)
-+ fprintf(stderr, "%s\n", strings[i]);
-+ else
-+ fprintf(stderr, "%p\n", stack_frames[i]);
-+ }
-+ free(strings);
-+#endif
-+}
-
- struct config config;
-
-@@ -122,6 +148,8 @@
-
- void cleanup(int exitcode)
- {
-+// printf("Exitcode: %d\n", exitcode);
-+// cit_backtrace();
- exit(exitcode);
- }
-
-@@ -199,6 +227,9 @@
- msgtext);
- system(buf);
- break;
-+ case UI_SILENT:
-+ fprintf(stderr, "%s\n", msgtext);
-+ break;
- }
- }
-
-@@ -564,26 +595,20 @@
-
- /* Offer to replace other MTA with the vastly superior Citadel :) */
-
-- if (getenv("ACT_AS_MTA")) {
-- if (strcasecmp(getenv("ACT_AS_MTA"), "yes")) {
-- return;
-- }
-- }
-- else {
-- snprintf(buf, sizeof buf,
-- "You appear to have the \"%s\" email program\n"
-- "running on your system. If you want Citadel mail\n"
-- "connected with %s, you will have to manually integrate\n"
-- "them. It is preferable to disable %s, and use Citadel's\n"
-- "SMTP, POP3, and IMAP services.\n\n"
-- "May we disable %s so that Citadel has access to ports\n"
-- "25, 110, and 143?\n",
-- mta, mta, mta, mta
-+ snprintf(buf, sizeof buf,
-+ "You appear to have the \"%s\" email program\n"
-+ "running on your system. If you want Citadel mail\n"
-+ "connected with %s, you will have to manually integrate\n"
-+ "them. It is preferable to disable %s, and use Citadel's\n"
-+ "SMTP, POP3, and IMAP services.\n\n"
-+ "May we disable %s so that Citadel has access to ports\n"
-+ "25, 110, and 143?\n",
-+ mta, mta, mta, mta
- );
-- if (yesno(buf, 1) == 0) {
-- return;
-- }
-+ if (yesno(buf, 1) == 0) {
-+ return;
- }
-+
-
- sprintf(buf, "for x in /etc/rc*.d/S*%s; do mv $x `echo $x |sed s/S/K/g`; done >/dev/null 2>&1", mta);
- system(buf);
-@@ -597,7 +622,7 @@
- /*
- * Check to see if our server really works. Returns 0 on success.
- */
--int test_server(char *setup_directory) {
-+int test_server(char *setup_directory, char *relhomestr, int relhome) {
- char cmd[256];
- char cookie[256];
- FILE *fp;
-@@ -610,10 +635,15 @@
- */
- sprintf(cookie, "--test--%d--", getpid());
-
-- sprintf(cmd, "%s/sendcommand -h%s ECHO %s 2>&1",
-- ctdl_sbin_dir,
-- setup_directory,
-- cookie);
-+ if (relhome)
-+ sprintf(cmd, "%s/sendcommand -h%s ECHO %s 2>&1",
-+ ctdl_sbin_dir,
-+ relhomestr,
-+ cookie);
-+ else
-+ sprintf(cmd, "%s/sendcommand ECHO %s 2>&1",
-+ ctdl_sbin_dir,
-+ cookie);
-
- fp = popen(cmd, "r");
- if (fp == NULL) return(errno);
-@@ -1025,14 +1055,13 @@
- set_str_val(0, setup_directory);
- }
-
-- enable_home=(relh|home);
-+ enable_home = ( relh | home );
-
-- if (chdir(setup_directory) == 0) {
-- strcpy(file_citadel_config, "./citadel.config");
-- }
-- else {
-- important_message("Citadel Setup",
-- "The directory you specified does not exist.");
-+ if (chdir(setup_directory) != 0) {
-+ char errmsg[SIZ];
-+ sprintf(errmsg, "The directory you specified does not exist: [%s]\n", setup_directory);
-+
-+ important_message("Citadel Setup", errmsg);
- cleanup(errno);
- }
-
-@@ -1045,7 +1074,7 @@
- }
-
- /* Make sure Citadel is not running. */
-- if (test_server(setup_directory) == 0) {
-+ if (test_server(setup_directory, relhome, enable_home) == 0) {
- important_message("Citadel Setup",
- "The Citadel service is still running.\n"
- "Please stop the service manually and run "
-@@ -1259,27 +1288,31 @@
- delete_inittab_entry(); /* Remove obsolete /etc/inittab entry */
- check_xinetd_entry(); /* Check /etc/xinetd.d/telnet */
-
-- /* Offer to disable other MTA's on the system. */
-- disable_other_mta("courier-authdaemon");
-- disable_other_mta("courier-imap");
-- disable_other_mta("courier-imap-ssl");
-- disable_other_mta("courier-pop");
-- disable_other_mta("courier-pop3");
-- disable_other_mta("courier-pop3d");
-- disable_other_mta("cyrmaster");
-- disable_other_mta("cyrus");
-- disable_other_mta("dovecot");
-- disable_other_mta("exim");
-- disable_other_mta("exim4");
-- disable_other_mta("imapd");
-- disable_other_mta("mta");
-- disable_other_mta("pop3d");
-- disable_other_mta("popd");
-- disable_other_mta("postfix");
-- disable_other_mta("qmail");
-- disable_other_mta("saslauthd");
-- disable_other_mta("sendmail");
-- disable_other_mta("vmailmgrd");
-+ if ((getenv("ACT_AS_MTA") == NULL) ||
-+ (getenv("ACT_AS_MTA") &&
-+ strcasecmp(getenv("ACT_AS_MTA"), "yes") == 0)) {
-+ /* Offer to disable other MTA's on the system. */
-+ disable_other_mta("courier-authdaemon");
-+ disable_other_mta("courier-imap");
-+ disable_other_mta("courier-imap-ssl");
-+ disable_other_mta("courier-pop");
-+ disable_other_mta("courier-pop3");
-+ disable_other_mta("courier-pop3d");
-+ disable_other_mta("cyrmaster");
-+ disable_other_mta("cyrus");
-+ disable_other_mta("dovecot");
-+ disable_other_mta("exim");
-+ disable_other_mta("exim4");
-+ disable_other_mta("imapd");
-+ disable_other_mta("mta");
-+ disable_other_mta("pop3d");
-+ disable_other_mta("popd");
-+ disable_other_mta("postfix");
-+ disable_other_mta("qmail");
-+ disable_other_mta("saslauthd");
-+ disable_other_mta("sendmail");
-+ disable_other_mta("vmailmgrd");
-+ }
- #endif
-
- /* Check for the 'db' nss and offer to disable it */
-@@ -1312,14 +1345,31 @@
- sleep(3);
- }
-
-- if (test_server(setup_directory) == 0) {
-- snprintf (admin_cmd, sizeof(admin_cmd), "%s/sendcommand \"CREU %s|%s\"", ctdl_utilbin_dir, config.c_sysadm, admin_pass);
-- system(admin_cmd);
-- important_message("Setup finished",
-- "Setup of the Citadel server is complete.\n"
-- "If you will be using WebCit, please run its\n"
-- "setup program now; otherwise, run './citadel'\n"
-- "to log in.\n");
-+ if (test_server(setup_directory, relhome, enable_home) == 0) {
-+ char buf[SIZ];
-+ int found_it = 0;
-+
-+ snprintf (admin_cmd, sizeof(admin_cmd), "%s/sendcommand \"CREU %s|%s\" 2>&1",
-+ ctdl_sbin_dir, config.c_sysadm, admin_pass);
-+ fp = popen(admin_cmd, "r");
-+ if (fp != NULL) {
-+ while (fgets(buf, sizeof buf, fp) != NULL)
-+ {
-+ if ((atol(buf) == 574) || (atol(buf) == 200))
-+ ++found_it;
-+ }
-+ pclose(fp);
-+ }
-+
-+ if (found_it == 0)
-+ important_message("Error","Setup failed to create your admin user");
-+
-+ if (setup_type != UI_SILENT)
-+ important_message("Setup finished",
-+ "Setup of the Citadel server is complete.\n"
-+ "If you will be using WebCit, please run its\n"
-+ "setup program now; otherwise, run './citadel'\n"
-+ "to log in.\n");
- }
- else {
- important_message("Setup failed",
-diff -ruN citadel-7.38/svn_revision.c citadel-7.38/svn_revision.c
---- citadel-7.38/svn_revision.c 2008-09-13 06:08:24.000000000 +0200
-+++ citadel-7.38/svn_revision.c 2008-09-21 22:52:58.000000000 +0200
-@@ -9,6 +9,6 @@
-
- const char *svn_revision (void)
- {
-- const char *SVN_Version = "6597";
-+ const char *SVN_Version = "6614";
- return SVN_Version;
- }
-diff -ruN citadel-7.38/sysdep.h.in citadel-7.38/sysdep.h.in
---- citadel-7.38/sysdep.h.in 2008-09-13 06:08:23.000000000 +0200
-+++ citadel-7.38/sysdep.h.in 2008-09-21 22:52:58.000000000 +0200
-@@ -326,19 +326,19 @@
- /* define, where the config should go in unix style */
- #undef RUN_DIR
-
--/* The size of a `char', as computed by sizeof. */
-+/* The size of `char', as computed by sizeof. */
- #undef SIZEOF_CHAR
-
--/* The size of a `int', as computed by sizeof. */
-+/* The size of `int', as computed by sizeof. */
- #undef SIZEOF_INT
-
--/* The size of a `long', as computed by sizeof. */
-+/* The size of `long', as computed by sizeof. */
- #undef SIZEOF_LONG
-
--/* The size of a `short', as computed by sizeof. */
-+/* The size of `short', as computed by sizeof. */
- #undef SIZEOF_SHORT
-
--/* The size of a `size_t', as computed by sizeof. */
-+/* The size of `size_t', as computed by sizeof. */
- #undef SIZEOF_SIZE_T
-
- /* do we need to use solaris call syntax? */
-@@ -382,5 +382,5 @@
- /* Define to `int' if <sys/types.h> does not define. */
- #undef pid_t
-
--/* Define to `unsigned' if <sys/types.h> does not define. */
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
- #undef size_t
Deleted: citadel/trunk/debian/patches/r6718_fix_sieve_header_hickup.diff
===================================================================
--- citadel/trunk/debian/patches/r6718_fix_sieve_header_hickup.diff 2009-02-23 09:16:29 UTC (rev 208)
+++ citadel/trunk/debian/patches/r6718_fix_sieve_header_hickup.diff 2009-02-23 09:17:23 UTC (rev 209)
@@ -1,55 +0,0 @@
-diff -ruNap citadel-7.38.orig/msgbase.c citadel-7.38/msgbase.c
---- citadel-7.38.orig/msgbase.c 2008-09-13 06:07:31.000000000 +0200
-+++ citadel-7.38/msgbase.c 2008-11-30 17:28:19.000000000 +0100
-@@ -1568,6 +1568,31 @@ char *qp_encode_email_addrs(char *source
- }
-
-
-+/* If the last item in a list of recipients was truncated to a partial address,
-+ * remove it completely in order to avoid choking libSieve
-+ */
-+void sanitize_truncated_recipient(char *str)
-+{
-+ if (!str) return;
-+ if (num_tokens(str, ',') < 2) return;
-+
-+ int len = strlen(str);
-+ if (len < 900) return;
-+ if (len > 998) str[998] = 0;
-+
-+ char *cptr = strrchr(str, ',');
-+ if (!cptr) return;
-+
-+ char *lptr = strchr(cptr, '<');
-+ char *rptr = strchr(cptr, '>');
-+
-+ if ( (lptr) && (rptr) && (rptr > lptr) ) return;
-+
-+ *cptr = 0;
-+}
-+
-+
-+
- /*
- * Get a message off disk. (returns om_* values found in msgbase.h)
- */
-@@ -1769,8 +1794,10 @@ int CtdlOutputPreLoadedMsg(
- safestrncpy(suser, mptr, sizeof suser);
- }
- else if (i == 'Y') {
-- if ((flags & QP_EADDR) != 0)
-+ if ((flags & QP_EADDR) != 0) {
- mptr = qp_encode_email_addrs(mptr);
-+ }
-+ sanitize_truncated_recipient(mptr);
- cprintf("CC: %s%s", mptr, nl);
- }
- else if (i == 'P') {
-@@ -1803,6 +1830,7 @@ int CtdlOutputPreLoadedMsg(
- {
- if (haschar(mptr, '@') == 0)
- {
-+ sanitize_truncated_recipient(mptr);
- cprintf("To: %s@%s%s", mptr, config.c_fqdn, nl);
- }
- else
Deleted: citadel/trunk/debian/patches/r6951_empty_user.diff
===================================================================
--- citadel/trunk/debian/patches/r6951_empty_user.diff 2009-02-23 09:16:29 UTC (rev 208)
+++ citadel/trunk/debian/patches/r6951_empty_user.diff 2009-02-23 09:17:23 UTC (rev 209)
@@ -1,36 +0,0 @@
-Index: citadel-7.38/modules/vcard/serv_vcard.c
-===================================================================
---- citadel-7.38/modules/vcard/serv_vcard.c (Revision 6950)
-+++ citadel-7.38/modules/vcard/serv_vcard.c (Revision 6951)
-@@ -997,8 +997,9 @@
- #ifdef SOLARIS_GETPWUID
- if (getpwuid_r(usbuf->uid, &pwd, pwd_buffer, sizeof pwd_buffer) != NULL) {
- #else // SOLARIS_GETPWUID
-- struct passwd **result = NULL;
-- if (getpwuid_r(usbuf->uid, &pwd, pwd_buffer, sizeof pwd_buffer, result) == 0) {
-+ struct passwd *result = NULL;
-+ CtdlLogPrintf(CTDL_DEBUG, "Searching for uid %d\n", usbuf->uid);
-+ if (getpwuid_r(usbuf->uid, &pwd, pwd_buffer, sizeof pwd_buffer, &result) == 0) {
- #endif // HAVE_GETPWUID_R
- snprintf(buf, sizeof buf, "%s@%s", pwd.pw_name, config.c_fqdn);
- vcard_add_prop(v, "email;internet", buf);
-Index: citadel-7.38/user_ops.c
-===================================================================
---- citadel-7.38/user_ops.c (Revision 6950)
-+++ citadel-7.38/user_ops.c (Revision 6951)
-@@ -1062,14 +1062,7 @@
- uid = pd.pw_uid;
- if (IsEmptyStr (username))
- {
-- CtdlLogPrintf (CTDL_EMERG,
-- "Can't find Realname for user %s [%d] in the Host Auth Database; giving up.\n",
-- newusername, pd.pw_uid);
-- snprintf(buf, SIZ,
-- "Can't find Realname for user %s [%d] in the Host Auth Database; giving up.\n",
-- newusername, pd.pw_uid);
-- aide_message(buf, "User Creation Failure Notice");
--
-+ safestrncpy(username, pd.pw_name, sizeof username);
- }
- }
- else {
Deleted: citadel/trunk/debian/patches/r7073_msg4_long_lines.diff
===================================================================
--- citadel/trunk/debian/patches/r7073_msg4_long_lines.diff 2009-02-23 09:16:29 UTC (rev 208)
+++ citadel/trunk/debian/patches/r7073_msg4_long_lines.diff 2009-02-23 09:17:23 UTC (rev 209)
@@ -1,14 +0,0 @@
-Index: citadel-7.38/msgbase.c
-===================================================================
---- citadel-7.38/msgbase.c (Revision 7072)
-+++ citadel-7.38/msgbase.c (Revision 7073)
-@@ -1780,6 +1780,9 @@
- if (k != 'M') {
- if ( (TheMessage->cm_fields[k] != NULL)
- && (msgkeys[k] != NULL) ) {
-+ if ((k == 'V') || (k == 'R') || (k == 'Y')) {
-+ sanitize_truncated_recipient(TheMessage->cm_fields[k]);
-+ }
- if (k == 'A') {
- if (do_proto) cprintf("%s=%s\n",
- msgkeys[k],
Modified: citadel/trunk/debian/patches/series
===================================================================
--- citadel/trunk/debian/patches/series 2009-02-23 09:16:29 UTC (rev 208)
+++ citadel/trunk/debian/patches/series 2009-02-23 09:17:23 UTC (rev 209)
@@ -1,4 +0,0 @@
-r6612_fixes.diff
-r6718_fix_sieve_header_hickup.diff
-r7073_msg4_long_lines.diff
-r6951_empty_user.diff
More information about the Pkg-citadel-commit
mailing list