You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

186 lines
6.0 KiB

Index: etc/c2s.xml.dist.in
--- etc/c2s.xml.dist.in.orig 2018-04-22 11:41:35.000000000 +0200
+++ etc/c2s.xml.dist.in 2018-12-04 20:44:51.706417000 +0100
@@ -50,18 +50,16 @@
</router>
<!-- Log configuration - type is "syslog", "file" or "stdout" -->
- <log type='syslog'>
+ <log type='file'>
<!-- If logging to syslog, this is the log ident -->
- <ident>jabberd/c2s</ident>
+ <!-- <ident>jabberd/c2s</ident> -->
<!-- If logging to syslog, this is the log facility
(local0 - local7) [default: local3] -->
- <facility>local3</facility>
+ <!-- <facility>local3</facility> -->
<!-- If logging to file, this is the filename of the logfile -->
- <!--
<file>@localstatedir@/@package@/log/c2s.log</file>
- -->
<!-- Filename of the debug logfile -->
<!--
@@ -158,7 +156,7 @@
<id password-change='mu' /> -->
<!-- IP address to bind to (default: 0.0.0.0) -->
- <ip>0.0.0.0</ip>
+ <ip>127.0.0.1</ip>
<!-- Port to bind to, or 0 to disable unencrypted access to the
server (default: 5222) -->
@@ -384,7 +382,7 @@
<path>@pkglibdir@</path>
<!-- Backend module to use -->
- <module>sqlite</module>
+ <module>db</module>
<!-- Available authentication mechanisms -->
<mechanisms>
Index: etc/router.xml.dist.in
--- etc/router.xml.dist.in.orig 2018-12-04 20:43:39.626996000 +0100
+++ etc/router.xml.dist.in 2018-12-04 20:45:27.433065000 +0100
@@ -8,18 +8,16 @@
<pidfile>@localstatedir@/@package@/pid/${id}.pid</pidfile>
<!-- Log configuration - type is "syslog", "file" or "stdout" -->
- <log type='syslog'>
+ <log type='file'>
<!-- If logging to syslog, this is the log ident -->
- <ident>jabberd/router</ident>
+ <!-- <ident>jabberd/router</ident> -->
<!-- If logging to syslog, this is the log facility
(local0 - local7) [default: local3] -->
- <facility>local3</facility>
+ <!-- <facility>local3</facility> -->
<!-- If logging to file, this is the filename of the logfile -->
- <!--
<file>@localstatedir@/@package@/log/router.log</file>
- -->
<!-- Filename of the debug logfile -->
<!--
@@ -30,7 +28,7 @@
<!-- Local network configuration -->
<local>
<!-- IP address to bind to (default: 0.0.0.0) -->
- <ip>0.0.0.0</ip>
+ <ip>127.0.0.1</ip>
<!-- Port to bind to (default: 5347) -->
<port>5347</port>
Index: etc/s2s.xml.dist.in
--- etc/s2s.xml.dist.in.orig 2018-12-04 20:43:39.627250000 +0100
+++ etc/s2s.xml.dist.in 2018-12-04 20:45:57.091286000 +0100
@@ -60,18 +60,16 @@
</router>
<!-- Log configuration - type is "syslog", "file" or "stdout" -->
- <log type='syslog'>
+ <log type='file'>
<!-- If logging to syslog, this is the log ident -->
- <ident>jabberd/s2s</ident>
+ <!-- <ident>jabberd/s2s</ident> -->
<!-- If logging to syslog, this is the log facility
(local0 - local7) [default: local3] -->
- <facility>local3</facility>
+ <!-- <facility>local3</facility> -->
<!-- if logging to file, this is the filename of the logfile -->
- <!--
<file>@localstatedir@/@package@/log/s2s.log</file>
- -->
<!-- Filename of the debug logfile -->
<!--
@@ -83,7 +81,7 @@
<local>
<!-- IP and port to listen for incoming s2s connections on
(default: 0.0.0.0, 5269) -->
- <ip>0.0.0.0</ip>
+ <ip>127.0.0.1</ip>
<port>5269</port>
<!-- Multihomed machines (with more than one interface and IP address)
Index: etc/sm.xml.dist.in
--- etc/sm.xml.dist.in.orig 2018-04-22 11:41:35.000000000 +0200
+++ etc/sm.xml.dist.in 2018-12-04 20:43:39.627496000 +0100
@@ -50,13 +50,13 @@
</router>
<!-- Log configuration - type is "syslog", "file" or "stdout" -->
- <log type='syslog'>
+ <log type='file'>
<!-- If logging to syslog, this is the log ident -->
- <ident>jabberd/sm</ident>
+ <!-- <ident>jabberd/sm</ident> -->
<!-- If logging to syslog, this is the log facility
(local0 - local7) [default: local3] -->
- <facility>local3</facility>
+ <!-- <facility>local3</facility> -->
<!-- If logging to file, this is the filename of the logfile -->
<!--
@@ -90,7 +90,7 @@
<path>@pkglibdir@</path>
<!-- By default, we use the SQLite driver for all storage -->
- <driver>sqlite</driver>
+ <driver>db</driver>
<!-- Its also possible to explicitly list alternate drivers for
specific data types. -->
Index: sm/mod_iq_time.c
--- sm/mod_iq_time.c.orig 2018-04-22 11:41:35.000000000 +0200
+++ sm/mod_iq_time.c 2018-12-04 20:43:39.627623000 +0100
@@ -39,6 +39,7 @@
static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
{
time_t t;
+ time_t tzone;
struct tm *tm;
char buf[64];
char *c;
@@ -78,7 +79,8 @@
datetime_out(t, dt_DATETIME, buf, 64);
nad_insert_elem(pkt->nad, 2, NAD_ENS(pkt->nad, 1), "utc", buf);
#ifdef HAVE_TZSET
- snprintf(buf, 64, "%+03d:%02d", -((int)timezone)/(60*60), -((int)timezone)%(60*60));
+ tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t);
+ snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60));
#else
snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60));
#endif
Index: sm/mod_roster.c
--- sm/mod_roster.c.orig 2018-04-22 11:41:35.000000000 +0200
+++ sm/mod_roster.c 2018-12-04 20:43:39.627813000 +0100
@@ -717,6 +717,9 @@
if(user->sessions == NULL)
return mod_PASS;
+ /* We have to free old packet - Lemming's memory leak fix */
+ pkt_free(pkt);
+
/* build a new packet to push out to everyone */
pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
pkt_id_new(pkt);
Index: util/util.h
--- util/util.h.orig 2018-04-22 11:41:35.000000000 +0200
+++ util/util.h 2018-12-04 20:43:39.627960000 +0100
@@ -30,6 +30,8 @@
#include <time.h>
#include <errno.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
#include <expat.h>