1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/jabberd/jabberd.patch Sat Oct 31 19:00:00 2009 +0100 1.3 @@ -0,0 +1,183 @@ 1.4 +Index: etc/c2s.xml.dist.in 1.5 +--- etc/c2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 1.6 ++++ etc/c2s.xml.dist.in 2009-06-30 20:45:22 +0200 1.7 +@@ -50,18 +50,16 @@ 1.8 + </router> 1.9 + 1.10 + <!-- Log configuration - type is "syslog", "file" or "stdout" --> 1.11 +- <log type='syslog'> 1.12 ++ <log type='file'> 1.13 + <!-- If logging to syslog, this is the log ident --> 1.14 +- <ident>jabberd/c2s</ident> 1.15 ++ <!-- <ident>jabberd/c2s</ident> --> 1.16 + 1.17 + <!-- If logging to syslog, this is the log facility 1.18 + (local0 - local7) [default: local3] --> 1.19 +- <facility>local3</facility> 1.20 ++ <!-- <facility>local3</facility> --> 1.21 + 1.22 + <!-- If logging to file, this is the filename of the logfile --> 1.23 +- <!-- 1.24 + <file>@localstatedir@/jabberd/log/c2s.log</file> 1.25 +- --> 1.26 + </log> 1.27 + 1.28 + <!-- Local network configuration --> 1.29 +@@ -137,7 +135,7 @@ 1.30 + <id password-change='true' /> --> 1.31 + 1.32 + <!-- IP address to bind to (default: 0.0.0.0) --> 1.33 +- <ip>0.0.0.0</ip> 1.34 ++ <ip>127.0.0.1</ip> 1.35 + 1.36 + <!-- Port to bind to, or 0 to disable unencrypted access to the 1.37 + server (default: 5222) --> 1.38 +@@ -331,7 +329,7 @@ 1.39 + <path>@pkglibdir@</path> 1.40 + 1.41 + <!-- Backend module to use --> 1.42 +- <module>sqlite</module> 1.43 ++ <module>db</module> 1.44 + 1.45 + <!-- Available authentication mechanisms --> 1.46 + <mechanisms> 1.47 +Index: etc/router.xml.dist.in 1.48 +--- etc/router.xml.dist.in.orig 2009-06-30 11:38:16 +0200 1.49 ++++ etc/router.xml.dist.in 2009-06-30 20:45:06 +0200 1.50 +@@ -8,24 +8,22 @@ 1.51 + <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile> 1.52 + 1.53 + <!-- Log configuration - type is "syslog", "file" or "stdout" --> 1.54 +- <log type='syslog'> 1.55 ++ <log type='file'> 1.56 + <!-- If logging to syslog, this is the log ident --> 1.57 +- <ident>jabberd/router</ident> 1.58 ++ <!-- <ident>jabberd/router</ident> --> 1.59 + 1.60 + <!-- If logging to syslog, this is the log facility 1.61 + (local0 - local7) [default: local3] --> 1.62 +- <facility>local3</facility> 1.63 ++ <!-- <facility>local3</facility> --> 1.64 + 1.65 + <!-- If logging to file, this is the filename of the logfile --> 1.66 +- <!-- 1.67 + <file>@localstatedir@/jabberd/log/router.log</file> 1.68 +- --> 1.69 + </log> 1.70 + 1.71 + <!-- Local network configuration --> 1.72 + <local> 1.73 + <!-- IP address to bind to (default: 0.0.0.0) --> 1.74 +- <ip>0.0.0.0</ip> 1.75 ++ <ip>127.0.0.1</ip> 1.76 + 1.77 + <!-- Port to bind to (default: 5347) --> 1.78 + <port>5347</port> 1.79 +Index: etc/s2s.xml.dist.in 1.80 +--- etc/s2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 1.81 ++++ etc/s2s.xml.dist.in 2009-06-30 20:45:06 +0200 1.82 +@@ -60,25 +60,23 @@ 1.83 + </router> 1.84 + 1.85 + <!-- Log configuration - type is "syslog", "file" or "stdout" --> 1.86 +- <log type='syslog'> 1.87 ++ <log type='file'> 1.88 + <!-- If logging to syslog, this is the log ident --> 1.89 +- <ident>jabberd/s2s</ident> 1.90 ++ <!-- <ident>jabberd/s2s</ident> --> 1.91 + 1.92 + <!-- If logging to syslog, this is the log facility 1.93 + (local0 - local7) [default: local3] --> 1.94 +- <facility>local3</facility> 1.95 ++ <!-- <facility>local3</facility> --> 1.96 + 1.97 + <!-- if logging to file, this is the filename of the logfile --> 1.98 +- <!-- 1.99 + <file>@localstatedir@/jabberd/log/s2s.log</file> 1.100 +- --> 1.101 + </log> 1.102 + 1.103 + <!-- Local network configuration --> 1.104 + <local> 1.105 + <!-- IP and port to listen for incoming s2s connections on 1.106 + (default: 0.0.0.0, 5269) --> 1.107 +- <ip>0.0.0.0</ip> 1.108 ++ <ip>127.0.0.1</ip> 1.109 + <port>5269</port> 1.110 + 1.111 + <!-- Multihomed machines (with more than one interface and IP address) 1.112 +Index: etc/sm.xml.dist.in 1.113 +--- etc/sm.xml.dist.in.orig 2009-06-30 11:38:16 +0200 1.114 ++++ etc/sm.xml.dist.in 2009-06-30 20:45:36 +0200 1.115 +@@ -50,13 +50,13 @@ 1.116 + </router> 1.117 + 1.118 + <!-- Log configuration - type is "syslog", "file" or "stdout" --> 1.119 +- <log type='syslog'> 1.120 ++ <log type='file'> 1.121 + <!-- If logging to syslog, this is the log ident --> 1.122 +- <ident>jabberd/sm</ident> 1.123 ++ <!-- <ident>jabberd/sm</ident> --> 1.124 + 1.125 + <!-- If logging to syslog, this is the log facility 1.126 + (local0 - local7) [default: local3] --> 1.127 +- <facility>local3</facility> 1.128 ++ <!-- <facility>local3</facility> --> 1.129 + 1.130 + <!-- If logging to file, this is the filename of the logfile --> 1.131 + <!-- 1.132 +@@ -85,7 +85,7 @@ 1.133 + <path>@pkglibdir@</path> 1.134 + 1.135 + <!-- By default, we use the SQLite driver for all storage --> 1.136 +- <driver>sqlite</driver> 1.137 ++ <driver>db</driver> 1.138 + 1.139 + <!-- Its also possible to explicitly list alternate drivers for 1.140 + specific data types. --> 1.141 +Index: sm/mod_iq_time.c 1.142 +--- sm/mod_iq_time.c.orig 2009-06-30 11:38:15 +0200 1.143 ++++ sm/mod_iq_time.c 2009-06-30 20:45:06 +0200 1.144 +@@ -39,6 +39,7 @@ 1.145 + static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt) 1.146 + { 1.147 + time_t t; 1.148 ++ time_t tzone; 1.149 + struct tm *tm; 1.150 + char buf[64]; 1.151 + char *c; 1.152 +@@ -78,7 +79,8 @@ 1.153 + datetime_out(t, dt_DATETIME, buf, 64); 1.154 + nad_insert_elem(pkt->nad, 2, NAD_ENS(pkt->nad, 1), "utc", buf); 1.155 + #ifdef HAVE_TZSET 1.156 +- snprintf(buf, 64, "%+03d:%02d", -((int)timezone)/(60*60), -((int)timezone)%(60*60)); 1.157 ++ tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t); 1.158 ++ snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60)); 1.159 + #else 1.160 + snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60)); 1.161 + #endif 1.162 +Index: sm/mod_roster.c 1.163 +--- sm/mod_roster.c.orig 2009-06-30 11:38:15 +0200 1.164 ++++ sm/mod_roster.c 2009-06-30 20:45:06 +0200 1.165 +@@ -635,6 +635,9 @@ 1.166 + if(user->sessions == NULL) 1.167 + return mod_PASS; 1.168 + 1.169 ++ /* We have to free old packet - Lemming's memory leak fix */ 1.170 ++ pkt_free(pkt); 1.171 ++ 1.172 + /* build a new packet to push out to everyone */ 1.173 + pkt = pkt_create(user->sm, "iq", "set", NULL, NULL); 1.174 + pkt_id_new(pkt); 1.175 +Index: util/util.h 1.176 +--- util/util.h.orig 2009-06-30 11:38:16 +0200 1.177 ++++ util/util.h 2009-06-30 20:45:06 +0200 1.178 +@@ -30,6 +30,8 @@ 1.179 + #include <time.h> 1.180 + #include <errno.h> 1.181 + #include <assert.h> 1.182 ++#include <sys/types.h> 1.183 ++#include <sys/socket.h> 1.184 + 1.185 + #include <expat.h> 1.186 +