--- ejabberd-2.1.10.orig/debian/NEWS +++ ejabberd-2.1.10/debian/NEWS @@ -0,0 +1,65 @@ +ejabberd (2.1.8-1) unstable; urgency=low + + This release drops support for the @recent@ shared roster group + (implemented as part of the OLPC project), and now only the @online@ + shared roster group is supported. + + -- Konstantin Khomoutov Sun, 07 Aug 2011 20:40:02 +0400 + +ejabberd (2.1.4-1) unstable; urgency=low + + umask is now forcibly set to 027 before ejabberd's main process + is started. This means all the files created by ejabberd now have + permissions set to 0640 (0750 for directories). This does not have + any impact on the routine operation of ejabberd but this affects + all the commands which export data, such as `ejabberdctl export2odbc` -- + the files they generate now cannot be read by users other than + root, ejabberd and those included in the "ejabberd" group. + + The directory containing ejabberd logs (/var/log/ejabberd) is now + owned by the "adm" group and have the group sticky bit set on it + so that the log files are also owned by this group. In addition, due + to the change described above they are now not world-readable. + This is a change in behaviour; if you don't like it, use dpkg-statoverride + on the /var/log/ejabberd directory to force other owner/permissions. + + -- Konstantin Khomoutov Mon, 12 Jul 2010 03:28:32 +0400 + +ejabberd (2.1.2-2) unstable; urgency=high + + This release fixes CVE-2010-0305 by allowing a server administrator + to limit the lengths of "message queues" for outgoing connections. + Roughly speaking, each message in such queues represents one XML + stanza queued to be sent into its relevant outgoing stream. + + Note that the limiting is *NOT* enabled by default; if you want to enable + it, use the {max_fsm_queue, Size} option which can either be specified + globally (at the top level of the configuration file) and/or + specifically for ejabberd_service and ejabberd_c2s_in listeners. + Local options specified for the said listeners override the global one. + The global option, if present, also affects outgoing server-to-server + connections. + The argument to this option can be either an atom 'undefined' -- the default + value -- or an integer number, specifying the maximum number of queued messages. + + Refer to /usr/share/doc/ejabberd/guide.html for more details. + + -- Konstantin Khomoutov Tue, 09 Feb 2010 01:46:55 +0300 + +ejabberd (2.1.0-1) unstable; urgency=low + + Calling convention of the ejabberdctl program was changed. + Also some of its commands were renamed or removed, + or their calling convention was changed due to switching + to another ejabberd module providing a set of additional commands. + + "sasl.log" was renamed to "erlang.log", and ejabberd command-line option + to change its location was renamed accordingly as well. + + ejabberdctl no more generates unique node names for the erl process + it spawns by default, it only does so if the "--concurrent" option is specified. + The method used to generate unique node names was also changed. + + See the "Upgrading from 2.0.x series" section in README.Debian for details. + + -- Konstantin Khomoutov Tue, 17 Nov 2009 16:56:08 +0300 --- ejabberd-2.1.10.orig/debian/install +++ ejabberd-2.1.10/debian/install @@ -0,0 +1,4 @@ +debian/scripts/ejabberd usr/sbin/ +debian/scripts/ejabberdctl usr/sbin/ +debian/ejabberd.cfg usr/share/ejabberd/ + --- ejabberd-2.1.10.orig/debian/copyright +++ ejabberd-2.1.10/debian/copyright @@ -0,0 +1,24 @@ +This package was first debianized by Sergei Golovan on +Sun, 25 Apr 2004 16:39:22 +0400. It was maintained since then by +Torsten Werner , Gerfried Fuchs and +Konstantin Khomoutov . + +Original source has been downloaded from + http://www.process-one.net/en/projects/ejabberd/download.html + +Upstream Author: Alexey Shchepin + +This software is Copyright (c) 2002-2005 Alexey Shchepin + +You are free to distribute this software under the terms of +the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +On Debian systems, the complete text of the GNU General Public +License version 2 can be found in `/usr/share/common-licenses/GPL-2', +later versions can be found in there too. + +As a special exception, the author gives permission to link this program +with the OpenSSL library and distribute the resulting binary. + --- ejabberd-2.1.10.orig/debian/examples +++ ejabberd-2.1.10/debian/examples @@ -0,0 +1,3 @@ +src/ejabberd.cfg.example +examples/* +src/odbc/*.sql --- ejabberd-2.1.10.orig/debian/doc-base +++ ejabberd-2.1.10/debian/doc-base @@ -0,0 +1,9 @@ +Document: ejabberd +Title: Debian ejabberd Manual +Author: Alexey Shchepin +Abstract: User manual for ejabberd - Erlang Jabber server. +Section: Network/Communication + +Format: HTML +Index: /usr/share/doc/ejabberd/guide.html +Files: /usr/share/doc/ejabberd/*.html --- ejabberd-2.1.10.orig/debian/init.d +++ ejabberd-2.1.10/debian/init.d @@ -0,0 +1,149 @@ +#! /bin/sh +# +# ejabberd Start/stop ejabberd server +# + +### BEGIN INIT INFO +# Provides: ejabberd +# Required-Start: $remote_fs $network $named $time +# Required-Stop: $remote_fs $network $named $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts ejabberd jabber server +# Description: Starts ejabberd jabber server, an XMPP +# compliant server written in Erlang. +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +EJABBERD=/usr/sbin/ejabberd +EJABBERDCTL=/usr/sbin/ejabberdctl +EJABBERDRUN=/var/run/ejabberd +EJABBERDUSER=ejabberd +NAME=ejabberd + +test -f $EJABBERD || exit 0 +test -f $EJABBERDCTL || exit 0 + +# Include ejabberd defaults if available +if [ -f /etc/default/ejabberd ] ; then + . /etc/default/ejabberd +fi + +ctl() +{ + action="$1" + su $EJABBERDUSER -c "$EJABBERDCTL $action" >/dev/null +} + +mkrundir() +{ + if [ ! -d $EJABBERDRUN ]; then + mkdir -p $EJABBERDRUN + if [ $? -ne 0 ]; then + echo -n " failed" + return + fi + chmod 0755 $EJABBERDRUN + chown ejabberd:ejabberd $EJABBERDRUN + fi +} + +start() +{ + mkrundir + + cd /var/lib/ejabberd + su $EJABBERDUSER -c "$EJABBERD -noshell -detached" + + cnt=0 + while ! (ctl status || test $? = 1) ; do + echo -n . + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + echo -n " failed" + break + fi + sleep 1 + done +} + +stop() +{ + if ctl stop ; then + cnt=0 + sleep 1 + while ctl status || test $? = 1 ; do + echo -n . + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + echo -n " failed" + break + fi + sleep 1 + done + else + echo -n " failed" + fi +} + +live() +{ + mkrundir + + echo '*******************************************************' + echo '* To quit, press Ctrl-g then enter q and press Return *' + echo '*******************************************************' + echo + + cd /var/lib/ejabberd + exec su $EJABBERDUSER -c "$EJABBERD" +} + +case "$1" in + start) + echo -n "Starting jabber server: $NAME" + if ctl status ; then + echo -n " already running" + else + start + fi + ;; + stop) + echo -n "Stopping jabber server: $NAME" + if ctl status ; then + stop + else + echo -n " already stopped" + fi + ;; + restart|force-reload) + echo -n "Restarting jabber server: $NAME" + if ctl status ; then + stop + start + else + echo -n " is not running. Starting $NAME" + start + fi + ;; + live) + if ctl status ; then + echo -n "ejabberd is already running" + else + live + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|live}" >&2 + exit 1 + ;; +esac + +if [ $? -eq 0 ]; then + echo . +else + echo " failed." +fi + +exit 0 + --- ejabberd-2.1.10.orig/debian/rules +++ ejabberd-2.1.10/debian/rules @@ -0,0 +1,119 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +DEB_CONFIGURE_EXTRA_FLAGS := --enable-odbc --enable-pam +# Not sure if we should enable workaround for gateway subscription +# Adding it breaks XMPP compatibility +# Not adding breaks roster import for some gateways (specifically JIT) +#DEB_CONFIGURE_EXTRA_FLAGS := --enable-odbc --enable-roster-gateway-workaround + + +AUTO_OPTS = --sourcedirectory=src + +DESTDIR=$(CURDIR)/debian/ejabberd + +ifndef HOME + export HOME="$(CURDIR)" +endif + +configure: configure-stamp +configure-stamp: $(QUILT_STAMPFN) + dh_testdir + + dh_auto_configure $(AUTO_OPTS) -- $(DEB_CONFIGURE_EXTRA_FLAGS) \ + $(shell dpkg-buildflags --export=configure) + + touch configure-stamp + + +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + +build-stamp: configure-stamp + dh_testdir + + dh_auto_build $(AUTO_OPTS) + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + dh_auto_clean $(AUTO_OPTS) + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + dh_auto_install $(AUTO_OPTS) + + # Remove unused upstream config files: + rm $(DESTDIR)/etc/ejabberd/ejabberd.cfg + rm $(DESTDIR)/etc/ejabberd/ejabberdctl.cfg + + # Remove unused upstream directories: + rm -rf $(DESTDIR)/var/lock + + # Remove upstream license file: + rm $(DESTDIR)/usr/share/doc/ejabberd/COPYING + + # Remove autogenerated init-script: + rm $(CURDIR)/src/ejabberd.init + + +# Build architecture-independent files here. +binary-indep: install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install +# dh_installmenu + dh_installdebconf + dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python + dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + erlang-depends + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +get-orig-source: + dh_testdir + wget -O ../ejabberd_$(DEB_UPSTREAM_VERSION).orig.tar.gz \ + http://www.process-one.net/en/projects/ejabberd/download/$(DEB_UPSTREAM_VERSION)/ejabberd-$(DEB_UPSTREAM_VERSION).tar.gz + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source + --- ejabberd-2.1.10.orig/debian/README.Debian +++ ejabberd-2.1.10/debian/README.Debian @@ -0,0 +1,371 @@ +Table of contents +================= + +1. Running. +1.1. Using privileged TCP ports +1.2. Custom options for Erlang emulator +1.3. Backups +1.4. Using IPv6 +1.5. Using captcha +2. Hostname issues +3. PAM authentication +4. Using DBMS for data storage +5. External modules +6. Upgrading from 2.0.x series +6.1 Changes in ejabberdctl program +6.2 Changes in logging + + +1. Running +========== + +1.1. Using privileged TCP ports +------------------------------- + +The ejabberd daemon which is run in init.d script is owned by user ejabberd, +so it cannot bind to privileged ports (below 1024). The error message in +/var/log/ejabberd/ejabberd.log looks similar to the following: + +E(<0.242.0>:ejabberd_listener:80): + Failed to open socket for {443, + ejabberd_c2s, + [{access,c2s}, + {max_stanza_size, + 65536}, + starttls, + {certfile, + "/etc/ejabberd/ejabberd.pem"}, + {shaper, + c2s_shaper}]}: eacces + +If you want ejabberd to listen for example port 443 you could redirect it to +port 5222 (the default XMPP port) by a firewall rule. For example: + +iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5222 + + +1.2. Custom options for Erlang emulator +--------------------------------------- + +You can add extra options to the erl command line like + + -pa /usr/local/lib/ejabberd/ebin + +by adding them to ERL_OPTIONS in /etc/default/ejabberd. + + +1.3. Backups +------------ + +The package always makes a backup of the ejabberd database if it's running +when it is upgraded or removed. The backup files are stored in +/var/backups/ejabberd-.* directory. + + +1.4. Using IPv6 +--------------- + +IPv6 is not enabled by default for any network activity in ejabberd. +This is because with the current state of ejabberd code it's impossible +to fall back to IPv4 if IPv6 is unavailable, and hence enabling IPv6 +by default would immediately break things for users with IPv6 disabled +(see http://bugs.debian.org/503313 for more details). + +The actions to be carried out to enable IPv6 depend on whether +IPv6-only or mixed setup is needed. + +To make ejabberd use IPv6 only, proceed with one of these methods: +* Add the "inet6" atom to the configuration clauses describing + c2s and s2s listeners. +* Specify and IPv6 address for the "ip" option in the configuration + of a listener, like {ip, "::"} -- ejabberd is able to deduce the + protocol family from an IP address it parses and enable the appropriate + mode on the socket such an IP address is configured for. +* Specify the address to bind to along with the listener port; + the notes above about the IP address formatting also apply here. + +To support both IPv6 and IPv4, you have to duplicate the sections for +appropriate listeners hinting ejabberd about the protocol to use +for each one. One way to do this looks like this (for the c2s listener): + +{listen, + {{5222, "0.0.0.0"}, ejabberd_c2s, [...]}, + {{5222, "::"}, ejabberd_c2s, [...]}, + ... +} + +This way, two (supposedly identical, though not required) c2s listeners +are configured: the first one for IPv4 and the second one for IPv6; +ejabberd figures the necessary protocol family out by looking at how +the IP address to bind to is specified. + +Refer to the "Listening Ports" section of the Installation and +Operation Guide for more info, specifically, to its "Port Number, +IP Address and Transport Protocol" and "Examples" parts. + + +1.5. Using captcha +------------------ + +Captcha generation script uses the "convert" program from the "imagemagick" +package. As it depends on a lot of packages related to graphics and +X Window System, it is listed as suggested. Therefore, if you intend to +enable captcha support for your multi-user conferences be sure to install +imagemagick besides enabling captcha in the ejabberd configuration file. +Also the "graphicsmagick-imagemagick-compat" package can be installed +instead of "imagemagick" -- it provides the "convert" program compatible +with that of imagemagick. + + +2. Hostname issues +=================== + +The ejabberd daemon uses Erlang database Mnesia. Even if it's configured for +using ODBC it uses Mnesia for some data (privacy lists et.) and runtime tasks +(keeping routing table etc.). Mnesia is a multi-master database, and it tightly +bounds to a hostname where it's working. Therefore, if you change computer +hostname then ejabberd will stop working. + +If you don't have a current database backup then run ejabberd (attached to the +terminal, otherwise you'll not be able to backup database and quit) by + +/usr/sbin/ejabberd --node ejabberd@oldhostname + +and in the Erlang shell prompt call + +(ejabberd@oldhostname)1> mnesia:backup("/tmp/ejabberd_at_oldhostname.backup"). + +(note the trailing fullstop). Then stop ejabberd by typing + +(ejabberd@oldhostname)1> q(). + +Now you have the latest Mnesia database backup. + +After that run a new Erlang shell by + +erl -pa /usr/lib/ejabberd/ebin + +and convert the backup file to a new hostname: + +1> mnesia_convert:change_node_name('ejabberd@oldhostname', + 'ejabberd@newhostname', + "/tmp/ejabberd_at_oldhostname.backup", + "/tmp/ejabberd_at_newhostname.backup"). + +2> q(). + +Then use file /tmp/ejabberd_at_newhostname.backup to restore ejabberd database +as it is described in ejabberdctl manual page. + + +3. PAM authentication +======================= + +Ejabberd uses "/usr/lib/ejabberd/priv/bin/epam" binary as a helper +program to perform PAM authentication. +Depending on the PAM plugins used, the process accessing these plugins +might have to be run with elevated privileges. The official ejabberd +Installation and Operation Guide simplemindedly suggests to make epam +setuid root which would make it work for any possible case. +Debian's ejabberd package, on the other hand, ships the epam program +with the setuid and setgid bits cleared, and here is why: +* Setuid and setgid programs present a serious potential security + risk and are a target for exploitation attempts (especially + programs which are made setuid root). +* Different PAM plugins have different requirements for the privileges + of the user working with them, for instance, to use the shadow passwords + database for authentication, it is sufficient for the accessing process + to be in the group "shadow"; to use LDAP backend, no elevation of + privileges is needed at all. +Taking into account the fact that ejabberd uses internal authentication +by default (using its own private database), the decision of what +special access rights to set for the epam program is left to the +system administrator. + +To maintain non-standard access rights for the epam binary, it is +advised to use dpkg-statoverride, as suggested by the Debian policy +(section 10.9 "Permissions and owners") -- ejabberd package configuration +scripts honor this setting so it survives upgrades. + +As an example, to make epam setgid shadow, you can use: + +dpkg-statoverride --add root shadow 02755 /usr/lib/ejabberd/priv/bin/epam + +and to make epam setuid root you can do: + +dpkg-statoverride --add root ejabberd 04754 /usr/lib/ejabberd/priv/bin/epam + +(Note that we set o-x there so that only users in the ejabberd group +are able to elevate their privileges by executing this program.) + + +4. Using DBMS for data storage +=============================== + +The ejabberd Installation and Operation Guide mentions that ejabberd +is able to use various DBMS engines to manage most of ejabberd's data, +such as user accounts, rosters, offline messages, pubsub storage etc. +This is confusing, as the only database driver ejabberd supports +"out of the box" is ODBC; working with any listed DBMS directly +requires installation of a special database driver for Erlang, which are +third-party code and are not distributed along with ejabberd. + +Debian's ejabberd package does not ship these database drivers, +and hence it is not possible to work natively with MySQL, PostgreSQL +and other DBMSes listed as supported by the Guide. +This issue is discussed in the Debian BTS (see bugs #507144 and #540915). + +Therefore, as no one yet stepped forward to create and maintain +packages which would enable native access to the supported DBMSes, +you have two options to use them: + +* Get, build and install the required Erlang database driver + then configure ejabberd to locate the compiled code and use it. + Drivers for MySQL and PostgreSQL can be obtained from + https://forge.process-one.net/browse/ejabberd-modules + Refer to the section "External modules" of this file for details + on managing external ejabberd modules. + +* Use ODBC backend with a proper ODBC driver. On the ejabberd side, + this only requires making corresponding changes in the configuration + file. Gerfried Fuchs presented a sample configuration for using + PostgreSQL via ODBC in + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540915#10 + +Note that it appears that currently the only way to use Microsoft SQL +Server as a database backend is via ODBC (and the FreeTDS ODBC driver). + + +5. External modules +=================== + +The package installs ejabberd Erlang headers into /usr/lib/ejabberd/include +directory. To build a module using these headers, as usual include them using + -include_lib("ejabberd/include/headername.hrl"). +and compile the module using -pa option to add ejabberd path to a search list + erlc -pa /usr/lib/ejabberd/ebin module.erl + +Alternatively, include headers as + -include("headername.hrl"). +and add option -I /usr/lib/ejabberd/include to erlc command line. +This is possibly the preferred way to build third-party ejabberd modules. + + +To install a module, copy the resulting beam file(s) to a directory +in which the Erlang emulator running ejabberd looks for compiled +files. One of such directories is "/usr/lib/ejabberd/ebin", but you are +strongly advised not to place any files there unless they come from +a Debian package. Hence, the best way to handle external modules is +to maintain a special directory for them under "/usr/local" -- for instance, +the "/usr/local/lib/ejabberd/ebin". +To make Erlang emulator know about this directory, add an appropriate +option to the ERL_OPTIONS variable in the "/etc/default/ejabberd" file. +For the location proposed, you will probably want to add + + -pa /usr/local/lib/ejabberd/ebin + +to that variable. See the erl(1) manual page for more info on the "-pa" +Erlang emnulator command line option. + + +6. Upgrading from 2.0.x series +============================== + +Certain changes were made in version 2.1.0 which are incompatible with +2.0.x series packaged in Debian. + +While upgrading of the database should occur fully automatically, +there are changes in the infrastructure, which you might need to +take into account, + +6.1 Changes in ejabberdctl program +---------------------------------- + +1) The calling format of the ejabberdctl program was changed: + a special prefix "vhost HOSTNAME" which selected operation on the + specified virtual host was dropped; now previously vhost-specific + commands gained one extra argument specifying a virtual host + (such as "ban-users") or come in pairs, such as "delete-old-users" + with "delete-old-users-vhost". + +2) Some ejabberdctl commands were renamed (see below). + +3) ejabberd in Debian was shipped with the mod_ctlextra module which + provided several advanced commands for the ejabberdctl program. + mod_ctlextra is not supported since 2.1.0 anymore and so it was replaced + my its successor, mod_admin_extra. This resulted in renaming of several + commands previously provided by mod_ctlextra. + + Note that for mod_admin_extra module to be loaded, it must be mentioned + in the appropriate section of the ejabberd configuration file. + As this file is not upgraded automatically, make sure you have replaced + the request to load mod_ctlextra with the request to load mod_admin_extra. + Refer to the ejabberdctl(8) manual page for more details. + +The summary of changes in ejabberdctl commands is given below. + +Renamed: + "set-password" to "change-password"; + "delete-older-messages" to "delete-old-messages"; + "delete-older-users" to "delete-old-users"; + "rem-rosteritem" to "delete-rosteritem"; + "killsession" to "kick-session"; + +Renamed and calling convention changed: + "vcard-get" to "get-vcard" and "get-vcard2"; + "vcard-set" to "set-vcard" and "set-vcard2"; + +Deleted: + "rosteritem-purge" + +Virtual-host specific commands which now accept a virtual host +to operate on as their extra argument: + "ban-account" + "num-active-users" + "registered-users" + +4) The ejabberdctl program was changed not to generate unique node names + by default for the Erlang process it starts; to enable generation + of unique node names you now has to pass the "--concurrent" command-line + option to the ejabberdctl program. + + This was made to prevent overflows of atom table in the ejabberd process + which may occur if ejabberdctl is started many times during the ejabberd + process lifetime, which is not uncommon on some high-profile sites. + Now, ejabberdctl assumes you take care of ensuring all invocations of + ejabberdctl are done in a sequence and uses constant names for the nodes + of the Erlang processes it starts. + + If you can not (or don't want to) guarantee sequential invocations, + pass the "--concurrent" command-line option to the ejabberdctl program. + In this case, it will append the PID of the shell process executing the + ejabberdctl code to the node name of the Erlang process ejabberdctl starts. + This will inevitably grow the ejabberd process's atom table but the maximum + theoretical number of the entries added will be no more than twice the + maximum number of unique PIDs configured for the system (kernel.pid_max + sysctl variable). + + See http://lists.jabber.ru/pipermail/ejabberd/2009-September/005337.html + and http://lists.jabber.ru/pipermail/ejabberd/2009-November/005456.html + threads for more info on this issue. + +6.2 Changes in logging +---------------------- + +Erlang emulator log was renamed from "sasl.log" to "erlang.log" +to remove confusion (some people interpreted "sasl" as standing for +"Simple Authentication and Security Layer" instead of Erlang runtime's +logging mechanism). + +The "--sasl-log" command-line option of the ejabberd program was renamed +to "--erlang-log" to match the change above. + + +Authors +======= + +Torsten Werner +Sergei Golovan +Konstantin Khomoutov + +Sun, 15 Nov 2009 03:52:33 +0300 --- ejabberd-2.1.10.orig/debian/README.source +++ ejabberd-2.1.10/debian/README.source @@ -0,0 +1,2 @@ +This package uses quilt for its patch management, see +/usr/share/doc/quilt/README.source if you are unfamiliar with it. --- ejabberd-2.1.10.orig/debian/ejabberd.8 +++ ejabberd-2.1.10/debian/ejabberd.8 @@ -0,0 +1,243 @@ +.TH ejabberd 8 "08 June 2008" "Version 2.0.1" "ejabberd manual page" + +.SH NAME +ejabberd \(em a distributed fault-tolerant Jabber/XMPP server + +.SH SYNOPSIS +.PP +\fBejabberd\fR \fI[options] [\-\-] [erlang_options]\fP + +.SH DESCRIPTION +.PP +\fBejabberd\fR is a distributed fault-tolerant Jabber/XMPP server written in +Erlang. + +Its main features are: +.PD 0 +.TP +\(em XMPP-compliant +.TP +\(em Distributed: \fBejabberd\fR can run on a cluster of machines +.TP +\(em Fault-tolerant: All the information can be stored on more than one node, nodes can be added or replaced `on the fly' +.TP +\(em Built-in Multi-User Chat service +.TP +\(em Built-in IRC transport +.TP +\(em Built-in Publish-Subscribe service +.TP +\(em Built-in Jabber User Directory service based on users vCards +.TP +\(em SSL support +.TP +\(em Support for internationalized user messages + +.SH OPTIONS +.TP +.BI \-\-node " node" +Specifies Erlang \fInode\fP at which ejabberd server will be run. Default +node is \fBejabberd\fP. +If the node name does not contain symbol \fI@\fR then actual node name +becomes \fBnode@hostname\fP where hostname is short host name (usually it +coincides with \fI\(gahostname \-s\(ga\fP). If the node name contain symbol \fI@\fR +and its hostname part is a FQDN then \fBejabberd\fR will use so-called +long names (see \fBerl\fR(1) manual page and look for options \fI\-name\fP +and \fI\-sname\fP for details). + +Examples of \fI\-\-node\fP option: + +.BI ejabberd +Locally run ejabberd server at node \fIejabberd@\(gahostname \-s\(ga\fP. + +.BI ejabberd@otherhost +Pretend that ejabberd server runs at otherhost at node \fIejabberd@otherhost\fP. +(Note that noone can remotely connect to this node if otherhost is resoved +to other computer IP.) + +.BI ejabberd@localhost +Locally run ejabberd server at node \fIejabberd@localhost\fP. Only nodes +running at the same host can connect to this node. + +.BI ejabberd@hostname.domainname +Using \fI\-name\fP Erlang option, run ejabberd server at long-name node +\fIejabberd@hostname.domainname\fP. To be able to control this server instance +\fIhostname.domainname\fP must resolve (either by DNS or via /etc/hosts) to +the server's IP. + +.PP +The default node can be overridden by defining ERLANG_NODE environment variable +in /etc/default/ejabberd, see below. + +.TP +.BI \-\-config " config\-file" +Specifies an alternate \fIconfig\-file\fP to be parsed at startup, rather +than the default (\fB/etc/ejabberd/ejabberd.cfg\fP). + +.TP +.BI \-\-spool " spool\-dir" +Specifies an alternate \fIspool\-dir\fP to store user database instead of +the default (\fB/var/lib/ejabberd\fP). + +.TP +.BI \-\-log " log\-file" +Log Jabber events to specified \fIlog\-file\fP rather than to the default +(\fB/var/log/ejabberd/ejabberd.log\fP). + +.TP +.BI \-\-erlang\-log " sasl\-log\-file" +Log SASL (System Application Support Libraries) events to specified +\fIsasl\-log\-file\fP rather than to the default (\fB/var/log/ejabberd/erlang.log\fP). + +.TP +.I erlang_options +Other options (and all options following \fB\-\-\fR) are passed directly to +\fBErlang\fR interpreter. See \fBErlang\fR documentation for more details on +interpreter options. +Some useful options are: +.br +.sp +.BI \-detached + Starts the Erlang system detached from the system console. +.br +.BI \-heart + Starts heart beat monitoring of the Erlang system. +.br +.BI \-noinput + Ensures that the Erlang system never tries to read any input. + +.SH CONFIGURATION FILE +.PP +The file \fB/etc/ejabberd/ejabberd.cfg\fR contains the main configuration. +It is initially loaded the first time \fBejabberd\fR is +executed, then it is parsed and stored in a database. Subsiquently the +configuration is loaded from the database and any commands in the configuration +file are appended to the entries in the database. The configuration file +consists of a sequence of Erlang terms. Parts of lines after `%' sign +are ignored. Each term is a tuple, where the first element is the name of an +option, and the others are option values. E. g. if this file does not contain a +"host" definition, then the value stored in the database will be used. + +To override old values stored in the database the following lines can be added +in config: +.br + override_global. +.br + override_local. +.br + override_acls. + +A complete explanation of each configuration value can be found in the +official \fBejabberd\fR documentation. See "\fBSEE ALSO\fR" part of this +manual page for more information about the documentation. + +.SH OPTIONS FILE +.PP +The file \fB/etc/default/ejabberd\fR contains specific options. + +.PD 0 +.TP +.I POLL +If set to true this variable enables kernel polling which can reduce CPU +load on a system with a high number of users. +This option requires support in the kernel and in Erlang emulator. + +.TP +.I SMP +Enables or disables SMP support in Erlang emulator. Valid values are disable +(default), auto, and enable. +.br +.sp +Explanation in Erlang/OTP documentation: + +.BI enable: +Starts the Erlang runtime system with SMP support enabled. This +may fail if no runtime system with SMP support is available. +.br +.BI auto: +Starts the Erlang runtime system with SMP support enabled if it +is available and more than one logical processor are detected. +.br +.BI disable: +Starts a runtime system without SMP support. + +.TP +.I ERL_MAX_PORTS +To use more than 1024 connections (default value), \fIERL_MAX_PORTS\fP should be set +to the number of connections needed. + +.TP +.I PROCESSES +Specifies the maximum number of Erlang processes to use. Default value is 250000. +Maximum value is 268435456. Ejabberd uses up to three processes per user or +server connection. + +.TP +.I ERL_MAX_ETS_TABLES +Sets the maximum number of ETS and Mnesia tables. Default value is 1400 which +should be sufficient for a sever without many custom modules. If a message +** Too many db tables ** appears in ejabberd log files then increase this number. + +.TP +.I ERL_OPTIONS +With this option, parameters can be passed to \fBErlang\fR interpretor. See +\fBErlang\fR documentation for more details on interpreter options. + +.TP +.I ERL_FULLSWEEP_AFTER +To reduce memory usage when allowing a large number of connections, \fIERL_FULLSWEEP_AFTER\fP +may be set to 0 in the options file, +but in this case \fBejabberd\fR may start to work slower. + +.TP +.I ERLANG_NODE +Use specified string as erlang node. It overrides default \fBejabberd\fP +node name. The string may take one of the following forms: +\fBnodename\fP, \fBnodename@hostname\fP or \fBnodename@hostname.domainname\fP + +.SH FILES +.PD 0 +.TP +.I /etc/ejabberd/ejabberd.cfg +default configuration file + +.TP +.I /etc/default/ejabberd +default variables + +.SH BUGS +.PP +Ejabberd uses distributed Erlang mode to work properly. This means that on start it +connects to \fBepmd\fP (Erlang port mapping daemon) which is listening at port 4369 +and tries to register ejabberd node name. If the connection fails (known failure +reasons are unavailability of a loopback interface or firewall issues) Erlang emulator +fails to start with not very clear error message. If there's already started Erlang +node with the same name (\fIejabberd\fP by default) then ejabberd will also fail with +a cryptic error message (in which one can find words \fI{error,duplicate_name}\fP). +Another possible case when ejabberd cannot start is incorrect permissions of +\fI/var/lib/ejabberd\fP directory (it must be writable by user ejabberd). + +.SH SEE ALSO +.PP +\fBerl\fR(1), \fBsasl\fR(6), \fBejabberdctl\fR(8), \fBepmd\fR. + +.PP +The program documentation is available at +\fIhttp://www.process\-one.net/en/projects/ejabberd/\fP. +A copy of the documentation can be found at +/usr/share/doc/ejabberd/guide.html. + +.SH AUTHORS +.PP +This manual page was adapted by Christophe Romain + and Sergei Golovan for +the \fBDebian\fP system (but may be used by others) from the \fBejabberd\fP +documentation written by Alexey Shchepin . + +Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU General Public License, Version 2 any +later version published by the Free Software Foundation. +.PP +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common\-licenses/GPL. + --- ejabberd-2.1.10.orig/debian/watch +++ ejabberd-2.1.10/debian/watch @@ -0,0 +1,5 @@ +version=3 + +http://www.process-one.net/en/ejabberd/archive/ \ + /downloads/ejabberd/[\d.]+/ejabberd-([\d.]+)[_\d]*.tar.gz + --- ejabberd-2.1.10.orig/debian/logrotate +++ ejabberd-2.1.10/debian/logrotate @@ -0,0 +1,14 @@ +/var/log/ejabberd/*.log { + weekly + missingok + rotate 12 + size 1M + compress + delaycompress + ifempty + create 640 ejabberd adm + sharedscripts + postrotate + su ejabberd -c '/usr/sbin/ejabberdctl reopen-log' > /dev/null + endscript +} --- ejabberd-2.1.10.orig/debian/compat +++ ejabberd-2.1.10/debian/compat @@ -0,0 +1 @@ +7 --- ejabberd-2.1.10.orig/debian/dirs +++ ejabberd-2.1.10/debian/dirs @@ -0,0 +1,2 @@ +var/lib/ejabberd +var/log/ejabberd --- ejabberd-2.1.10.orig/debian/docs +++ ejabberd-2.1.10/debian/docs @@ -0,0 +1,4 @@ +doc/*.html +doc/*.png +doc/*.txt + --- ejabberd-2.1.10.orig/debian/postinst +++ ejabberd-2.1.10/debian/postinst @@ -0,0 +1,153 @@ +#! /bin/sh +# postinst script for ejabberd +# +# see: dh_installdeb(1) + +set -e + +CONFIG_SOURCE=/usr/share/ejabberd/ejabberd.cfg +CONFIG_TARGET=/etc/ejabberd/ejabberd.cfg +TEMPFILE=$(mktemp) + +. /usr/share/debconf/confmodule + +setup_ejabberd() +{ + # Ejabberd config dir may contain sensitive data, so making it unreadable by + # the world. + if ! dpkg-statoverride --list /etc/ejabberd >/dev/null; then + chown root:ejabberd /etc/ejabberd + chmod 750 /etc/ejabberd + fi + + # The users database dir /var/lib/ejabberd must be writable by user ejabberd. + install -d /var/lib/ejabberd + if ! dpkg-statoverride --list /var/lib/ejabberd >/dev/null; then + chown -R ejabberd:ejabberd /var/lib/ejabberd + chmod 700 /var/lib/ejabberd + fi + + # Ejabberd logs should be readable by users in adm group (see also logrotate script). + install -d /var/log/ejabberd + if ! dpkg-statoverride --list /var/log/ejabberd >/dev/null; then + chown ejabberd:adm /var/log/ejabberd + chmod 2750 /var/log/ejabberd + if dpkg --compare-versions "$2" lt '2.1.4'; then + find /var/log/ejabberd -type f -name '*.log*' \ + | while read f; do + chown ejabberd:adm "$f" + chmod 0640 "$f" + done + fi + fi + + # Making /etc/ejabberd/ejabberd.pem if it does not exist. + ( cd /etc/ejabberd + if [ ! -f ejabberd.pem ] + then + echo "Generating SSL certificate /etc/ejabberd/ejabberd.pem..." + EHOSTNAME=$(hostname -s 2>/dev/null || echo localhost) + EDOMAINNAME=$(hostname -d 2>/dev/null || echo localdomain) + openssl req -new -x509 -days 365 -nodes -out ejabberd.pem \ + -keyout ejabberd.pem > /dev/null 2>&1 <<+++ +. +. +. +$EDOMAINNAME +$EHOSTNAME +ejabberd +root@$EHOSTNAME.$EDOMAINNAME ++++ + fi + if ! dpkg-statoverride --list /etc/ejabberd/ejabberd.pem >/dev/null; then + chown root:ejabberd /etc/ejabberd/ejabberd.pem + chmod 640 /etc/ejabberd/ejabberd.pem + fi + ) + + db_get ejabberd/hostname + HOST="$RET" + db_get ejabberd/user + USER="$RET" + db_get ejabberd/password + PASSWD="$RET" + sed -e "s/__USER__/$USER/g ; s/__HOSTNAME__/$HOST/g" $CONFIG_SOURCE >$TEMPFILE + ucf --three-way --debconf-ok $TEMPFILE $CONFIG_TARGET + db_stop + + # Making ejabberd config readable only by ejabberd user. + chown ejabberd:ejabberd $CONFIG_TARGET + chmod 600 $CONFIG_TARGET +} + +register_admin() +{ + if [ -n "$USER" -a -n "$PASSWD" ]; then + echo -n "Waiting for ejabberd to register admin user" + + if ejabberdctl status >/dev/null || test $? = 1 ; then + # Ejabberd is starting ($? = 1) or running ($? = 0) already. + cnt=0 + flag=1 + while ! ejabberdctl status >/dev/null ; do + echo -n "." + cnt=`expr $cnt + 1` + if [ $cnt -ge 60 ] ; then + echo + echo "Can't register admin user \"$USER@$HOST\"." + echo -n "Ejabberd is starting too long." + flag=0 + break + fi + sleep 1 + done + + echo + if [ $flag -eq 1 ] ; then + if ! status=$(ejabberdctl register "$USER" "$HOST" "$PASSWD") ; then + if echo $status | grep -q "already registered" ; then + echo "Admin user \"$USER@$HOST\" is already registered. Password IS NOT changed." + else + echo "Can't register admin user \"$USER@$HOST\"." + fi + else + echo "Admin user \"$USER@$HOST\" is registered successfully." + fi + fi + else + echo + echo "Can't register admin user \"$USER@$HOST\"." + echo "Ejabberd server is not started." + fi + fi +} + +case "$1" in + configure|reconfigure) + adduser --quiet --system --shell /bin/sh --group --home /var/lib/ejabberd ejabberd + setup_ejabberd "$@" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +case "$1" in + configure|reconfigure) + register_admin + ;; +esac + +exit 0 + --- ejabberd-2.1.10.orig/debian/control +++ ejabberd-2.1.10/debian/control @@ -0,0 +1,33 @@ +Source: ejabberd +Section: net +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Konstantin Khomoutov +Uploaders: Gerfried Fuchs +Build-Depends: debhelper (>= 7.3~), quilt, erlang-base, erlang-asn1, erlang-parsetools, erlang-dev (>= 1:15.b), libexpat1-dev, libssl-dev, zlib1g-dev, libpam0g-dev, po-debconf +Standards-Version: 3.9.2 +Homepage: http://www.process-one.net/en/projects/ejabberd/ +Vcs-Git: git://git.deb.at/pkg/ejabberd.git +Vcs-Browser: http://git.deb.at/w/pkg/ejabberd.git + +Package: ejabberd +Architecture: any +Depends: adduser, ${erlang:Depends}, ${erlang-abi:Depends}, openssl, ucf, ${misc:Depends}, ${shlibs:Depends} +Suggests: libunix-syslog-perl, imagemagick | graphicsmagick-imagemagick-compat +Conflicts: ejabberd-mod-shared-roster-ldap +Description: distributed, fault-tolerant Jabber/XMPP server written in Erlang + ejabberd is a distributed, fault-tolerant Jabber/XMPP server written in Erlang. + Its features contain: + - XMPP-compliant + - Web based administration + - Load balancing: can run in a cluster of machines + - Fault-tolerance: database can be replicated and stored on multiple + nodes (nodes can be added or replaced 'on the fly') + - Virtual hosting: several virtual domains can be served using single ejabberd + instance + - SSL/TLS support + - Multi-User Chat (MUC/conference) + - IRC transport + - Jabber Users Directory, based on users vCards + - Service Discovery + - Shared roster --- ejabberd-2.1.10.orig/debian/ejabberdctl.8 +++ ejabberd-2.1.10/debian/ejabberdctl.8 @@ -0,0 +1,833 @@ +.TH ejabberdctl 8 "04 October 2009" "Version 2.1.0 RC1" "ejabberdctl manual page" + +.SH NAME +ejabberdctl \(em a control interface of ejabberd Jabber/XMPP server + +.SH SYNOPSIS +.PP +\fBejabberdctl\fR \fI[\-\-node nodename] [\-\-auth user host password] [command [options]]\fP + +.SH DESCRIPTION +.PP +\fBejabberdctl\fR is a front end to the ejabberd Jabber/XMPP server. +It is designed to help the administrator control the functioning of the +running \fBejabberd\fR daemon. +.PP +This command must be run either by a superuser or by the user \fBejabberd\fP, +otherwise it will fail to start or to connect to the ejabberd instance. + +.SH OPTIONS +.TP +.BI \-\-node " nodename" +Specifies remote Erlang node to connect to. Default value is +\fIejabberd\fP. +If the node name does not contain a symbol \fI@\fP +then the actual node name becomes \fInode@host\fP where \fIhost\fP is short +hostname (usually it coincides with \fI\(gahostname \-s\(ga\fP). +If the node name contains a symbol \fI@\fR and its hostname part +is a FQDN then \fBejabberd\fR will use so-called long names +(see \fBerl\fR(1) manual page and look for options \fI\-name\fP +and \fI\-sname\fP for details). + +Examples of \fI\-\-node\fP option: + +.BI ejabberd +Connect to locally run ejabberd server at node \fIejabberd@\(gahostname \-s\(ga\fP. + +.BI ejabberd@otherhost +Connect to remotely run ejabberd server at node \fIejabberd@otherhost\fP. + +.BI ejabberd@localhost +Connect to locally run ejabberd server at node \fIejabberd@localhost\fP. + +ejabberdctl honors \fBERLANG_NODE\fR environment variable from +/etc/default/ejabberd, see below. + +.TP +.BI \-\-auth " user host password" +If restriction of access to \fBejabberdctl\fR commands is configured +(see the "Restrict Execution with AccessCommands" section in the +Installation and Operation Guide), this option must be used to +authenticate the entity requesting execution of the command. +\fIuser\fP and \fIhost\fP are the respective parts of the entity JID +and \fIpassword\fP is either a plain text password to authenticate +that JID or the MD5 hash of that password. + +.TP +.BI \-\-concurrent +Due to the way \fBejabberdctl\fR is implemented, it is normally not +possible to run two instances of it in parallel\(enthe second one +will fail. +This is OK in a common case when \fBejabberdctl\fR is only +run manually from time to time by a server administrator; if, conversely, +there is a chance for several instances of \fBejabberdctl\fR to be active +at the same time (say, automated registration of new users on an actively +used site), you can pass the \fI\-\-concurrent\fP option to +\fBejabberdctl\fR which will ensure no clash will ever occur. +.IP +Usage of the \fI\-\-concurrent\fP option creates additional pressure on +the server resources, and that is why the behaviour it implements +is not the default. +This issue is described in more detail in +/usr/share/doc/ejabberd/README.Debian +.IP +Note that the semantics of this option can be changed in a future release. + +.SH COMMANDS + +.PP +Some commands to \fBejabberdctl\fR are single words, like \fBstatus\fR, +and some are multi-word, like \fBreopen-log\fR; to join the adjacent +words of the multi-word commands you can use either the underline ("_") +symbol or the minus sign ("-") or a mixture of them, so all the following +forms are valid: \fBstatus_list_host\fR, \fBstatus-list-host\fR, +\fBstatus_list-host\fR. + +.PP +When run without any \fIcommand\fP specified, \fBejabberdctl\fR +prints the list of available commands and their short descriptions. + +.PP +The following commands can be used: +.TP +.BI help " [\-\-tags [tag] | PATTERN]" +The \fBhelp\fR command without any options does the same thing +as running \fBejabberdctl\fR without any command specified \(em it +prints the list of available commands along with their short descriptions. +.IP +The \fI\-\-tags\fP option specified alone makes the \fBhelp\fR command +print the list of supported "help tags" which group \fBejabberdctl\fR +commands on the basis of their purpose (such as debugging commands, +backup commands etc). +.IP +The \fI\-\-tags\fP option specified with a tag \fItag\fP makes the +\fBhelp\fR command print the list of commands associated wih +the help tag \fItag\fP along with their short descriptions. +.IP +If the \fBhelp\fR command is followed by a word other than "\-\-tags", +this word is interpreted as a pattern specifying a set of commands +to print the help on. +In this pattern, a "*" character matches any number of characters, +including zero, and a "?" character matches any single character. +Note that when running \fBejabberdctl\fR with this form of the +\fBhelp\fR command from the shell, you have to protect the characters +in the pattern from being interpreted by the shell. +.TP +.BI debug +Attache an interactive Erlang shell to a running ejabberd server. To detach it +press Ctrl+G, then input a character "q" and hit . +.TP +.BI status +Request status of the Erlang virtual machine where ejabberd server is running. +.TP +.BI stop +Stop the ejabberd server and its Erlang virtual machine. +.TP +.BI stop-kindly " delay announcement" +Broadcast an announcement \fIannouncement\fP to all connected +users, wait \fIdelay\fP seconds and then stop the ejabberd server and +its Erlang virtual machine. +.IP +This command is interactive: it dumps the progress of the shutdown +sequence to stdout (including waiting for the grace period to pass). +.IP +The \fIannouncement\fP string is unconditionally interpreted as +a sequence of UTF-8 characters no matter what locale settings +the server and ejabberdctl processes see. +.TP +.BI restart +Restarts the ejabberd server inside Erlang virtual machine. Note that if you want +to change VM options (enable/disable kernel poll or SMP, increase number of ports +or database tables) you have to stop ejabberd completely and then start it again. +.TP +.BI reopen\-log +Force the ejabberd server to reopen its log +files (\fI/var/log/ejabberd/ejabberd.log\fP and +\fI/var/log/erlang.log\fP by default). +If module mod_http_fileserver is loaded then force the ejabberd server to reopen +its weblog file. +.TP +.BI register " user server password" +Register user \fIuser\fP with password \fIpassword\fP at ejabberd virtual +host \fIserver\fP. +.TP +.BI unregister " user server" +Unregister user \fIuser\fP at ejabberd virtual host \fIserver\fP. +.TP +.BI backup " filepath" +Backup user database of the ejabberd server to file \fIfilepath\fP. +.IP +The directory in which \fIfilepath\fP is located must be writable +by the user "ejabberd". +.TP +.BI restore " filepath" +Restore user database of the ejabberd server from backup file \fIfilepath\fP. +.IP +The file \fIfilepath\fP must be readable by the user "ejabberd". +.TP +.BI install\-fallback " filepath" +Install a backup to \fIfilepath\fP as fallback. The fallback will be +used to restore the database at the next start-up. +.IP +The directory in which \fIfilepath\fP is located must be writable +by the user "ejabberd". +.TP +.BI dump " filepath" +Dump user database of the ejabberd server to text file \fIfilepath\fP. +.IP +The directory in which \fIfilepath\fP is located must be writable +by the user "ejabberd". +.TP +.BI load " filepath" +Restore user database of the ejabberd server from text file \fIfilepath\fP. +.IP +The file \fIfilepath\fP must be readable by the user "ejabberd". +.TP +.BI dump\-table " file table" +Dump the specified database \fItable\fR to the specified text \fIfile\fR. +.IP +The directory in which \fIfile\fP is located must be writable +by the user "ejabberd". +.TP +.BI import\-file " filepath" +Import user data from jabberd 1.4 spool file \fIfilepath\fP. For example, if +\fIfilepath\fP is \fI.../example.org/user.xml\fP then imported username will be +\fIuser\fP and it will be imported to virtual server \fIexample.org\fP. +.IP +The file \fIfilepath\fP must be readable by the user "ejabberd". +.TP +.BI import\-dir " directorypath" +Import user data from jabberd 1.4 spool directory \fIdirectorypath\fP. Directory +name should be the name of virtual server to import users. +.IP +The directory \fIdirectorypath\fP and the files in it must be readable +by the user "ejabberd". +.TP +.BI mnesia\-change\-nodename " oldnodename newnodename oldbackup newbackup" +Reads the backup file \fIoldbackup\fR (which should have been created +using the \fBejabberdctl backup\fR command) and writes its contents +to the file \fInewbackup\fR while replacing in it all occurences of the +Erlang node name \fIoldnodename\fR with the \fInewnodename\fR. +.IP +This should be used to "migrate" the ejabberd database to the new +hostname of the machine on which ejabberd runs in case this hostname +is about to change. This is because ejabberd is actually served +by an Erlang node which is bound to the name of the physical host +to provide for clustering. +.TP +.BI rename\-default\-nodeplugin +Since release 2.0.0 and up to release 2.1.0, the implementation +of publish-subscribe (pubsub) in ejabberd used a plugin +named "node_default" as the default node plugin. +Starting from release 2.1.0 this functionality is provided by the +new plugin named "hometree". +In the case of upgrading from an older version of ejabberd, +its pubsub database might retain references to the old name of this +plugin, "node_default", and this command can be used to upgrade +the pubsub database, changing all these references to the +new name \- "hometree". +.IP +Note that ejabberd automatically runs this command if you update from +an ejabberd release 2.0.5 or older. +.IP +Running this command on already updated database does nothing. +.TP +.BI delete\-expired\-messages +Delete expired offline messages from ejabberd database. +.TP +.BI delete\-old\-messages " n" +Delete offline messages older than \fIn\fP days from ejabberd database. +.TP +.BI mnesia " info" +Show some information about the Mnesia system (see \fBmnesia\fP(3), function +\fIinfo\fP). +.TP +.BI mnesia +Show all information about the Mnesia system, such as transaction statistics, +database nodes, and configuration parameters (see \fBmnesia\fP(3), function +system_info). +.TP +.BI mnesia " key" +Show information about the Mnesia system according to \fIkey\fP specified +(see \fBmnesia\fP(3), function system_info for valid \fIkey\fP values). +.TP +.BI incoming\-s2s\-number +Print number of incoming server-to-server connections to the node. +.TP +.BI outgoing\-s2s\-number +Print number of outgoing server-to-server connections from the node. +.TP +.BI user\-resources " user server" +List all connected resources of user \fIuser@server\fP. +.TP +.BI connected\-users\-number +Report number of established users' sessions. +.TP +.BI connected\-users +Print full JIDs of all established sessions, one on a line. +.TP +.BI connected\-users\-info +Print detailed information of all established sessions, one session on a line, +with each session described as a list of whitespace-separated values: full JID, +connection string (such as "c2s", "c2s_tls" etc), client IP address, +client port number, resource priority, name of an Erlang node serving the session, +session duration (in seconds). +.TP +.BI connected\-users\-vhost " server" +Print full JIDs of all users registered at the virtual host \fIserver\fP +which are currently connected to the ejabberd server, one on a line. +.TP +.BI registered\-users " server" +List all the users registered on the ejabberd server +at the virtual host \fIserver\fP. +.TP +.BI get\-loglevel +Print the log level (an integer number) ejabberd is operating on. + +.SS EXPORTING DATA TO PIEFXIS (XEP-0227) FORMAT + +.PP +The commands described in this section require availability of the +\fBexmpp\fR library which is not shipped with ejabberd. +Your can download its source code from \fIhttp://exmpp.org\fP. + +.TP +.BI export\-piefxis " dir" +Export data of all users registered on all virtual hosts of the server +to a set of PIEFXIS files which will be stored +in the directory \fIdir\fR. +.IP +The directory \fIdir\fR must be writable by the user "ejabberd". +.TP +.BI export\-piefxis\-host " dir host" +Export data of all the users registered on the specified +virtual host \fIhost\fR to a set of PIEFXIS files +which will be stored in the directory \fIdir\fR. +.IP +The directory \fIdir\fR and the files in it must be readable +by the user "ejabberd". +.TP +.BI import\-piefxis " file" +Import users' data from a PIEFXIS file \fIfile\fR. +.IP +The file \fIfile\fR must be readable by the user "ejabberd". + +.SH EXTRA OPTIONS +.PP +An optional module \fBmod_admin_extra\fP adds a number of other commands. +.PP +While it is enabled by default, you might want to check it is actually +enabled in the configuration file (especially if you're upgrading +from pre-2.1 series of ejabberd). +.PP +To enable these additional commands add mod_admin_extra to the +\fB{modules}\fP section of ejabberd config file and make it +looking as the following: +.sp +.nf +{modules, + [ + ... + {mod_admin_extra, []}, + ... + ]}. +.fi + +.PP +Most of additional commands possess extended descriptions +which can be printed using +\fBejabberdctl help\fR \fIcommand\fP + +.PP +The new commands are: + +.TP +.BI add\-rosteritem " localuser localserver user server nick group subscription" +Add to the roster of the user \fIlocaluser\fP +registered on the virtual host \fIlocalserver\fP +a new entry for the user \fIuser\fP on the server \fIserver\fP, +assign the nickname \fInick\fP to it, +place this entry to the group \fIgroup\fP +and set its subscription type to \fIsubscription\fP +which is one of "none", "from", "to" or "both". + +.TP +.BI delete\-rosteritem " localuser localserver user server" +Delete from the roster of the user \fIlocaluser\fP on the server +\fIlocalserver\fP an entry for the JID \fIuser\fP@\fIserver\fP. + +.TP +.BI ban\-account " user host reason" +Ban the user \fIuser\fP registered on the virtual host \fIhost\fP. +This is done by kicking their active sessions with the reason +\fIreason\fP and replacing their password with a randomly +generated one. + +.TP +.BI kick\-session " user host resource reason" +Kick the session opened by the user \fIuser\fP registered +on the virtual host \fIhost\fP +and having the resource \fIresource\fP bound to it +providing the reason \fIreason\fP. + +.TP +.BI change\-password " user host newpass" +Change password of the user \fIuser\fP registered on the +virtual host \fIhost\fP to \fInewpass\fP. + +.TP +.BI check\-account " user host" +Exit with code 0 if the user \fIuser\fP is registered +on the virtual host \fIhost\fP, +exit with code 1 otherwise. + +.TP +.BI check\-password " user host password" +Exit with code 0 the user \fIuser\fP registered on the +virtual host \fIhost\fP has password \fIpassword\fP, +exit with code 1 otherwise. + +.TP +.BI check\-password\-hash " user host passwordhash hashmethod" +Exit with code 0 if the user \fIuser\fP registered on the +virtual host \fIhost\fP has a password, the hash of which, +calculated using the \fIhashmethod\fP is equal +to the hash \fIpasswordhash\fP; +exit with code 1 otherwise. +.IP +Allowed hashing methods are "md5" and "sha" (for SHA-1). + +.TP +.BI compile " file" +Compile and reload the Erlang source code file \fIfile\fP. +.IP +The file \fIfile\fR must be readable by the user "ejabberd". + +.TP +.BI load\-config " file" +Load ejabberd configuration from the file \fIfile\fP. +.IP +The file \fIfile\fR must be readable by the user "ejabberd". +.IP +Note that loading config to a database does not mean +reloading the server \(em for example it's impossible +to add/remove virtual hosts without server restart. +In fact, only ACLs, access rules and a few global options +are applied upon reloading. + +.TP +.BI delete\-old\-users " days" +Delete accounts and all related data of users who did not +log on the server for \fIdays\fP days. + +.TP +.BI delete\-old\-users\-vhost " host days" +Delete accounts and all related data of users +registered on the virtual host \fIhost\fP +who did not log on the server for \fIdays\fP days. + +.TP +.BI export2odbc " host path" +Export Mnesia database tables keeping the data for the virtual +host \fIhost\fP to a set of text files created under +the specified directory \fIpath\fP, which must exist and must be +writable by the user "ejabberd". + +.TP +.BI get\-cookie +Print the cookie used by the Erlang node which runs ejabberd +instance \fBejabberdctl\fR controls. + +.TP +.BI get\-roster " user host" +Print the roster of the user \fIuser\fP registered +on the virtual host \fIhost\fP. +.IP +The information printed is a series of lines each representing +one roster entry; each line consist of four fields separated +by tab characters representing, in this order: +the JID of an entry, its nickname, subscription type +and group. + +.TP +.BI push\-roster " file user host" +Push items from the file \fIfile\fP to the roster +of the user \fIuser\fP +registered on the virtual host \fIhost\fP. +.IP +The format of file containing roster items is the same +as used for output by the \fBget\-roster\fR command. + +.TP +.BI push\-roster\-all " file" +.IP +The format of file containing roster items is the same +as used for output by the \fBget\-roster\fR command. + +.TP +.BI push\-alltoall " host group" +All entries for all the users registered on the virtual host \fIhost\fP +to the rosters of all the users registered on this virtual host. +The created entries are assigned to the roster group \fIgroup\fP. + +.TP +.BI process\-rosteritems " action subs asks users contacts" +\fBFIXME\fP no information available. Do not use. + +.TP +.BI get\-vcard " user host name" +Print the contents of the field \fIname\fP +of a vCard belonging to the user \fIuser\fP +registered on the virtual host \fIhost\fP. +If this field is not set of the user did not create +their vCard, and empty string is printed (that is, +containing only the line break). +.IP +For example \fIname\fP can be "FN" or "NICKNAME" +For retrieving email address use "EMAIL USERID". +Names and descriptions of other supported fields +can be obtained from the XEP-0054 document +(http://www.xmpp.org/extensions/xep\-0054.html). + +.TP +.BI get\-vcard2 " user host name subname" +Print the contents of the subfield \fIsubname\fP +of the field \fIname\fP +of a vCard belonging to the user \fIuser\fP +registered on the virtual host \fIhost\fP. +If this field is not set of the user did not create +their vCard, and empty string is printed (that is, +containing only the line break). + +.TP +.BI set\-vcard " user host name content" +Set the field \fIname\fP to the string \fIcontent\fP +in the vCard of the user \fIuser\fP +registered on the virtual host \fIhost\fP. + +.TP +.BI set\-vcard2 " user host name subname content" +Set the subfield \fIsubname\fP +of the field \fIname\fP to the string \fIcontent\fP +in the vCard of the user \fIuser\fP +registered on the virtual host \fIhost\fP. + +.TP +.BI set\-nickname " user host nickname" +Set the "nickname" field in the vCard of the user \fIuser\fP +registered on the virtual host \fIhost\fP to \fInickname\fP. + +.TP +.BI num\-active\-users " host days" +Print number of users registered on the virtual host \fIhost\fP +who logged on the server at least once during the last +\fIdays\fP days. + +.TP +.BI num\-resources " user host" +Print the number of resources (that is, active sessions) +the user \fIuser\fP registered on the virtual host \fIhost\fP +currently has. +If the specified user has no active sessions, +print the string "0". + +.TP +.BI resource\-num " user host num" +Print the resource of a session number \fInum\fP +the user \fIuser\fP registered on the virtual host \fIhost\fP +has currently open. +\fInum\fP must be a positive integer, greater than or equal to 1. +.IP +If the session number specified is less than 1 or greater than +the number of sessions opened by the user, an error message +is printed. + +.TP +.BI remove\-node " node" +Remove the Erlang node \fInode\fP from the Mnesia +database cluster. + +.TP +.BI send\-message\-chat " from to body" +Send a message of type "chat" from the JID \fIfrom\fP +to the (local or remote) JID \fIto\fP containing +the body \fIbody\fP. +Both bare and full JIDs are supported. + +.TP +.BI send\-message\-headline " from to subject body" +Send a message of type "headline" from the JID \fIfrom\fP +to the (local or remote) JID \fIto\fP containing +the body \fIbody\fP and subject \fIsubject\fP. +Both bare and full JIDs are supported. + +.TP +.BI send\-stanza\-c2s " user server resource stanza" +Send XML string \fIstanza\fP to the stream to which the +session \fIuser@server/resource\fP is bound. +The stanza must be well-formed (according to RFC 3920) +and the session must be active. +.IP +For example: +.nf +ejabberdctl send-stanza-c2s john_doe example.com Bahamas \\ + 'How goes?' +.fi + +.TP +.BI srg\-create " group host name description display" +Create a new shared roster group \fIgroup\fP +on the virtual host \fIhost\fP +with displayed name \fIname\fP, +description \fIdescription\fP and displayed groups \fIdisplay\fP. + +.TP +.BI srg\-delete " group host" +Delete the shared roster group \fIgroup\fP +from the virtual host \fIhost\fP. + +.TP +.BI srg\-user\-add " user server group host" +Add an entry for the JID \fIuser\fP@\fIserver\fP +to the group \fIgroup\fP on the virtual host \fIhost\fP. + +.TP +.BI srg\-user\-del " user server group host" +Delete an entry for the JID \fIuser\fP@\fIserver\fP +from the group \fIgroup\fP on the virtual host \fIhost\fP. + +.TP +.BI srg\-list " host" +List the shared roster groups on the virtual host \fIhost\fP. + +.TP +.BI srg\-get\-info " group host" +Print info on the shared roster group \fIgroup\fP +on the virtual host \fIhost\fP. + +.TP +.BI srg\-get\-members " group host" +Print members of the shared roster group \fIgroup\fP +on the virtual host \fIhost\fP. + +.TP +.BI private\-get " user server element namespace" +Prints an XML stanza which would be sent by the server +it it received an IQ-request of type "get" with the +.nf +<\fIelement\fP xmlns="\fInamespace\fP"/> +.fi +payload from \fIuser@server\fP. +.IP +For example: +.nf +ejabberdctl private-get john_doe example.com \\ + storage storage:bookmarks +.fi +would return user's bookmarks, managed according to XEP-0048. + +.TP +.BI private\-set " user server element" +Allows one to simulate \fIuser@server\fP sending an IQ-request +of type "set" containing \fIelement\fP as its payload; +the payload is processed by the code managing users' private storage +(XEP-0049 "Private XML Storage"). +.IP +The string \fIelement\fP must be a well-formed XML obeying the +rules defined for IQ-request payloads in RFC 3920. + +.TP +.BI privacy\-set " user server element" +Allows one to simulate \fIuser@server\fP sending an IQ-request +of type "set" containing \fIelement\fP as its payload; +this payload is processed by the code managing privacy lists +(XEP-0016 "Privacy lists"). +.IP +The string \fIelement\fP must be a well-formed XML obeying the +rules defined for IQ-request payloads in RFC 3920. + +.TP +.BI stats " topic" +Print statistics on the topic \fItopic\fP. +The valid topics and their meaning are: +.IP +.BI registeredusers +Print the number of users registered on the server. +.IP +.BI onlineusers +Print the number of users currently logged into the server. +.IP +.BI onlineusersnode +Print the number of users logged into the server +which are served by the current ejabberd Erlang node. +.IP +.BI uptimeseconds +Print the uptime of the current ejabberd Erlang node, in seconds. + +.TP +.BI stats\-host " host topic" +Print statistics on the topic \fItopic\fP +for the virtual host \fIhost\fP. +The valid topics and their meaning are: +.IP +.BI registeredusers +Print the number of users registered on the host \fIhost\fP. +.IP +.BI onlineusers +Print the number of users currently logged into the server, +which are registered on the host \fIhost\fP. + +.TP +.BI status\-list " status" +Print the users currently logged into the server +and having the presence status \fIstatus\fP. +The entries are printed one per line; +each entry consists of the four fields separated by +tab characters, in this order: the node part of the +user's JID, the host part of the user's JID, +the user's session resource, +the priority of the user's session +and the user's status description. +.IP +The \fIstatus\fP parameter can take the following values: +"available", "away", "xa", "dnd" and "chat". + +.TP +.BI status\-list\-host " host status" +Print the users currently logged into the server +which are registered on the virtual host \fIhost\fP +and have the presence status \fIstatus\fP. +.IP +The available values for the \fIstatus\fP parameter +and the format of the output data are the same +as of the \fBstatus\-list\fR subcommand. + +.TP +.BI status\-num " status" +Print the number of users currently logged into the server +and having the presence status \fIstatus\fP. +.IP +The available values for the \fIstatus\fP parameter +are the same as of the \fBstatus\-list\fR subcommand. + +.TP +.BI status\-num\-host " host status" +Print the number of users currently logged into the server +which are registered on the virtual host \fIhost\fP +and have the presence status \fIstatus\fP. +.IP +The available values for the \fIstatus\fP parameter +are the same as of the \fBstatus\-list\fR subcommand. + +.TP +.BI user\-sessions\-info " user server" +Print detailed information on all sessions currently established +by \fIuser@server\fP. +For each session, one line of output is generated, containing the +following fields separated by tab characters: connection string +(such as "c2s", "c2s_tls" etc), remote IP address, remote port number, +priority of the resource bound to this session, name of an Erlang node +serving the session, session uptime (in seconds), resource string. + +\" .TP +\" .BI muc\-purge " days" +\" Destroy MUC rooms with zero activity (no messages in history) in the last +\" \fIdays\fP days. +\" .TP +\" .BI muc\-online\-rooms +\" Print the list of existing MUC rooms. + +\" entries related to mod_ctlextra (2.0.x series): + +\".TP +\".BI pushroster " file user server" +\"Push template roster in file \fIfile\fP to \fIuser@server\fP. The file contents +\"must use the following format: +\".sp +\".nf +\"[{"bob", "example.org", "Bob's group", "Bob's nickname"}, +\" {"mart", "example.org", "workers", "Mart"}, +\" {"Rich", "example.org", "bosses", "Rich"}]. +\".fi +\".TP +\".BI pushroster\-all " file" +\"Push template roster in file to all users listed in the file \fIfile\fP itself. +\"The file contents must be in the same format as for \fBpushroster\fP command. + +.SH NOTES + +.PP +\fBejabberdctl\fR starts distributed Erlang node \fIejabberddebug\fP (if run +with \fBdebug\fP option) or \fIejabberdctl\fP (if run with any other options). +If the ejabberd server's node name to connect to includes FDQN as a hostname +Erlang option \fI\-name\fP is used. Otherwise \fBejabberdctl\fR uses short +names (\fI\-sname\fP option). + +.PP +Note that \fBejabberdctl\fR does not append hostname to its own node name +leaving this to Erlang emulator. It usually follows \fI\(gahostname \-f\(ga\fP +to find a hostname if long names are used or \fI\(gahostname \-s\(ga\fP in +case of short names, but may fail in case of unusual networking settings. A +known case of failure is using long names when \fI\(gahostname \-f\(ga\fP +doesn't return FDQN. If \fRejabberdctl\fR cannot create Erlang node then it +cannot control ejabberd server. + +.PP +\fBejabberdctl\fR does not do anything by itself except for connecting +to the running ejabberd instance and telling it about the action requested +by the user. Hence all the \fBejabberdctl\fR's operations involving +writing or reading files or directories are actually performed by the +server process which runs with the uid and gid of the user and group +"ejabberd", respectively. This must be taken into account when +requesting such operations to be done. + +.SH OPTIONS FILE +.PP +The file \fB/etc/default/ejabberd\fR contains specific options. Two of them +are used by \fBejabberdctl\fP. + +.TP +.BI ERLANG_NODE +Use specified string as Erlang node of \fBejabberd\fP server to connect. It +overrides default \fBejabberd\fP node name. The string may take one of the +following forms: \fBnodename\fP, \fBnodename@hostname\fP or +\fBnodename@hostname.domainname\fP. + +.TP +.BI FIREWALL_WINDOW +Use the specified range of ports to communicate with the other Erlang +nodes (namely, with the target Erlang node running ejabberd). +This can be useful when the system running the target node has restricted +firewall setup allowing only a certain range of ports to be used by +the Erlang nodes for communication; in this case, you should specify +that range of ports in the \fBFIREWALL_WINDOW\fR setting. + +.SH FILES +.PD 0 +.I /etc/default/ejabberd +default variables + +.SH SEE ALSO +.PP +\fBerl\fR(1), \fBejabberd\fR(8), \fBmnesia\fR(3). + +.PP +The program documentation is available at +\fIhttp://www.process\-one.net/en/projects/ejabberd/\fP. +A copy of the documentation can be found at +/usr/share/doc/ejabberd/guide.html. + +.SH AUTHORS +.PP +This manual page was adapted by Sergei Golovan for +the \fBDebian\fP system (but may be used by others) from the +\fBejabberd\fP documentation written by Alexey Shchepin . +Updated by Konstantin Khomoutov . + +Permission is granted to copy, distribute and/or modify this document under +the terms of the GNU General Public License, Version 2 any +later version published by the Free Software Foundation. +.PP +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common\-licenses/GPL. + --- ejabberd-2.1.10.orig/debian/manpages +++ ejabberd-2.1.10/debian/manpages @@ -0,0 +1,3 @@ +debian/ejabberd.8 +debian/ejabberdctl.8 + --- ejabberd-2.1.10.orig/debian/TODO +++ ejabberd-2.1.10/debian/TODO @@ -0,0 +1,129 @@ +* Ponder reimplementing the logic of allowing several + instances of ejabberdctl to run in parallel while + not overflowing the server's atom table. + + The idea is to modify the solution offered by Martin Langhoff + at http://lists.jabber.ru/pipermail/ejabberd/2009-December/005627.html + which is clever (uses the flock program, which is essential + in Debian and so can be relied upon) but weak in that + any "extra" instance will still fail. + + The current plan is to go this route: + - Hardcode some limit on the number of parallel instances + into ejabberdctl but allow to override it using a command-line + argument (say, via --concurrent N). + - Upon startup, lock a well-known file under /var/lock/ejabberd + in a "blocking forever" mode, that is, if a file is already + locked, wait for unlock. + - After acquiring the lock, iterate over a sequence 1..N + trying to lock specific ("instance") lock files. + - Upon successful locking of any of these files, release the + "master" lock and continue working. + - At exit, unlock the "instance" file and remove it. + + This way, no instance will ever (soft-) fail: they'll be queued + for execution while waiting on the "master lock". + And the server's atom table will be safe from overflowing as + there will ever see at most N unique node names of connecting + Erlang nodes running ejabberdctl instances. + +* Fix lintian warnings where possible. + +* In debconf code, check if the user name contains + the "@" character and if it is, does the part of + the username to the right of it equals to the + provided hostname. If both conditions hold, + extract the real username and proceed, otherwise + complain. At the current state it's possible to + enter an invalid username and several users + tripped over this issue. + +* Implement processing of standard Debian build options + to allow parallel builds (has to be tested) and + builds with gcc code optimizations turned off. + +* Better parsing of FIREWALL_WINDOW: + a) make it robust against invalid input. + b) allow open ranges like 123- and -234. + +* Add comments (and commented out examples) to the + clauses in the "LISTENING PORTS" config file section + explaining how to enable IPv6 on a port. + +* Seems like git-orig-source doesn't catch + RC releases. Might be it would be cool to train + it to find them. + + +ejabberdctl.8 tasks +=================== + +* It seems (from the stop-kindly command) that ejabberdctl + assumes all strings it is passed are encoded in UTF-8 + no matter what locale settings it and the server see. + This is now documented for stop-kindly, but some testing + should be done to support or disprove this hypothesis; + if it is true, we should document this behaviour + exactly once in the man page. + +* get-cookie + Verify the claim made about its functionality. + +* push-roster + recheck, manpage entries for mod_ctlextra mentioned other format. + +* push-roster-all + all users on all vhosts? + +* push-alltoall + does each user get the entry for theirselves? + +* process-rosteritems + need more info + +* srg-create + what format of "display"? + +* srg-get-info " group host" + what format? + +* srg-get-members " group host" + what format? + + +Low priority +============ + +* Think of implementing /usr/share/ejabberd/common + which would be sourced by both ejabberdctl and + ejabberd and processed/constructed certain options. + Also it seems that the upstream's approach with + having just one file both for startup and control + isn't that bad, as current packaging leads to some + code duplication in scripts. + + Do we need the separate ejabberd script at all? + + +For reference +============= + +* Use upstream ejabberdctl.cfg as /etc/default/ejabberd. + Requires patching, see the master branch. + Also ensure that the config is safe w.r.t. proxy65 etc, + def. log level match etc (compate to the current one). + +* Re-check whether the upstream startup files would do + better than current. + The current have some nice ideas but they + a) deviate from upstream + b) artifically constructing node names for ejabberdctl + provokes the atom list overflow of the ejabberd host + in certain scenarious; no robust workaround is known yet. + + On the other hand, upstream scripts: + a) more cumbersome; + b) kill epmd; + c) don't draw dots while waiting for ejabberd to start/stop; + d) Show nag screens on debug and live targets. + --- ejabberd-2.1.10.orig/debian/prerm +++ ejabberd-2.1.10/debian/prerm @@ -0,0 +1,60 @@ +#! /bin/sh +# prerm script for ejabberd +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +ctl() { + local cmd='/usr/sbin/ejabberdctl' + for arg in "$@"; do + cmd="$cmd '$arg'" + done + su ejabberd -c "$cmd" +} + +case "$1" in + remove|upgrade) + if ctl status >/dev/null ; then + # Use timestamp to make database restoring easier + TIME=$(date +%Y-%m-%dT%H:%M:%S) + BACKUPDIR=$(mktemp -d -p /var/backups/ ejabberd-$TIME.XXXXXX) + chown ejabberd:ejabberd $BACKUPDIR + BACKUP=$BACKUPDIR/ejabberd-database + ctl backup $BACKUP + # Change ownership to root:root because ejabberd user might be + # removed on package removal. + chown -R root:root $BACKUPDIR + chmod 700 $BACKUPDIR + echo + echo The ejabberd database has been backed up to $BACKUP. + echo + fi + ;; + + deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + --- ejabberd-2.1.10.orig/debian/ejabberd.cfg +++ ejabberd-2.1.10/debian/ejabberd.cfg @@ -0,0 +1,644 @@ +%%% +%%% Debian ejabberd configuration file +%%% This config must be in UTF-8 encoding +%%% +%%% The parameters used in this configuration file are explained in more detail +%%% in the ejabberd Installation and Operation Guide. +%%% Please consult the Guide in case of doubts, it is available at +%%% /usr/share/doc/ejabberd/guide.html + +%%% This configuration file contains Erlang terms. +%%% In case you want to understand the syntax, here are the concepts: +%%% +%%% - The character to comment a line is % +%%% +%%% - Each term ends in a dot, for example: +%%% override_global. +%%% +%%% - A tuple has a fixed definition, its elements are +%%% enclosed in {}, and separated with commas: +%%% {loglevel, 4}. +%%% +%%% - A list can have as many elements as you want, +%%% and is enclosed in [], for example: +%%% [http_poll, web_admin, tls] +%%% +%%% - A keyword of ejabberd is a word in lowercase. +%%% The strings are enclosed in "" and can have spaces, dots... +%%% {language, "en"}. +%%% {ldap_rootdn, "dc=example,dc=com"}. +%%% +%%% - This term includes a tuple, a keyword, a list and two strings: +%%% {hosts, ["jabber.example.net", "im.example.com"]}. +%%% + +%%% =================================== +%%% OVERRIDE OPTIONS STORED IN DATABASE + +%% +%% Override global options (shared by all ejabberd nodes in a cluster). +%% +%%override_global. + +%% +%% Override local options (specific for this particular ejabberd node). +%% +%%override_local. + +%% +%% Remove the Access Control Lists before new ones are added. +%% +%%override_acls. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Options which are set by Debconf and managed by ucf + +%% Admin user +{acl, admin, {user, "__USER__", "__HOSTNAME__"}}. + +%% Hostname +{hosts, ["__HOSTNAME__"]}. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%% ========= +%%% DEBUGGING + +%% +%% loglevel: Verbosity of log files generated by ejabberd. +%% 0: No ejabberd log at all (not recommended) +%% 1: Critical +%% 2: Error +%% 3: Warning +%% 4: Info +%% 5: Debug +%% +{loglevel, 4}. + +%% +%% watchdog_admins: If an ejabberd process consumes too much memory, +%% send live notifications to those Jabber accounts. +%% +%%{watchdog_admins, ["bob@example.com"]}. + + +%%% ================ +%%% SERVED HOSTNAMES + +%% +%% hosts: Domains served by ejabberd. +%% You can define one or several, for example: +%% {hosts, ["example.net", "example.com", "example.org"]}. +%% +%% (This option is defined by debconf earlier) +%% {hosts, ["localhost"]}. + +%% +%% route_subdomains: Delegate subdomains to other Jabber server. +%% For example, if this ejabberd serves example.org and you want +%% to allow communication with a Jabber server called im.example.org. +%% +%%{route_subdomains, s2s}. + + +%%% =============== +%%% LISTENING PORTS + +%% +%% listen: Which ports will ejabberd listen, which service handles it +%% and what options to start it with. +%% +{listen, + [ + {5222, ejabberd_c2s, [ + {access, c2s}, + {shaper, c2s_shaper}, + {max_stanza_size, 65536}, + %%zlib, + starttls, {certfile, "/etc/ejabberd/ejabberd.pem"} + ]}, + + %% + %% To enable the old SSL connection method (deprecated) in port 5223: + %% + %%{5223, ejabberd_c2s, [ + %% {access, c2s}, + %% {shaper, c2s_shaper}, + %% {max_stanza_size, 65536}, + %% zlib, + %% tls, {certfile, "/etc/ejabberd/ejabberd.pem"} + %% ]}, + + {5269, ejabberd_s2s_in, [ + {shaper, s2s_shaper}, + {max_stanza_size, 131072} + ]}, + + %% External MUC jabber-muc + %%{5554, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {host, "muc.localhost", [{password, "secret"}]} + %% ]}, + + %% Jabber ICQ Transport + %%{5555, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {hosts, ["icq.localhost", "sms.localhost"], + %% [{password, "secret"}]} + %% ]}, + + %% AIM Transport + %%{5556, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {host, "aim.localhost", [{password, "secret"}]} + %% ]}, + + %% MSN Transport + %%{5557, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {host, "msn.localhost", [{password, "secret"}]} + %% ]}, + + %% Yahoo! Transport + %%{5558, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {host, "yahoo.localhost", [{password, "secret"}]} + %% ]}, + + %% External JUD (internal is more powerful, + %% but doesn't allow to register users from other servers) + %%{5559, ejabberd_service, [ + %% {ip, {127, 0, 0, 1}}, + %% {access, all}, + %% {shaper_rule, fast}, + %% {host, "jud.localhost", [{password, "secret"}]} + %% ]}, + + {5280, ejabberd_http, [ + %%{request_handlers, + %% [ + %% {["pub", "archive"], mod_http_fileserver} + %% ]}, + %%captcha, + http_bind, + http_poll, + web_admin + ]} + + ]}. + +%% +%% max_fsm_queue: Enable limiting of lengths of "message queues" +%% for outgoing connections. Roughly speaking, each message in such +%% queues represents one XML stanza queued to be sent into +%% an output stream it is serving. +%% The default value is an atom 'undefined' which specifies no limiting. +%% +%% When specified globally, this option limits the message queue lengths +%% for all ejabberd_c2s_in and ejabberd_service listeners, +%% as well as for outgoing s2s connections. +%% +%% This option can also be specified as an option for ejabberd_c2s_in +%% and ejabberd_service listeners, in wich case it will override +%% the value of the global option. +%% +{max_fsm_queue, 1000}. + +%% +%% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections. +%% Allowed values are: true or false. +%% You must specify a certificate file. +%% +{s2s_use_starttls, true}. + +%% +%% s2s_certfile: Specify a certificate file. +%% +{s2s_certfile, "/etc/ejabberd/ejabberd.pem"}. + +%% +%% domain_certfile: Specify a different certificate for each served hostname. +%% +%%{domain_certfile, "example.org", "/path/to/example_org.pem"}. +%%{domain_certfile, "example.com", "/path/to/example_com.pem"}. + +%% +%% S2S whitelist or blacklist +%% +%% Default s2s policy for undefined hosts. +%% +%%{s2s_default_policy, allow}. + +%% +%% Allow or deny communication with specific servers. +%% +%%{{s2s_host, "goodhost.org"}, allow}. +%%{{s2s_host, "badhost.org"}, deny}. + +%% +%% The maximum allowed delay for retry to connect +%% after a failed connection attempt to a remote server, in seconds. +%% The default value is 300 seconds (5 minutes). +%% +%% The reconnection algorythm works like this: if connection fails, +%% ejabberd makes an initial random delay between 1 and 15 seconds, +%% then retries, and if this attempt fails, makes another delay, +%% twice as long as previous. These attempts are performed either +%% until a successful connection is made or until the next calculated +%% delay is greated or equal than the value of s2s_max_retry_delay. +%% +%%{s2s_max_retry_delay, 300}. + +%% +%% Outgoing S2S options +%% +%% Preferred address families (which to try first) and connect timeout +%% in milliseconds. +%% +%%{outgoing_s2s_options, [ipv4, ipv6], 10000}. + + +%%% ============== +%%% AUTHENTICATION + +%% +%% auth_method: Method used to authenticate the users. +%% The default method is the internal. +%% If you want to use a different method, +%% comment this line and enable the correct ones. +%% +{auth_method, internal}. + +%% +%% Authentication using external script +%% Make sure the script is executable by ejabberd. +%% +%%{auth_method, external}. +%%{extauth_program, "/path/to/authentication/script"}. + +%% +%% Authentication using ODBC +%% Remember to setup a database in the next section. +%% +%%{auth_method, odbc}. + +%% +%% Authentication using PAM +%% +%%{auth_method, pam}. +%%{pam_service, "pamservicename"}. + +%% +%% Authentication using LDAP +%% +%%{auth_method, ldap}. +%% +%% List of LDAP servers: +%%{ldap_servers, ["localhost"]}. +%% +%% Encryption of connection to LDAP servers (LDAPS): +%%{ldap_encrypt, none}. +%%{ldap_encrypt, tls}. +%% +%% Port connect to LDAP server: +%%{ldap_port, 389}. +%%{ldap_port, 636}. +%% +%% LDAP manager: +%%{ldap_rootdn, "dc=example,dc=com"}. +%% +%% Password to LDAP manager: +%%{ldap_password, "******"}. +%% +%% Search base of LDAP directory: +%%{ldap_base, "dc=example,dc=com"}. +%% +%% LDAP attribute that holds user ID: +%%{ldap_uids, [{"mail", "%u@mail.example.org"}]}. +%% +%% LDAP filter: +%%{ldap_filter, "(objectClass=shadowAccount)"}. + +%% +%% Anonymous login support: +%% auth_method: anonymous +%% anonymous_protocol: sasl_anon | login_anon | both +%% allow_multiple_connections: true | false +%% +%%{host_config, "public.example.org", [{auth_method, anonymous}, +%% {allow_multiple_connections, false}, +%% {anonymous_protocol, sasl_anon}]}. +%% +%% To use both anonymous and internal authentication: +%% +%%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}. + + +%%% ============== +%%% DATABASE SETUP + +%% ejabberd uses by default the internal Mnesia database, +%% so you can avoid this section. +%% This section provides configuration examples in case +%% you want to use other database backends. +%% Please consult the ejabberd Guide for details about database creation. + +%% NOTE that ejabberd in Debian supports "out of the box" +%% only mnesia (default) and ODBC storage backends. +%% Working with MySQL and PostgreSQL DB backends requires +%% building and installation of the corresponding Erlang modules, +%% not distributed as a part of ejabberd. +%% Refer to /usr/share/doc/ejabberd/README.Debian for details. + +%% +%% MySQL server: +%% +%%{odbc_server, {mysql, "server", "database", "username", "password"}}. +%% +%% If you want to specify the port: +%%{odbc_server, {mysql, "server", 1234, "database", "username", "password"}}. + +%% +%% PostgreSQL server: +%% +%%{odbc_server, {pgsql, "server", "database", "username", "password"}}. +%% +%% If you want to specify the port: +%%{odbc_server, {pgsql, "server", 1234, "database", "username", "password"}}. +%% +%% If you use PostgreSQL, have a large database, and need a +%% faster but inexact replacement for "select count(*) from users" +%% +%%{pgsql_users_number_estimate, true}. + +%% +%% ODBC compatible or MSSQL server: +%% +%%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}. + +%% +%% Number of connections to open to the database for each virtual host +%% +%%{odbc_pool_size, 10}. + +%% +%% Interval to make a dummy SQL request to keep alive the connections +%% to the database. Specify in seconds: for example 28800 means 8 hours +%% +%%{odbc_keepalive_interval, undefined}. + + +%%% =============== +%%% TRAFFIC SHAPERS + +%% +%% The "normal" shaper limits traffic speed to 1.000 B/s +%% +{shaper, normal, {maxrate, 1000}}. + +%% +%% The "fast" shaper limits traffic speed to 50.000 B/s +%% +{shaper, fast, {maxrate, 50000}}. + + +%%% ==================== +%%% ACCESS CONTROL LISTS + +%% +%% The 'admin' ACL grants administrative privileges to Jabber accounts. +%% You can put as many accounts as you want. +%% +%%{acl, admin, {user, "aleksey", "localhost"}}. +%%{acl, admin, {user, "ermine", "example.org"}}. + +%% +%% Blocked users +%% +%%{acl, blocked, {user, "baduser", "example.org"}}. +%%{acl, blocked, {user, "test"}}. + +%% +%% Local users: don't modify this line. +%% +{acl, local, {user_regexp, ""}}. + +%% +%% More examples of ACLs +%% +%%{acl, jabberorg, {server, "jabber.org"}}. +%%{acl, aleksey, {user, "aleksey", "jabber.ru"}}. +%%{acl, test, {user_regexp, "^test"}}. +%%{acl, test, {user_glob, "test*"}}. + +%% +%% Define specific ACLs in a virtual host. +%% +%%{host_config, "localhost", +%% [ +%% {acl, admin, {user, "bob-local", "localhost"}} +%% ] +%%}. + + +%%% ============ +%%% ACCESS RULES + +%% Define the maximum number of time a single user is allowed to connect: +{access, max_user_sessions, [{10, all}]}. + +%% Maximum number of offline messages that users can have: +{access, max_user_offline_messages, [{5000, admin}, {100, all}]}. + +%% This rule allows access only for local users: +{access, local, [{allow, local}]}. + +%% Only non-blocked users can use c2s connections: +{access, c2s, [{deny, blocked}, + {allow, all}]}. + +%% For all users except admins used "normal" shaper +{access, c2s_shaper, [{none, admin}, + {normal, all}]}. + +%% For all S2S connections used "fast" shaper +{access, s2s_shaper, [{fast, all}]}. + +%% Only admins can send announcement messages: +{access, announce, [{allow, admin}]}. + +%% Only admins can use configuration interface: +{access, configure, [{allow, admin}]}. + +%% Admins of this server are also admins of MUC service: +{access, muc_admin, [{allow, admin}]}. + +%% All users are allowed to use MUC service: +{access, muc, [{allow, all}]}. + +%% No username can be registered via in-band registration: +%% To enable in-band registration, replace 'deny' with 'allow' +% (note that if you remove mod_register from modules list then users will not +% be able to change their password as well as register). +% This setting is default because it's more safe. +{access, register, [{deny, all}]}. + +%% By default frequency of account registrations from the same IP +%% is limited to 1 account every 10 minutes. To disable put: infinity +%%{registration_timeout, 600}. + +%% Everybody can create pubsub nodes +{access, pubsub_createnode, [{allow, all}]}. + +%% +%% Define specific Access rules in a virtual host. +%% +%%{host_config, "localhost", +%% [ +%% {access, c2s, [{allow, admin}, {deny, all}]}, +%% {access, register, [{deny, all}]} +%% ] +%%}. + + +%%% ================ +%%% DEFAULT LANGUAGE + +%% +%% language: Default language used for server messages. +%% +{language, "en"}. + +%% +%% Set a different default language in a virtual host. +%% +%%{host_config, "localhost", +%% [{language, "ru"}] +%%}. + + +%%% ======= +%%% CAPTCHA + +%% +%% Full path to a script that generates the image. +%% Note that this script must be made executable +%% for the user ejabberd:ejabberd. +%% +%%{captcha_cmd, "/usr/lib/ejabberd/priv/bin/captcha.sh"}. + +%% +%% Host part of the URL sent to the user. +%% The port specified must be configured as the "ejabberd_http" +%% listener which must have the "captcha" directive included +%% in its configuration (see the "LISTENING PORTS" section above). +%% +%%{captcha_host, "localhost:5280"}. + + +%%% ======= +%%% MODULES + +%% +%% Modules enabled in all ejabberd virtual hosts. +%% +{modules, + [ + {mod_adhoc, []}, + {mod_announce, [{access, announce}]}, % requires mod_adhoc + {mod_caps, []}, + {mod_configure,[]}, % requires mod_adhoc + {mod_admin_extra, []}, + {mod_disco, []}, + %%{mod_echo, [{host, "echo.localhost"}]}, + {mod_irc, []}, + %% NOTE that mod_http_fileserver must also be enabled in the + %% "request_handlers" clause of the "ejabberd_http" listener + %% configuration (see the "LISTENING PORTS" section above). + %%{mod_http_fileserver, [ + %% {docroot, "/var/www"}, + %% {accesslog, "/var/log/ejabberd/access.log"} + %% ]}, + {mod_last, []}, + {mod_muc, [ + %%{host, "conference.@HOST@"}, + {access, muc}, + {access_create, muc}, + {access_persistent, muc}, + {access_admin, muc_admin}, + {max_users, 500} + ]}, + %%{mod_muc_log,[]}, + {mod_offline, [{access_max_user_messages, max_user_offline_messages}]}, + {mod_privacy, []}, + {mod_private, []}, + {mod_proxy65, [ + {access, local}, + {shaper, c2s_shaper} + ]}, + {mod_pubsub, [ % requires mod_caps + {access_createnode, pubsub_createnode}, + {pep_sendlast_offline, false}, + {last_item_cache, false}, + %%{plugins, ["default", "pep"]} + {plugins, ["flat", "hometree", "pep"]} % pep requires mod_caps + ]}, + {mod_register, [ + %% + %% After successful registration, the user receives + %% a message with this subject and body. + %% + {welcome_message, {"Welcome!", + "Welcome to a Jabber service powered by Debian. " + "For information about Jabber visit " + "http://www.jabber.org"}}, + %% Replace it with 'none' if you don't want to send such message: + %%{welcome_message, none}, + + %% + %% When a user registers, send a notification to + %% these Jabber accounts. + %% + %%{registration_watchers, ["admin1@example.org"]}, + + {access, register} + ]}, + {mod_roster, []}, + %%{mod_service_log,[]}, + %%{mod_shared_roster,[]}, + {mod_stats, []}, + {mod_time, []}, + {mod_vcard, []}, + {mod_version, []} + ]}. + +%% +%% Enable modules with custom options in a specific virtual host +%% +%%{host_config, "localhost", +%% [{{add, modules}, +%% [ +%% {mod_echo, [{host, "mirror.localhost"}]} +%% ] +%% } +%% ]}. + + +%%% $Id: ejabberd.cfg.example 2497 2009-08-17 20:27:28Z cromain $ + +%%% Local Variables: +%%% mode: erlang +%%% End: +%%% vim: set filetype=erlang tabstop=8: --- ejabberd-2.1.10.orig/debian/default +++ ejabberd-2.1.10/debian/default @@ -0,0 +1,127 @@ +# +# In this file you can configure options that are passed +# to the erlang runtime system when starting ejabberd +# + +# POLL: Kernel polling ([true|false]) +# +# The kernel polling option requires support in the kernel. +# Additionaly, you need to enable this feature while compiling Erlang. +# +# Default: false +# +#POLL=false + +# SMP: SMP support ([enable|auto|disable]) +# +# Explanation in Erlang/OTP documentation: +# enable: starts the Erlang runtime system with SMP support enabled. +# This may fail if no runtime system with SMP support is available. +# auto: starts the Erlang runtime system with SMP support enabled if it +# is available and more than one logical processor are detected. +# disable: starts a runtime system without SMP support. +# +# Default: disable +# +#SMP=disable + +# ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports +# +# ejabberd consumes two or three ports for every connection, either +# from a client or from another Jabber server. So take this into +# account when setting this limit. +# +# Default: 32000 +# Maximum: 268435456 +# +#ERL_MAX_PORTS=32000 + +# FIREWALL_WINDOW: Range of allowed ports to pass through a firewall +# +# If Ejabberd is configured to run in cluster, and a firewall is blocking ports, +# it's possible to make Erlang use a defined range of port (instead of dynamic +# ports) for node communication. +# +# Default: empty +# Example: 4200-4210 +# +#FIREWALL_WINDOW= + +# PROCESSES: Maximum number of Erlang processes +# +# Erlang consumes a lot of lightweight processes. If there is a lot of activity +# on ejabberd so that the maximum number of proccesses is reached, people will +# experiment greater latency times. As these processes are implemented in +# Erlang, and therefore not related to the operating system processes, you do +# not have to worry about allowing a huge number of them. +# +# Default: 250000 +# Maximum: 268435456 +# +#PROCESSES=250000 + +# ERL_MAX_ETS_TABLES: Maximum number of ETS and Mnesia tables +# +# The number of concurrent ETS and Mnesia tables is limited. When the limit is +# reached, errors will appear in the logs: +# ** Too many db tables ** +# You can safely increase this limit when starting ejabberd. It impacts memory +# consumption but the difference will be quite small. +# +# Default: 1400 +# +#ERL_MAX_ETS_TABLES=1400 + +# ERL_OPTIONS: Additional Erlang options +# +# The next variable allows to specify additional options passed to erlang while +# starting ejabberd. Some useful options are -noshell, -detached, -heart. When +# ejabberd is started from an init.d script options -noshell and -detached are +# added implicitly. See erl(1) for more info. +# +# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you +# want to add local modules in this path. +# +# Default: empty +# +#ERL_OPTIONS="" + + +# ERL_FULLSWEEP_AFTER: The maximum number of generational collections before +# forcing a fullsweep +# +# The Erlang runtime system uses a generational garbage collection scheme, +# using an "old heap" for data that has survived at least one garbage +# collection. When there is no more room on the old heap, a fullsweep garbage +# collection will be done. +# +# The fullsweep_after option makes it possible to specify the maximum number +# of generational collections before forcing a fullsweep even if there is +# still room on the old heap. Setting the number to zero effectively disables +# the general collection algorithm, meaning that all live data is copied at +# every garbage collection. +# +# To reduce memory usage, you can set environment variable ERL_FULLSWEEP_AFTER +# to zero. But in this case ejabberd may work slower. +# +# Default: 65535 +# +#ERL_FULLSWEEP_AFTER=65535 + +# ERLANG_NODE: Erlang node for ejabberd server +# +# The next variable allows to explicitly specify erlang node for ejabberd +# It can be given in different formats: +# ERLANG_NODE=ejabberd +# Lets erlang add hostname to the node (ejabberd uses short name in this case) +# ERLANG_NODE=ejabberd@hostname +# Erlang uses node name as is (so make sure that hostname is a real +# machine hostname or you'll not be able to control ejabberd) +# ERLANG_NODE=ejabberd@hostname.domainname +# The same as previous, but erlang will use long hostname +# (see erl (1) manual for details) +# +# Default: ejabberd +# +#ERLANG_NODE=ejabberd + --- ejabberd-2.1.10.orig/debian/postrm +++ ejabberd-2.1.10/debian/postrm @@ -0,0 +1,43 @@ +#! /bin/sh +# postrm script for ejabberd +# +# see: dh_installdeb(1) + +set -e + +CONFIG_TARGET=/etc/ejabberd/ejabberd.cfg + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + purge) + if which ucf >/dev/null ; then + ucf --purge $CONFIG_TARGET + fi + rm -f $CONFIG_TARGET + rm -f /etc/ejabberd/ejabberd.pem + rm -Rf /var/log/ejabberd /var/lib/ejabberd + rm -Rf /var/run/ejabberd || true + rm -f /etc/default/ejabberd + if which deluser >/dev/null ; then + deluser ejabberd 2>/dev/null || true + delgroup ejabberd 2>/dev/null || true + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + --- ejabberd-2.1.10.orig/debian/changelog +++ ejabberd-2.1.10/debian/changelog @@ -0,0 +1,1050 @@ +ejabberd (2.1.10-5ubuntu1) saucy; urgency=low + + * Disable SSLv2 and weak ciphers in the TLS driver. + - debian/patches/disable-ssl2.patch, patch from Debian + - debian/patches/disable-insecure-ssl-cyphers.patch, patch from Debian + - LP: #1239307 + + -- Felix Geyer Sun, 13 Oct 2013 11:58:44 +0200 + +ejabberd (2.1.10-5) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Add patch fixing parsing of optional parameters in SCRAM SHA-1 headers + (closes: #705613, thanks to Stephen Röttger for both writing the + original patch and backporting it to 2.1.10). + + -- Konstantin Khomoutov Thu, 25 Apr 2013 15:31:59 +0000 + +ejabberd (2.1.10-4) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Do not run ejabberdctl as root in prerm and logrotate scripts + (closes: #691125, thanks to Michael Stapelberg and Felix Geyer). + * Add upstream patch fixing receiving JPEG vCard photos via LDAP + (closes: #660186). + * Add upstream patch fixing parsing HTTPS requests split into + multiple packets (closes: #698309). + + -- Konstantin Khomoutov Sat, 16 Feb 2013 16:59:21 +0000 + +ejabberd (2.1.10-3) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Provide custom implementation of xmerl_regexp:sh_to_awk/1 + (closes: #670307). + * Add use_dpkg_buildflags.patch (thanks to Simon Ruderich, + closes: #664034). + * Add relax-digest-uri-handling.patch (closes: #654853). + * Add Slovak translation (thanks to Slavko, closes: #647115). + * Add Italian translation (thanks to Beatrice Torracca, closes: #682987). + + -- Konstantin Khomoutov Sun, 20 May 2012 14:51:12 +0400 + +ejabberd (2.1.10-2) unstable; urgency=low + + [ Gerfried Fuchs ] + * Upload to unstable (closes: #657759). + * Remove code for #368414 from postinst, 1.1.1-3 is ancient history + (closes: #656826) + + [ Konstantin Khomoutov ] + * Update Dutch translation (thanks to Jeroen Schot, closes: #657590). + * Enable hardened building of C drivers by using dpkg-buildflags + (thanks to Moritz Muehlenhoff, closes: #657525). + + -- Konstantin Khomoutov Wed, 01 Feb 2012 01:50:40 +0400 + +ejabberd (2.1.10-1) experimental; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + * Update mod_admin_extra to revision 1123. + + [ Gerfried Fuchs ] + * Bump erlang-dev Build-Depends version to >= 1:15.b. + + -- Gerfried Fuchs Sun, 08 Jan 2012 11:45:38 +0100 + +ejabberd (2.1.9-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + * Remove obsoleted version.patch. + + -- Konstantin Khomoutov Mon, 03 Oct 2011 20:27:12 +0400 + +ejabberd (2.1.8-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + * Remove patch fixing DSA-2248-1 (CVE-2011-1753) + as the fix is now integrated upstream. + * Drop patches from OLPC project implementing @recent@ and @online@ + shared roster groups; support for @online@ is now intergated upstream. + * Add patch fixing version string where applicable (EJAB-1484). + * Bump standards version to 3.9.2 + + [ Gerfried Fuchs ] + * Add recommended targets build-arch and build-indep to debian/rules. + * Fix spelling error in manpage noticed by lintian. + + -- Gerfried Fuchs Sun, 11 Sep 2011 16:16:55 +0200 + +ejabberd (2.1.6-2.1) unstable; urgency=high + + * Non-maintainer upload by the Security Team. + * Disable entity expansion completely to prevent against + billion laugs DoS attack (CVE-2011-1753). + + -- Nico Golde Mon, 30 May 2011 23:53:46 +0200 + +ejabberd (2.1.6-2) unstable; urgency=low + + * Artifically set HOME environment variable in debian/rules + if it is not set--this is required for the erlexec binary + to be able to run successfully (closes: #620683). + + -- Konstantin Khomoutov Wed, 06 Apr 2011 01:32:42 +0400 + +ejabberd (2.1.6-1) unstable; urgency=low + + * New upstream release. + * Remove obsolete patches. + * Update mod_admin_extra to revision 1106. + * Conflict with ejabberd-mod-shared-roster-ldap which is now included. + + -- Konstantin Khomoutov Tue, 14 Dec 2010 17:45:08 +0300 + +ejabberd (2.1.5-3) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Add patch http-poll-binary-parse.patch fixing EJAB-1325 (closes: #601094). + + -- Konstantin Khomoutov Sat, 23 Oct 2010 17:05:48 +0400 + +ejabberd (2.1.5-2) unstable; urgency=low + + [ Gerfried Fuchs ] + * New debconf translation: + - Danish by Joe Hansen (closes: #592271) + * Run debconf-updatepo on all other translations. + + [ Konstantin Khomoutov ] + * Remove /var/run/ejabberd on package purge (LP: #615473). + * Add mod-vcard-ldap-photo.patch fixing EJAB-1258 (LP: #613854). + * Bump standards version to 3.9.1. + + -- Gerfried Fuchs Wed, 15 Sep 2010 21:03:06 +0200 + +ejabberd (2.1.5-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + * Remove obsolete erlang-otp-r14-ssl.patch + * Refresh patches: reopen-log.patch, shared_roster_online.patch + shared_roster_recent.patch + * Bump standards version to 3.9.0. + * Remove COPYING file installed by upstream Makefile + * Remove autogenerated src/ejabberd.init + * Add upstream patch fixing EJAB-1284 (closes: #591431). + + -- Konstantin Khomoutov Tue, 03 Aug 2010 19:55:25 +0400 + +ejabberd (2.1.4-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Do not prevent ejabberd_debug from being installed and used + as this was implemented upstream as the default behavior. + * Add build dependency on erlang-parsetools. + * Add 'sharedscripts' option to logrotate config. + * Update VCS references in control file to point to git.deb.at. + * Add group sticky bit to permissions on the log directory -- + this should make log files owned by the group "adm". + * Explicitly set umask to 027 before starting erl. + * Add patch with fix for EJAB-953 (closes: #590389). + * Fix call to setup_ejabberd in postinst. + * Fix owner/permissions for log files when upgrading. + * Minor fixes and clarifications in ejabberdctl.8 manual page. + * Refresh reopen-log.patch + + -- Konstantin Khomoutov Mon, 26 Jul 2010 20:36:14 +0400 + +ejabberd (2.1.3-2) unstable; urgency=low + + [ Gerfried Fuchs ] + * New patch fix_examples fixing two example scripts. + * Call set -e explicitly in debian/config instead of on the hashbang line. + + [ Konstantin Khomoutov ] + * Add reopen-log.patch which fixes reopening of + ejabberd log files by `ejabberdctl reopen-log` (closes: #580951). + * Replace ${erlang-nox:Depends} with ${erlang:Depends} + in debian/control to generate a minimal list of Erlang + packages ejabberd depends on (closes: #581909). + * Reduce the set of Erlang packages required to build ejabberd. + * Disable ejabberd_debug module and exclude it from packaging. + + -- Gerfried Fuchs Thu, 20 May 2010 21:20:27 +0200 + +ejabberd (2.1.3-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + * Remove obsolete c2s-p1-fsm.patch + * Remove obsolete ejabberdctl-help-dashes.patch + * Update mod_admin_extra to revision 1078 + * Refresh shared_roster_recent.patch + * Refresh shared_roster_online.patch + * Clarify how to do mixed IPv4/IPv6 setup of ejabberd listeners + as suggested by Marc Dequènes in the discussion of #573801. + + [ Gerfried Fuchs ] + * Remove Torsten Werner from maintainer field on his own wish - thanks for + your work so far! (closes: #578722) + * Promote Konstantin to Maintainer to best fit reality. Enjoy. :) + + -- Konstantin Khomoutov Tue, 06 Apr 2010 13:00:03 +0400 + +ejabberd (2.1.2-3) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Tighten dependency on debhelper to >= 7.3~ + (closes: #569152). + * Add global option max_fsm_queue set to 1000 + to the configuration file (amendment to the fix for #568383). + * Use $remote_fs facility in init-script as ejabberd uses files + under /urs (fixes lintian error). + * Set place for Erlang crash dumps in ejabberdctl. + + [ Gerfried Fuchs ] + * Bump Standards-Version to 3.8.4. + + -- Konstantin Khomoutov Sun, 28 Feb 2010 22:11:26 +0300 + +ejabberd (2.1.2-2) unstable; urgency=high + + * Integrate upstream patches for EJAB-1173, + fixing CVE-2010-0305 (closes: #568383). + + -- Konstantin Khomoutov Thu, 04 Feb 2010 03:38:02 +0300 + +ejabberd (2.1.2-1) unstable; urgency=low + + [ Gerfried Fuchs ] + * New upstream release. + * Improve debian/copyright file. + + [ Konstantin Khomoutov ] + * Refresh shared_roster_online.patch and shared_roster_recent.patch + * Add ejabberdctl-help-dashes.patch which allows to spell commands + passed to `ejabberdctl help` using "-" as a word separator. + * Document connected-users-info and stop-kindly ejabberdctl commands. + * Document --concurrent option of ejabberdctl. + * Shorten Vcs-Browser string in debian/control + + -- Gerfried Fuchs Wed, 20 Jan 2010 20:56:15 +0100 + +ejabberd (2.1.1-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release. + This also fixes a bug in ejabberdctl (closes: #560824). + * Update mod_admin_extra to upstream revision 1049. + * Remove obsolete patches (those backported from 2.1.1). + * Suggest imagemagick instead of recommending it (closes: #560889). + + [ Gerfried Fuchs ] + * Switch Vcs-* fields to point to new git repository. All the conversion + work was actually done by Konstantin. + * Call debconf-updatepo. + + -- Gerfried Fuchs Thu, 14 Jan 2010 20:40:53 +0100 + +ejabberd (2.1.0-2) unstable; urgency=low + + [ Konstantin Khomoutov ] + * Set EJABBERD_DOC_PATH in the ejabberd script + * Pull the following patches from upstream: + - routing-speedup.patch: Speeds up routing of messages (EJAB-1114) + - mod-pubsub-odbc.patch: Fixes service discovery browsing with PEP-capable + clients (EJAB-1115) + - req-starttls-zlib-clash.patch: Fix failure of the c2s listener + (EJAB-1118, closes: 559727) + - http-tls-leaks.patch: Fix memory and port leaks in web administration + interface (EJAB-1119, closes: #547306) + - multiple-pep-last-items.patch: Do not send PEP last items multiple + times (EJAB-1116) + + -- Gerfried Fuchs Thu, 10 Dec 2009 23:45:09 +0100 + +ejabberd (2.1.0-1) unstable; urgency=low + + [ Konstantin Khomoutov ] + * New upstream release (Closes: #519858). + This also adds support for LDAPS upstream (Closes: #526145). + * Do not depend on cdbs anymore, port debian/rules to dh+quilt, + remove build dependency on patchutils, use erlang-depends. + * Bump debhelper version to 7, standards base to 3.8.3 + * Depend on erlang R13B. + * Recommend imagemagick (for captcha support). + * Remove deprecated patches (ssl.patch patch, dynamic_compile_loglevel.patch, + ldaps.patch, update.patch, proxy.patch, caps.patch, convert.patch, + s2s.patch). + * Replace mod_ctlextra with mod_admin_extra. + * Use upstream inetrc file. + * Bring debian/ejabberd.cfg and ejabberdctl in sync with upstream. + * Update ejabberdctl manual page. + * Provide NEWS file. + * Rework README.Debian: + * Group all information into sections. + * Describe issues with epam binary (Closes: #502791). + * Discuss how to use DBMS backends (Closes: #540915, #507144). + * Discuss upgrading from 2.0.x series. + * Implement PID file management (Closes: #519858). + * Make logrotate process all files matching "*.log". + * Improve init script: + * Make init script LSB-compliant. + * Implement "live" target which allows to run ejabberd in foreground. + * Make captcha.sh use bash explicitly. + * Rework node-generation for ejabberdctl to fix ejabberd's atom table + overflows while preserving the possibility to run several versions + of ejabberdctl concurrently as before. + * Add webadmin patch restoring compatibility with Erlang/OTP <= R12B-4. + * Integrate upstream patch for EJAB-1106. + * Add upstream patch for EJAB-1098. + * Add upstream patch for EJAB-1045. + * Add Konstantin Khomoutov to uploaders. + * Add Japanese debconf translation (thanks to Hideki Yamane) + (Closes: #558071). + + [ Gerfried Fuchs ] + * Build-Depend on po-debconf so po2debconf can be called. + + -- Gerfried Fuchs Fri, 04 Dec 2009 18:22:49 +0100 + +ejabberd (2.0.5-2) unstable; urgency=low + + * Added myself to Uploaders. + * Added debian/README.source about quilt. + * Updated Standards-Version to 3.8.2. + * Lintian hints: + + Remove +ssh from Vcs-Svn. + + Remove path from ejabberdctl in postinst. + * Rewrote Description a little bit. + + -- Gerfried Fuchs Fri, 07 Aug 2009 14:37:42 +0200 + +ejabberd (2.0.5-1.1) unstable; urgency=low + + * Non-maintainer upload to fix compatibility with Erlang/OTP R13B + (dynamic_compile_loglevel.patch added). + * Raise requirement for the erlang-dev package version to >= 1:13.b + to simplify transition of Debian to Erlang/OTP R13B. + + -- Konstantin Khomoutov Sun, 10 May 2009 01:32:38 +0400 + +ejabberd (2.0.5-1) unstable; urgency=high + + * new upstream release + - Fixes 'CVE-2009-0934: Cross-site scripting (XSS) vulnerability in + ejabberd' (Closes: #520852) + - Fixes 'starttls hangs' (Closes: #516528, #518079) + * Disable patch ldaps.patch because it does not apply any more. + * Refresh all other patches. + + -- Torsten Werner Sun, 05 Apr 2009 22:53:46 +0200 + +ejabberd (2.0.3-2) unstable; urgency=low + + * Remove Sergei from Uploaders field as requested by himself. + + -- Torsten Werner Sun, 15 Feb 2009 21:47:35 +0100 + +ejabberd (2.0.3-1) experimental; urgency=low + + * New upstream release. + + -- Sergei Golovan Thu, 15 Jan 2009 19:44:58 +0300 + +ejabberd (2.0.2-3) experimental; urgency=low + + * Merge changes from version 2.0.1-5 from unstable. + * Document ERL_OPTIONS in /etc/default/ejabberd and README.Debian. + (Closes: #503012) + + -- Torsten Werner Sun, 11 Jan 2009 17:19:28 +0100 + +ejabberd (2.0.2-2) experimental; urgency=low + + * Added option {keepalive, true} to ssl socket in LDAPS support patch. + This helps not to loose long-term connections to LDAPS server (thanks + to Alex Mauer for a suggestion). + + -- Sergei Golovan Fri, 12 Sep 2008 19:14:17 +0400 + +ejabberd (2.0.2-1) experimental; urgency=low + + * New upstream release. + * Protected hostname -s and hostname -d calls in postinst script to prevent + its failure in case when hostname is incorrectly configured. It's harmless + to replace hostname by "localhost" because it's used only for generating + a reference SSL certificate which is to be replaced by a proper one. + + -- Sergei Golovan Fri, 29 Aug 2008 21:15:26 +0400 + +ejabberd (2.0.1-6) unstable; urgency=high + + * Add backported patch pubsub_upgrade_tables.patch that fixes the broken + upgrade of ejabberd from Etch. (Closes: #507615) + + -- Torsten Werner Sat, 07 Feb 2009 20:02:20 +0100 + +ejabberd (2.0.1-5) unstable; urgency=low + + * Added Brazilian Portuguese debconf templates translation + (closes: #501751). + * Protected hostname -s and hostname -d calls in postinst script to prevent + its failure in case when hostname is incorrectly configured. It's harmless + to replace hostname by "localhost" because it's used only for generating + a reference SSL certificate which is to be replaced by a proper one. + * Added option {keepalive, true} to ssl socket in LDAPS support patch. + This helps not to loose long-term connections to LDAPS server (thanks + to Alex Mauer for a suggestion). + + -- Sergei Golovan Fri, 10 Oct 2008 09:48:34 +0400 + +ejabberd (2.0.1-4) unstable; urgency=low + + * Added Basque debconf templates translation (closes: #492129). + * Removed unneeded package grep-dctrl from build-dependencies (a call to + erlang-depends has replaced it long time ago). + * Updated Czech debconf templates translation (closes: #492495). + * Added a unique suffix to ejabberdctl nodes to allow several commands to + run in parallel. + * Fixed a bug in building mod_http_fileserver, which made it completely + unusable. + * Added missing description of reopen-weblog ejabberdctl command to + ejabberdctl.8 manpage. + + -- Sergei Golovan Mon, 04 Aug 2008 14:10:00 +0400 + +ejabberd (2.0.1-3) unstable; urgency=low + + [ Sergei Golovan ] + * Synced mod_ctlextra module with upstream (closes: #488991). + * Updated Portuguese debconf templates translation (closes: #487822). + * Switched off autoupdating debian/control by cdbs to make + build-dependencies consistent. + * Added Swedish debconf templates translation (closes: #490681). + * Updated Russian debconf templates translation (closes: #491424). + * Updated Spanish debconf templates translation. + * Added Galician debconf templates translation (closes: #490855). + * Added Vietnamese debconf templates translation (closes: #491056). + * Cleaned up LDAPS patch and fixed a bug with leaking SSL sockets + (closes: #490059). + * Don't return from init script until at least Erlang VM is started to make + subsequent checks for running ejabberd simpler. + * Added an additional check for starting Erlang VM and don't try to register + admin user if ejabberd isn't started. This allows to shorten waiting + interval during upgrade if it isn't desirable to start ejabberd + automatically (closes: #462357). + * Added Turkish debconf templates translation (closes: #491493). + * Added Finnish debconf templates translation (closes: #491652). + * Install SQL database schemas to examples directory. + * Fixed crash in checking relational DB modules (closes: #491664). + + [ Torsten Werner ] + * Updated German debconf templates translation. + + -- Sergei Golovan Wed, 23 Jul 2008 16:32:03 +0400 + +ejabberd (2.0.1-2) unstable; urgency=low + + * Improved a patch which removes message rejecting intervals for + server-to-server recipients. + * Bumped standards version to 3.8.0. + + -- Sergei Golovan Fri, 20 Jun 2008 10:07:29 +0400 + +ejabberd (2.0.1-1) unstable; urgency=low + + * New upstream bugfix release. + * Refreshed patches, removed those which were included into upstream. + * Added _2 suffix to get-orig-source target in debian/rules (temporarily). + * Fixed debian/watch to cover current release version (with _2 suffix). + * Fixed mod_ctlextra to work with ejabberd 2.0.1 (changed session record + definition). + * Added new ejabberdctl commands (both new in 2.0.1 and in mod_ctlextra) + to ejabberdctl manual page. + * Changed restart branch in init.d script to perform full Erlang VM stop + and start again (this allows to apply changes in /etc/default/ejabberd + if any during ejabberd restart). + * Clarified -sname and -name Erlang option usage by ejabberd and ejabberdctl + in their manual pages (closes: #482904). + * Added BUGS section to ejabberd manual page with a short description of + the most common cases of ejabberd start failures (closes: #481819). + + -- Sergei Golovan Sun, 08 Jun 2008 16:32:18 +0400 + +ejabberd (2.0.0-7) unstable; urgency=low + + [ Sergei Golovan ] + * Installed eldap.hrl header. It is necessary to build some external modules + for ejabberd. + * Moved headers which are in subdirectories of src directory to + corresponding subdirectory of /usr/lib/ejabberd/include/ as they are + usually included with subdirectory prepended. + * Included a patch which adds LDAPS support and added {ldap_encrypt} and + {ldap_port} example options to ejabberd config file (closes: #477918). + * Added an additional info on how to use ejabberd headers to README.Debian. + * Changed section in doc-base registration file to Network/Communication. + * Don't use HOSTNAME variable in postinstall and debconf config scripts to + prevent confusion with the same bash standard environment variable. + * Removed empty preinstall maintainer script. + * Fixed minus signs in ejabberd and ejabberdctl manual pages. + * Updated Russian debconf templates translation. + + [ Torsten Werner ] + * Updated German debconf templates translation. + * Update Vcs headers in debian/control. + + -- Sergei Golovan Sat, 17 May 2008 23:30:17 +0400 + +ejabberd (2.0.0-6) unstable; urgency=low + + * Replaced a patch for proxy65 module with nicer one (thanks to Evgeniy + Khramtsov). + * Added a patch for S2S module to make STARTTLS working with Erlang R12B. + * Added a patch by upstream fixes crash when browsing the Update page in + Erlang R12B. + * Fixed ODBC patch to work with Erlang R11B also. + + -- Sergei Golovan Tue, 11 Mar 2008 15:10:42 +0300 + +ejabberd (2.0.0-5) experimental; urgency=low + + * Turned unnecessary error messages in mod_caps module into debug messages. + * Added a few patches to shared roster module and also added mod_ctlextra + (a module which offers many more or less useful commands to ejabberdctl) + following the discussion in the following thread: + http://lists.debian.org/debian-edu/2008/03/msg00017.html + + -- Sergei Golovan Fri, 07 Mar 2008 20:30:07 +0300 + +ejabberd (2.0.0-4) experimental; urgency=low + + * Updated French debconf templates translation (closes: #468788). + * Disabled epoll by default in /etc/default/ejabberd. + * Increased default maximum number of conference room occupants to 500. + Given increasing popularity of XMPP old default value 200 is too low. + * Disabled SMP support in ejabberd by default. It isn't necessary in most + cases but can be less reliable. + * Enabled PAM authentication support (yet needs to be refined). + + -- Sergei Golovan Mon, 03 Mar 2008 22:54:48 +0300 + +ejabberd (2.0.0-3) experimental; urgency=low + + * Increased S2S timeouts. Defaults seems to be too short. + * Removed a 5-minute delay between a remote server connect failure and the + next connection attempt. It causes more harm than good. + * Changed ownership of ejabberd config directory and SSL certificate to + root:ejabberd and mode to to make sure they aren't overwritten by running + ejabberd. + * Remove an SSL certificate on package purge. It is assumed that it's a + generated certificate, so the removal is unconditional. + + -- Sergei Golovan Sun, 24 Feb 2008 10:40:03 +0300 + +ejabberd (2.0.0-2) experimental; urgency=low + + * Saved a little bit of resources by not starting ssl module which isn't + used by ejabberd anymore. + * Added several new variables to ejabberd script and default settings + following upstream. + * Added 'debug' option to ejabberdctl script which attaches Erlang shell to + already running ejabberd server. + * Removed useless README and /etc/ejabberd/ejabberdctl.cfg files from the + binary package (/etc/ejabberd/ejabberdctl.cfg content is moved to + /etc/default/ejabberd). + * Added a patch which makes proxy65 module working with Erlang R12B. + * Fixed position of override section in ejabberd.cfg and uncommented proxy65 + module (with adding restrictive options). + + -- Sergei Golovan Fri, 22 Feb 2008 13:51:14 +0300 + +ejabberd (2.0.0-1) experimental; urgency=low + + * New upstream release. + + -- Sergei Golovan Thu, 21 Feb 2008 18:36:46 +0300 + +ejabberd (1.1.4-6) unstable; urgency=low + + * Loosened build dependencies to make backporting to etch easier. + * Added a requirement for $remote_fs into init.d script because ejabberd + needs mounted /usr to run. + * Added a patch which allows ODBC to work with Erlang R12B. + * Clarified debconf messages (closes: #390206). + * Added a notice about hostname change to README.Debian and included erlang + node conversion utility to the binary package (closes: #457097). + * Added a patch which allows to use certificate chain files for encrypted + connections (closes: #466676). + + -- Sergei Golovan Thu, 21 Feb 2008 18:21:32 +0300 + +ejabberd (1.1.4-5) unstable; urgency=low + + * Do not remove /etc/ejabberd on package purge to preserve user files if + any (closes: #460459). + * Bumped standards version to 3.7.3. + * Added homepage header to debian control file. + * Fixed unnecessary space in doc-base. + * Changed default setting for nicknames which can be registered to 'none' + (which effectively forbids registration) as this setting is more safe + (closes: #458627). + * Fixed name section of ejabberd and ejabberdctl manual pages. + + -- Sergei Golovan Sun, 13 Jan 2008 01:37:19 +0300 + +ejabberd (1.1.4-4) unstable; urgency=low + + * Added a patch which fixes access rule check in mod_irc. + * Added a patch which fixes ejabberd build using erlang R12B-0. + * Increased number of erlang ports in /etc/ejabberd/default. The default + value of 1024 allows too few simultaneous connections (from 300 to 500 + for both clients and servers depending of whether they use SSL or traffic + compression). + * Fixed shell backquotes in ejabberd and ejabberdctl manual pages. Also + bumped their versions to 1.1.4. + * Added a note about binding to privileged ports to README.Debian. + * Fixed a race condition between starting log handler and port listener. + Otherwise, error reports about port binding can't get into log file + (closes: #458518). + + -- Sergei Golovan Tue, 01 Jan 2008 17:09:57 +0300 + +ejabberd (1.1.4-3) unstable; urgency=low + + * Applied a patch by upstream which fixes usage of relational databases in + ejabberd modules while using internal or LDAP-based authentication + (closes: #446848). The patch was adopted from ejabberd SVN by Andreas + Oberritter. + + -- Sergei Golovan Tue, 16 Oct 2007 10:34:07 +0400 + +ejabberd (1.1.4-2) unstable; urgency=low + + * Moved ejabberd application directory from + /usr/lib/erlang/lib/ejabberd-1.1.4 to /usr/lib/ejabberd to avoid conflicts + of modules names (specifically, eldap module conflicts with shiiped in Yxa + SIP server). + + -- Sergei Golovan Fri, 12 Oct 2007 10:07:19 +0400 + +ejabberd (1.1.4-1) unstable; urgency=low + + * New upstream release. + * Fixed debian/watch file. + * Removed ejabberd_sm.diff patch. This makes ejabberd using recommended + error condition instead of + . There was sufficient time to fix broken + clients. + * Removed perl-path.diff, shaper.diff, ejabberd_http_poll.diff, eldap.diff, + sql_escape.diff patches since they are included into upstream release. + * Redefined HOME environment variable to fix Erlang compiler warnings in + case when HOME points to an existent inaccessible directory. + * Bumped debhelper compatibility level to 5. + + -- Sergei Golovan Sun, 09 Sep 2007 14:25:16 +0400 + +ejabberd (1.1.2-10) unstable; urgency=low + + [ Sergei Golovan ] + * Added Sergei Golovan to uploaders list. + * Included a fix for IE bug (it sends zero length queries which cause + error 404) from http://www.jabber.ru/bugzilla/attachment.cgi?id=205 + (closes: #428864). + * Included experimental Personal Eventing via Pubsub (XEP-0163) support + using patch from https://svn.process-one.net/ejabberd-modules/pep/. + + -- Sergei Golovan Mon, 27 Aug 2007 20:19:43 +0400 + +ejabberd (1.1.2-9) unstable; urgency=low + + [ Sergei Golovan ] + * Added binary package dependency on erlang-abi-* virtual package to + prevent installation of ejabberd which uses incompatible erlang ABI. + * Included ejabberd headers to binary package to make building external + modules for ejabberd possible (closes: #428081). + + -- Torsten Werner Sun, 10 Jun 2007 19:19:20 +0400 + +ejabberd (1.1.2-8) unstable; urgency=high + + [ Torsten Werner ] + * Remove redundant Build-Depends. + * Use erlang-depends for calculating Depends now. + * Change email address of Christophe Romain in man page as requested by + himself. + * Add XS-X-Vcs-Svn header to debian/control. + + [ Sergei Golovan ] + * Security fix, mentioned in 1.1.2-5 was backported from SVN and not + from 1.1.3, where it is incomplete (the bug affects ejabberd only if + users' rosters are stored in relational database, and not in Mnesia, + which is default). + * Moved patches to debian directory. This fixes cleaning up + after build process. (Closes: #424193) + * Moved creating user ejabberd from preinst to postinst because preinst + cannot rely on existence of adduser package. + * Added a comment to ejabberd.cfg concerning UTF-8 encoding. + * Unfuzzied one string in russian debconf translation (closes: #408410). + * Removed annoying message about existing SSL certificate. + * Fixed references to ejabberd installation and operation guide in manual + pages (closes: #416050). + * Backup ejabberd database on package removal or upgrade to a subdirectory + of /var/backups instead of /var/tmp (closes: #409916). + * Do not change /etc/ejabberd, /var/lib/ejabberd and /var/log/ejabberd + ownership and permissions if they are overridden using dpkg-statoverride + (closes: #416178). + * Conditionally source /usr/share/debconf/confmodule in postrm script as + debconf isn't an essential package (closes: #416743). + * Included Portuguese translation of debconf messages (closes: #416779). + + -- Torsten Werner Fri, 18 May 2007 13:44:53 +0200 + +ejabberd (1.1.2-7) unstable; urgency=low + + * Rebuild the package with newer erlang. + + -- Torsten Werner Fri, 13 Apr 2007 20:14:12 +0200 + +ejabberd (1.1.2-6) unstable; urgency=high + + [ Sergei Golovan ] + * Fixed users database and logs directoriy permissions (closes: #412583). + + -- Torsten Werner Tue, 27 Feb 2007 08:28:31 +0300 + +ejabberd (1.1.2-5) unstable; urgency=high + + * apply security fix backported from version 1.1.3 + (http://ejabberd.jabber.ru/ejabberd-1.1.3); thanks to Sergei + + -- Torsten Werner Sat, 3 Feb 2007 23:08:08 +0100 + +ejabberd (1.1.2-4) unstable; urgency=medium + + [ Sergei Golovan ] + * Fixed bug with LDAP support, thanks to Evgeniy Khramtsov. (Closes: #399659) + * Documented quilt patches in patches/ directory. + + -- Torsten Werner Wed, 22 Nov 2006 13:44:13 +0300 + +ejabberd (1.1.2-3) unstable; urgency=low + + * Add patch http_bind.diff, thanks to Matthew Harrell. (Closes: #399560) + * Updated debian/control from debian/control.in. + + -- Torsten Werner Mon, 20 Nov 2006 20:11:08 +0100 + +ejabberd (1.1.2-2) unstable; urgency=medium + + [ Sergei Golovan ] + * backported bugfix for HTTP-polling from the ejabberd author + + [ Torsten Werner ] + * Set urgency to medium. + + -- Torsten Werner Sun, 8 Oct 2006 11:32:25 +0200 + +ejabberd (1.1.2-1) unstable; urgency=low + + [ Sergei Golovan ] + * new upstream release + * added spanish translation + * removed no longer needed mod_muc_log patch + * added variable ERLANG_NODE, which allows to override default + ejabberd node, to /etc/default/ejabberd file + * changed erlang node selection by ejabberdctl (in some cases + `hostname -s` and erlang's view of hostname are different, so + let ejabberd_ctl module find hostname), closes: #389635 + * documented ERLANG_NODE variable in ejabberd and ejabberdctl manual + pages + * explicitly specify hostname in admin ACL + * improved admin user registering in debian/postinst. installation + is not interrupted if the user can't be registered, so, closes: #385020 + * only call ucf and deluser on purge when they are available, + closes: #389756 + * added check for running ejabberd before backup in debian/prerm, + closes: #389757 + * added workaround for centericq users (replaced fetaure-not-implemented + error for service-unavailable in session management) + * backported bugfix for shapers from ejabberd SVN + + -- Torsten Werner Wed, 04 Oct 2006 08:00:46 +0400 + +ejabberd (1.1.1-9) unstable; urgency=low + + [ Miroslav Kure ] + * updated czech translation + + [ Sergei Golovan ] + * replaced 'note' type in debconf template ejabberd/nomatch by 'error' + since it is more approppriate, closes: #388890 + + -- Torsten Werner Sat, 23 Sep 2006 10:42:03 +0400 + +ejabberd (1.1.1-8) unstable; urgency=medium + + [ Sergei Golovan ] + * security fix! fixed vulnerability in mod_muc_log where users were + able to insert an HTML code to MUC weblogs (fix is backported from + ejabberd SVN) + * added LSB keyword section to init.d script + + [ Torsten Werner ] + * setting urgency to medium because of a securetty issue + + -- Torsten Werner Thu, 14 Sep 2006 07:20:39 +0200 + +ejabberd (1.1.1-7) unstable; urgency=low + + * updated french translation, closes: #385811 + * bugfix in postrm + + -- Torsten Werner Sun, 10 Sep 2006 02:27:19 +0200 + +ejabberd (1.1.1-6) unstable; urgency=low + + * add french translation, closes: #381900 + * add czech translation, closes: #380525 + * add dutch translation, closes: #381131 + * updated debconf question ejabberd/user + * fix in debian/config + * make a backup of the database when removing or updating the package + * remove the actual database when purging + + -- Torsten Werner Wed, 2 Aug 2006 15:20:14 +0200 + +ejabberd (1.1.1-5) unstable; urgency=low + + [ Torsten Werner ] + * add target get-orig-source in debian/rules + * updated Standards-Version to 3.7.2, no changes needed + * use ucf for handling conffiles + * remove old cruft not needed any more + * use debconf to setup an admin account, partially fixes: #286110 + * make bashism explicit + * minor cleanups in debian/rules + * renamed some files in debian/ + * add german translation of the debconf template + + [ Sergei Golovan ] + * use debconf to setup a served hostname + * added russian translation of the debconf template + + -- Torsten Werner Sun, 23 Jul 2006 12:12:12 +0400 + +ejabberd (1.1.1-4) unstable; urgency=low + + * updated Build-Depends for erlang 10.b.10 + * switched to quilt for managing upstream patches + + -- Torsten Werner Sat, 24 Jun 2006 21:06:59 +0200 + +ejabberd (1.1.1-3) unstable; urgency=low + + [ Sergei Golovan ] + * moved ejabberd SSL certificate from /etc/ssl/certs to /etc/ejabberd, + closes: #368414 + + [ Torsten Werner ] + * upload to unstable + + -- Torsten Werner Sat, 10 Jun 2006 18:13:34 +0200 + +ejabberd (1.1.1-2) experimental; urgency=low + + [ Sergei Golovan ] + * changed Build-Depends from erlang-base-hipe to erlang-base + * fix for lintian complaint about incorrect usage of chown + + [ Torsten Werner ] + * making Build-Depends and erlang:Depends more strict: they are working now + only with the latest versions of erlang + + -- Torsten Werner Tue, 2 May 2006 21:00:47 +0200 + +ejabberd (1.1.1-1) experimental; urgency=low + + * New upstream release + * applied changes from Sergei Golovan + * removed src/Makefile.in from Debians SVN because the changes have been + included upstream + + -- Torsten Werner Mon, 1 May 2006 19:36:19 +0200 + +ejabberd (1.0.0-2) unstable; urgency=low + + * downgraded erlang-Depends to erlang-runtime, closes: #361739 + + -- Torsten Werner Mon, 10 Apr 2006 20:52:45 +0200 + +ejabberd (1.0.0-1) unstable; urgency=low + + * new upstream release, closes: #344330, #353989 + - Server-to-server Encryption for Enhanced Security: STARTTLS + + SASL_EXTERNAL and STARTTLS + Dialback. + - Different certificates can be defined for each virtual host. + - Shared Roster groups support has been enhanced. New is the ability to + add all registered users to a Shared Roster group. + - Improved ODBC support. + - Support for vCard storage in ODBC has been added. + - New tool to convert an Mnesia-based installation to an ODBC compatible + relational database. + - Native PostgreSQL support. + - More XHTML 1.0 Transitional compliancy work is included. + - Documentation has been extended to cover more topics. + + -- Torsten Werner Sun, 5 Mar 2006 10:20:50 +0100 + +ejabberd (0.9.8-1) unstable; urgency=low + + * new upstream version + * added debian/watch + * merged some documentation and configuration fixes from Sergei Golovan + + + -- Torsten Werner Sat, 6 Aug 2005 19:39:59 +0200 + +ejabberd (0.9.1-2) unstable; urgency=low + + * some fixes to the german translation, thanks to Patrick Dreker + for pointing that out, closes: #317955 + + -- Torsten Werner Wed, 13 Jul 2005 21:53:16 +0200 + +ejabberd (0.9.1-1) unstable; urgency=low + + * New upstream release, closes: #309526 + * added --enable-odbc to configure + * small fix to init script + * thanks to Sergei Golovan for helping + + -- Torsten Werner Wed, 25 May 2005 23:55:28 +0200 + +ejabberd (0.9-2) unstable; urgency=low + + * smoothed the upgrade procedure from 0.7.5 + * added custom inetrc file (erlang R10 doesn't load /etc/resolv.conf when + running in -sname mode, making resolving of SRV record impossible), + thanks to Sergej Golovan, closes: #299533 + * updated homepage + + -- Torsten Werner Wed, 18 May 2005 00:16:22 +0200 + +ejabberd (0.9-1) unstable; urgency=low + + * new upstream version, closes: #307652 + + -- Torsten Werner Tue, 10 May 2005 22:04:03 +0200 + +ejabberd (0.7.5-7) unstable; urgency=low + + * can build now with various erlang versions because of buggy erlang on arm + + -- Torsten Werner Sat, 8 Jan 2005 23:34:27 +0100 + +ejabberd (0.7.5-6) unstable; urgency=low + + * changed to versioned (Build-)Depends: erlang (>= 1:10), closes: #282836 + * fixed error in init script, closes: #283205 + * scripts ejabberd and ejabberdctl export $HOME environment variable now + * usage message for ejabberdctl updated to reflect the different call syntax + thanks to Sergei Golovan (both changes) + * updated the Description proposed by Andreas van Cranenburgh + + -- Torsten Werner Tue, 30 Nov 2004 22:05:28 +0100 + +ejabberd (0.7.5-5) unstable; urgency=low + + * renamed debian/control to debian/control.in and changed Build-Depends: + @cdbs@ + + -- Torsten Werner Fri, 19 Nov 2004 23:58:01 +0100 + +ejabberd (0.7.5-4) unstable; urgency=low + + * switched to cdbs + * fixed perl script and added Suggests: libunix-syslog-perl + + -- Torsten Werner Thu, 18 Nov 2004 15:48:36 +0100 + +ejabberd (0.7.5-3) unstable; urgency=low + + * changed maintainer to myself + + -- Torsten Werner Wed, 17 Nov 2004 19:23:08 +0100 + +ejabberd (0.7.5-2) unstable; urgency=low + + * fixed doc-base file + * initial upload based on Sergei's work + + -- Torsten Werner Wed, 3 Nov 2004 21:43:58 +0100 + +ejabberd (0.7.5-1) unstable; urgency=low + + * new upstream release (highlights: new tls module, starttls, + improvements in admiin web interface, bugfixes) + * improved init.d script + + -- Sergei Golovan Sun, 10 Oct 2004 21:44:25 +0400 + +ejabberd (0.7-2) unstable; urgency=low + + * workaround for mnesia issue in mod_last + + -- Sergei Golovan Wed, 14 Jul 2004 01:43:13 +0400 + +ejabberd (0.7-1) unstable; urgency=low + + * new upstream release + + -- Sergei Golovan Tue, 13 Jul 2004 20:35:29 +0400 + +ejabberd (0.6-alpha-20040522-4) unstable; urgency=low + + * fixed icq.localhost entry in config file + * added example options to config file + + -- Sergei Golovan Thu, 17 Jun 2004 00:23:32 +0400 + +ejabberd (0.6-alpha-20040522-3) unstable; urgency=low + + * fixed comments in config file + + -- Sergei Golovan Wed, 16 Jun 2004 21:10:13 +0400 + +ejabberd (0.6-alpha-20040522-2) unstable; urgency=low + + * added comments to config file + + -- Sergei Golovan Sun, 13 Jun 2004 13:24:58 +0400 + +ejabberd (0.6-alpha-20040522-1) unstable; urgency=low + + * new upstream CVS snapshot + * updated manual pade for ejabberdctl + + -- Sergei Golovan Sun, 30 May 2004 09:36:59 +0400 + +ejabberd (0.6-alpha-20040417-1) unstable; urgency=low + + * initial prerelease from upstream CVS snapshot + + -- Sergei Golovan Sun, 25 Apr 2004 16:39:22 +0400 + --- ejabberd-2.1.10.orig/debian/templates +++ ejabberd-2.1.10/debian/templates @@ -0,0 +1,34 @@ +Template: ejabberd/hostname +Type: string +Default: localhost +_Description: The name of the host ejabberd will serve: + Please enter the hostname of your Jabber server (in lowercase). + +Template: ejabberd/user +Type: string +_Description: The username of an admin account for ejabberd: + Please provide the name of an account to administrate the ejabberd server. + After the installation of ejabberd you can use this account to log in with any + Jabber client to do administrative tasks or go to + http://${hostname}:5280/admin/ and log in with this account to enter the admin + interface. Enter the username part here (e.g. ${user}), but use the full Jabber + ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; otherwise it + will fail. + . + Leave empty if you don't want to create an admin account automatically. + +Template: ejabberd/password +Type: password +_Description: The password for the admin account: + Please enter the password for the administrative user. + +Template: ejabberd/verify +Type: password +_Description: The password for the admin account again for verification: + Please reenter the password for the administrative user for verification. + +Template: ejabberd/nomatch +Type: error +_Description: The passwords do not match! + The passwords you have typed do not match. Please try again. + --- ejabberd-2.1.10.orig/debian/config +++ ejabberd-2.1.10/debian/config @@ -0,0 +1,49 @@ +#!/bin/sh + +set -e + +get_passwd() +{ + db_input medium ejabberd/password || true + db_input medium ejabberd/verify || true + db_go || true + db_get ejabberd/password + PASSWORD="$RET" + db_get ejabberd/verify + VERIFY="$RET" + if [ "$PASSWORD" != "$VERIFY" ]; then + db_input medium ejabberd/nomatch || true + db_go || true + get_passwd + fi +} + +get_credentials() +{ + db_get ejabberd/user + USER=${RET:-admin} + db_subst ejabberd/user user "$USER" + db_get ejabberd/hostname + HOST=${RET:-hostname} + db_subst ejabberd/user hostname "$HOST" + db_input medium ejabberd/user || true + db_go || true + db_get ejabberd/user + if [ -n "$RET" ]; then + get_passwd + fi +} + +# Source debconf library. +. /usr/share/debconf/confmodule + +db_input medium ejabberd/hostname || true +db_go || true + +FLAG="/var/lib/ejabberd/.admin_registered" +if [ ! -f $FLAG ]; then + get_credentials +fi + +exit 0 + --- ejabberd-2.1.10.orig/debian/patches/fix-parsing-split-https-requests.patch +++ ejabberd-2.1.10/debian/patches/fix-parsing-split-https-requests.patch @@ -0,0 +1,312 @@ +Description: Fix parsing HTTPS requests split into multiple packets + This fixes case when SockMod:recv() calls returns only + part of first line of http request (GET/POST/OPTION/HEAD line). + Before that change request like that (and if keep-alive was active, + all further request) were dropped. + + The patch extracted from the upstream commit has been slightly + massaged to apply cleanly to the stock 2.1.10 source code. +Origin: upstream, https://github.com/processone/ejabberd/commit/5f828467327bbd0fb8df6afc20559c2208bc0603 +Bug-ProcessOne: https://support.process-one.net/browse/EJAB-1537 +Applied-Upstream: 2.1.11 +Last-Update: 2013-02-17 +--- a/src/web/ejabberd_http.erl ++++ b/src/web/ejabberd_http.erl +@@ -65,7 +65,7 @@ + request_tp, + request_headers = [], + end_of_request = false, +- trail = "" ++ trail = <<>> + }). + + +@@ -164,12 +164,12 @@ + exit(normal) + end. + +-receive_headers(State) -> ++receive_headers(#state{trail=Trail} = State) -> + SockMod = State#state.sockmod, + Socket = State#state.socket, + Data = SockMod:recv(Socket, 0, 300000), + case State#state.sockmod of +- gen_tcp -> ++ gen_tcp -> + NewState = process_header(State, Data), + case NewState#state.end_of_request of + true -> +@@ -177,31 +177,35 @@ + _ -> + receive_headers(NewState) + end; +- _ -> +- case Data of +- {ok, Binary} -> +- {Request, Trail} = parse_request( +- State, +- State#state.trail ++ binary_to_list(Binary)), +- State1 = State#state{trail = Trail}, +- NewState = lists:foldl( +- fun(D, S) -> +- case S#state.end_of_request of +- true -> +- S; +- _ -> +- process_header(S, D) +- end +- end, State1, Request), +- case NewState#state.end_of_request of +- true -> +- ok; +- _ -> +- receive_headers(NewState) +- end; ++ _ -> ++ case Data of ++ {ok, D} -> ++ parse_headers(State#state{trail = <>}); ++ {error, _} -> ++ ok ++ end ++ end. ++ ++parse_headers(#state{trail = <<>>} = State) -> ++ receive_headers(State); ++parse_headers(#state{request_method = Method, trail = Data} = State) -> ++ PktType = case Method of ++ undefined -> http; ++ _ -> httph ++ end, ++ case decode_packet(PktType, Data) of ++ {ok, Pkt, Rest} -> ++ NewState = process_header(State#state{trail = Rest}, {ok, Pkt}), ++ case NewState#state.end_of_request of ++ true -> ++ ok; + _ -> +- ok +- end ++ parse_headers(NewState) ++ end; ++ {more, _} -> ++ receive_headers(State#state{trail = Data}); ++ _ -> ++ ok + end. + + process_header(State, Data) -> +@@ -506,16 +510,16 @@ + binary_to_list(list_to_binary(Acc)); + recv_data(State, Len, Acc) -> + case State#state.trail of +- [] -> +- case (State#state.sockmod):recv(State#state.socket, Len, 300000) of ++ <<>> -> ++ case (State#state.sockmod):recv(State#state.socket, Len, 300000) of + {ok, Data} -> + recv_data(State, Len - size(Data), [Acc | [Data]]); + _ -> + "" + end; + _ -> +- Trail = State#state.trail, +- recv_data(State#state{trail = ""}, Len - length(Trail), [Acc | Trail]) ++ Trail = binary_to_list(State#state.trail), ++ recv_data(State#state{trail = <<>>}, Len - length(Trail), [Acc | Trail]) + end. + + +@@ -796,7 +800,7 @@ + decode_base64([]) -> + []; + decode_base64([Sextet1,Sextet2,$=,$=|Rest]) -> +- Bits2x6= ++ Bits2x6= + (d(Sextet1) bsl 18) bor + (d(Sextet2) bsl 12), + Octet1=Bits2x6 bsr 16, +@@ -906,42 +910,29 @@ + + % The following code is mostly taken from yaws_ssl.erl + +-parse_request(State, Data) -> +- case Data of +- [] -> +- {[], []}; +- _ -> +- ?DEBUG("GOT ssl data ~p~n", [Data]), +- {R, Trail} = case State#state.request_method of +- undefined -> +- {R1, Trail1} = get_req(Data), +- ?DEBUG("Parsed request ~p~n", [R1]), +- {[R1], Trail1}; +- _ -> +- {[], Data} +- end, +- {H, Trail2} = get_headers(Trail), +- {R ++ H, Trail2} ++decode_packet(_, <<"\r\n", Rest/binary>>) -> ++ {ok, http_eoh, Rest}; ++decode_packet(Type, Data) -> ++ case binary:match(Data, <<"\r\n">>) of ++ {Start, _Len} -> ++ <> = Data, ++ Line = binary_to_list(LineB), ++ Result = case Type of ++ http -> ++ parse_req(Line); ++ httph -> ++ parse_line(Line) ++ end, ++ case Result of ++ {ok, H} -> ++ {ok, H, Rest}; ++ Err -> ++ {error, Err} ++ end; ++ _ -> ++ {more, undefined} + end. + +-get_req("\r\n\r\n" ++ _) -> +- bad_request; +-get_req("\r\n" ++ Data) -> +- get_req(Data); +-get_req(Data) -> +- {FirstLine, Trail} = lists:splitwith(fun not_eol/1, Data), +- R = parse_req(FirstLine), +- {R, Trail}. +- +- +-not_eol($\r)-> +- false; +-not_eol($\n) -> +- false; +-not_eol(_) -> +- true. +- +- + get_word(Line)-> + {Word, T} = lists:splitwith(fun(X)-> X /= $\ end, Line), + {Word, lists:dropwhile(fun(X) -> X == $\ end, T)}. +@@ -1012,68 +1003,54 @@ + end. + + +-get_headers(Tail) -> +- get_headers([], Tail). +- +-get_headers(H, Tail) -> +- case get_line(Tail) of +- {incomplete, Tail2} -> +- {H, Tail2}; +- {line, Line, Tail2} -> +- get_headers(H ++ parse_line(Line), Tail2); +- {lastline, Line, Tail2} -> +- {H ++ parse_line(Line) ++ [{ok, http_eoh}], Tail2} +- end. +- +- + parse_line("Connection:" ++ Con) -> +- [{ok, {http_header, undefined, 'Connection', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Connection', undefined, strip_spaces(Con)}}; + parse_line("Host:" ++ Con) -> +- [{ok, {http_header, undefined, 'Host', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Host', undefined, strip_spaces(Con)}}; + parse_line("Accept:" ++ Con) -> +- [{ok, {http_header, undefined, 'Accept', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Accept', undefined, strip_spaces(Con)}}; + parse_line("If-Modified-Since:" ++ Con) -> +- [{ok, {http_header, undefined, 'If-Modified-Since', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'If-Modified-Since', undefined, strip_spaces(Con)}}; + parse_line("If-Match:" ++ Con) -> +- [{ok, {http_header, undefined, 'If-Match', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'If-Match', undefined, strip_spaces(Con)}}; + parse_line("If-None-Match:" ++ Con) -> +- [{ok, {http_header, undefined, 'If-None-Match', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'If-None-Match', undefined, strip_spaces(Con)}}; + parse_line("If-Range:" ++ Con) -> +- [{ok, {http_header, undefined, 'If-Range', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'If-Range', undefined, strip_spaces(Con)}}; + parse_line("If-Unmodified-Since:" ++ Con) -> +- [{ok, {http_header, undefined, 'If-Unmodified-Since', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'If-Unmodified-Since', undefined, strip_spaces(Con)}}; + parse_line("Range:" ++ Con) -> +- [{ok, {http_header, undefined, 'Range', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Range', undefined, strip_spaces(Con)}}; + parse_line("User-Agent:" ++ Con) -> +- [{ok, {http_header, undefined, 'User-Agent', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'User-Agent', undefined, strip_spaces(Con)}}; + parse_line("Accept-Ranges:" ++ Con) -> +- [{ok, {http_header, undefined, 'Accept-Ranges', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Accept-Ranges', undefined, strip_spaces(Con)}}; + parse_line("Authorization:" ++ Con) -> +- [{ok, {http_header, undefined, 'Authorization', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Authorization', undefined, strip_spaces(Con)}}; + parse_line("Keep-Alive:" ++ Con) -> +- [{ok, {http_header, undefined, 'Keep-Alive', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Keep-Alive', undefined, strip_spaces(Con)}}; + parse_line("Referer:" ++ Con) -> +- [{ok, {http_header, undefined, 'Referer', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Referer', undefined, strip_spaces(Con)}}; + parse_line("Content-type:"++Con) -> +- [{ok, {http_header, undefined, 'Content-Type', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Content-Type', undefined, strip_spaces(Con)}}; + parse_line("Content-Type:"++Con) -> +- [{ok, {http_header, undefined, 'Content-Type', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Content-Type', undefined, strip_spaces(Con)}}; + parse_line("Content-Length:"++Con) -> +- [{ok, {http_header, undefined, 'Content-Length', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Content-Length', undefined, strip_spaces(Con)}}; + parse_line("Content-length:"++Con) -> +- [{ok, {http_header, undefined, 'Content-Length', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Content-Length', undefined, strip_spaces(Con)}}; + parse_line("Cookie:"++Con) -> +- [{ok, {http_header, undefined, 'Cookie', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Cookie', undefined, strip_spaces(Con)}}; + parse_line("Accept-Language:"++Con) -> +- [{ok, {http_header, undefined, 'Accept-Language', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Accept-Language', undefined, strip_spaces(Con)}}; + parse_line("Accept-Encoding:"++Con) -> +- [{ok, {http_header, undefined, 'Accept-Encoding', undefined, strip_spaces(Con)}}]; ++ {ok, {http_header, undefined, 'Accept-Encoding', undefined, strip_spaces(Con)}}; + parse_line(S) -> + case lists:splitwith(fun(C)->C /= $: end, S) of + {Name, [$:|Val]} -> +- [{ok, {http_header, undefined, Name, undefined, strip_spaces(Val)}}]; ++ {ok, {http_header, undefined, Name, undefined, strip_spaces(Val)}}; + _ -> +- [] ++ bad_request + end. + + +@@ -1109,27 +1086,3 @@ + YS + end. + +-is_nb_space(X) -> +- lists:member(X, [$\s, $\t]). +- +- +-% ret: {line, Line, Trail} | {lastline, Line, Trail} +- +-get_line(L) -> +- get_line(L, []). +-get_line("\r\n\r\n" ++ Tail, Cur) -> +- {lastline, lists:reverse(Cur), Tail}; +-get_line("\r\n" ++ Tail, Cur) -> +- case Tail of +- [] -> +- {incomplete, lists:reverse(Cur) ++ "\r\n"}; +- _ -> +- case is_nb_space(hd(Tail)) of +- true -> %% multiline ... continue +- get_line(Tail, [$\n, $\r | Cur]); +- false -> +- {line, lists:reverse(Cur), Tail} +- end +- end; +-get_line([H|T], Cur) -> +- get_line(T, [H|Cur]). --- ejabberd-2.1.10.orig/debian/patches/captcha.patch +++ ejabberd-2.1.10/debian/patches/captcha.patch @@ -0,0 +1,20 @@ +Makes the captcha script explicitly request bash as it uses +its special variable "RANDOM" which is not defined by POSIX. + +The issue is tracked upstream at +https://support.process-one.net/browse/EJAB-1105 + +While it will be sensible to incorporate the upstream fix +(which will make the script work in POSIX-compliant shells also), +until bash is required in Debian, this patch is OK. + +diff --git a/tools/captcha.sh b/tools/captcha.sh +index 4d40567..d68edfa 100755 +--- a/tools/captcha.sh ++++ b/tools/captcha.sh +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + INPUT=$1 + --- ejabberd-2.1.10.orig/debian/patches/disable-ssl2.patch +++ ejabberd-2.1.10/debian/patches/disable-ssl2.patch @@ -0,0 +1,36 @@ +Description: Disable SSLv2 in the TLS driver + SSL 2.0 is not used anywhere as it has security problems. + Disable it unconditionally both in server and client mode. + This does not disable support for SSL 2.0 compatible client + hello which still will be accepted in the server mode. + . + This patch is a backport of changes introduced by the commit + e06c1c49c14c3f56cf4ddae080514f7802669335 in the upstream Git repository + to the ejabberd code base as of version 2.1.12. +Author: Janusz Dziemidowicz +Forwarded: not-needed +Last-Update: 2013-09-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/tls/tls_drv.c ++++ b/src/tls/tls_drv.c +@@ -354,6 +354,8 @@ static ErlDrvSSizeT tls_drv_control(ErlDrvData handle, + res = SSL_CTX_check_private_key(ctx); + die_unless(res > 0, "SSL_CTX_check_private_key failed"); + ++ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET); ++ + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); + SSL_CTX_set_default_verify_paths(ctx); + #ifdef SSL_MODE_RELEASE_BUFFERS +@@ -386,10 +388,8 @@ static ErlDrvSSizeT tls_drv_control(ErlDrvData handle, + SSL_set_bio(d->ssl, d->bio_read, d->bio_write); + + if (command == SET_CERTIFICATE_FILE_ACCEPT) { +- SSL_set_options(d->ssl, SSL_OP_NO_TICKET); + SSL_set_accept_state(d->ssl); + } else { +- SSL_set_options(d->ssl, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET); + SSL_set_connect_state(d->ssl); + } + break; --- ejabberd-2.1.10.orig/debian/patches/ejabberd_regexp.patch +++ ejabberd-2.1.10/debian/patches/ejabberd_regexp.patch @@ -0,0 +1,95 @@ +Description: Provide custom replacement for xmerl_regexp:sh_to_awk/1 + Erlang R15 dropped support for its old regular expressions library + (implemented as the "regexp" module) and replaced it with a new, + PCRE-based, implementation (implemented as the "re" module). + This transition lost the regexp:sh_to_awk/1 function which, given + a "glob-style expression" commonly used in POSIX shells to match + filenames, would produce a regular expression specification with + the equivalent semantics. The ejabberd upstream tried to combat + this situation [1] by using xmerl_regexp:sh_to_awk/1. + This introduced an implicit dependency on the erlang-xmerl library + which has been the cause for a Debian bug #670307. + Depending on erlang-xmerl has two problems: + 1) It's a 1.5M library otherwise not used by ejabberd code while + the function itself is rather straightforward to implement. + 2) The implementation of xmerl_regexp:sh_to_awk/1 has certain + flaws (incorrect parsing of bracketed expressions, not escaping + match repetition counts). + As a result, a custom implementation of sh_to_awk/1 is provided, + which works almost like xmerl_regexp:sh_to_awk/1 but fixes its flaws. + 1. https://support.process-one.net/browse/EJAB-921 +Author: Konstantin Khomoutov +Forwarded: no +Last-Update: 2012-06-04 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/ejabberd_regexp.erl ++++ b/src/ejabberd_regexp.erl +@@ -26,6 +26,7 @@ + + -module(ejabberd_regexp). + -compile([export_all]). ++-import(lists, [reverse/1, member/2]). + + exec(ReM, ReF, ReA, RgM, RgF, RgA) -> + try apply(ReM, ReF, ReA) +@@ -66,7 +67,56 @@ + A -> A + end. + +-sh_to_awk(ShRegExp) -> +- case exec(xmerl_regexp, sh_to_awk, [ShRegExp], regexp, sh_to_awk, [ShRegExp]) of +- A -> A ++sh_to_awk(Pattern) when is_list(Pattern) -> ++ fnmatch_char(Pattern, [$(,$^]). ++ ++fnmatch_char([], Acc) -> ++ lists:reverse([$$,$)|Acc]); ++fnmatch_char([Ch|Tail], Acc) -> ++ case Ch of ++ $\\ -> ++ fnmatch_char(Tail, [$\\,$\\|Acc]); ++ $[ -> ++ fnmatch_bexp_first(Tail, [Ch|Acc]); ++ $? -> ++ fnmatch_char(Tail, [$.|Acc]); ++ $* -> ++ fnmatch_char(Tail, [$*,$.|Acc]); ++ _ -> ++ case lists:member(Ch, "^.+{}()$|\\") of ++ true -> ++ fnmatch_char(Tail, [Ch,$\\|Acc]); ++ false -> ++ fnmatch_char(Tail, [Ch|Acc]) ++ end ++ end. ++ ++fnmatch_bexp_first([], _) -> ++ {error, unclosed_be}; ++fnmatch_bexp_first([Ch|Tail], Acc) -> ++ case Ch of ++ $] -> ++ {error, empty_be}; ++ $! -> ++ fnmatch_bexp_next(Tail, false, [$^|Acc]); ++ $\\ -> ++ fnmatch_bexp_next(Tail, true, Acc); ++ _ -> ++ fnmatch_bexp_next(Tail, false, [Ch|Acc]) ++ end. ++ ++fnmatch_bexp_next([], _, _) -> ++ {error, unclosed_be}; ++fnmatch_bexp_next([Ch|Tail], true, Acc) -> ++ fnmatch_bexp_next(Tail, false, [Ch,$\\|Acc]); ++fnmatch_bexp_next([Ch|Tail], false, Acc) -> ++ case Ch of ++ $] -> ++ fnmatch_char(Tail, [Ch|Acc]); ++ $\\ -> ++ fnmatch_bexp_next(Tail, true, Acc); ++ _ -> ++ fnmatch_bexp_next(Tail, false, [Ch|Acc]) + end. ++ ++%% vim:ts=8:sw=4:sts=4:noet --- ejabberd-2.1.10.orig/debian/patches/reopen-log.patch +++ ejabberd-2.1.10/debian/patches/reopen-log.patch @@ -0,0 +1,192 @@ +This patch fixes several problems pinpointed when dealing +with Debian bug #580951: + * erlang.log (SASL log file) for some reason only gets reopened + each second call to `ejabberdctl reopen-log`; + * After reopening the same files (that is, when the files were + not renamed (by logrotate, for instance) before reopening), + erlang.log gets truncated, and ejabberd.log gets renamed + to "ejabberd-old.log"; both behaviours break the + "reopening of log files" contract common in Unix. + +The patch fixes these problems in the following way: + * The SASL application is started with its built-in file logger + disabled. After this a custom module is inserted to handle + SASL messages; this module does not truncate its log file + when reopening it. + * Built-in ejabberd's "log rotation" (renaming original log + files by appending the "-old" suffix to their base names) + is disabled. + * Both ejabberd's logging module and the custom SASL logging + module now respond to a custom event which instructs them + to reload their respective log files; this event is + synchronously sent to these modules when `ejabberdctl reopen-log` + is being run. + +This problem is being tracked upstream as +https://support.process-one.net/browse/EJAB-1243 + +--- a/src/ejabberd_logger_h.erl ++++ b/src/ejabberd_logger_h.erl +@@ -58,6 +58,20 @@ + %% {swap_handler, Args1, State1, Mod2, Args2} | + %% remove_handler + %%---------------------------------------------------------------------- ++handle_event({ejabberd, reopen}, State) -> ++ Fd = State#state.fd, ++ File = State#state.file, ++ case file:close(Fd) of ++ ok -> ++ case file:open(File, [append, raw]) of ++ {ok, NewFd} -> ++ {ok, #state{fd = NewFd, file = File}}; ++ Error -> ++ Error ++ end; ++ Error -> ++ Error ++ end; + handle_event(Event, State) -> + write_event(State#state.fd, {erlang:localtime(), Event}), + {ok, State}. +@@ -82,7 +96,6 @@ + remove_handler; + handle_info({emulator, _GL, reopen}, State) -> + file:close(State#state.fd), +- rotate_log(State#state.file), + case file:open(State#state.file, [append, raw]) of + {ok, Fd} -> + {ok, State#state{fd = Fd}}; +--- a/src/ejabberd_admin.erl ++++ b/src/ejabberd_admin.erl +@@ -219,28 +219,9 @@ + + reopen_log() -> + ejabberd_hooks:run(reopen_log_hook, []), +- %% TODO: Use the Reopen log API for logger_h ? +- ejabberd_logger_h:reopen_log(), +- case application:get_env(sasl,sasl_error_logger) of +- {ok, {file, SASLfile}} -> +- error_logger:delete_report_handler(sasl_report_file_h), +- ejabberd_logger_h:rotate_log(SASLfile), +- error_logger:add_report_handler(sasl_report_file_h, +- {SASLfile, get_sasl_error_logger_type()}); +- _ -> false +- end, ++ gen_event:sync_notify(error_logger, {ejabberd, reopen}), + ok. + +-%% Function copied from Erlang/OTP lib/sasl/src/sasl.erl which doesn't export it +-get_sasl_error_logger_type () -> +- case application:get_env (sasl, errlog_type) of +- {ok, error} -> error; +- {ok, progress} -> progress; +- {ok, all} -> all; +- {ok, Bad} -> exit ({bad_config, {sasl, {errlog_type, Bad}}}); +- _ -> all +- end. +- + %%% + %%% Stop Kindly + %%% +--- /dev/null ++++ b/src/sasl_report_append_file_h.erl +@@ -0,0 +1,59 @@ ++%% ++%% SASL report logging to a file in append mode. ++%% Inspired by Erlang's sasl_report_file_h module. ++%% ++-module(sasl_report_append_file_h). ++ ++%%% ++%%% A handler that can be connected to the error_logger ++%%% event handler. ++%%% Writes all sasl_* events formatted to file ++%%% ++ ++-export([init/1, ++ handle_event/2, handle_call/2, handle_info/2, ++ terminate/2]). ++ ++init({File, Type}) -> ++ process_flag(trap_exit, true), ++ case file:open(File, [append]) of ++ {ok,Fd} -> ++ {ok, {Fd, File, Type}}; ++ What -> ++ What ++ end. ++ ++handle_event({ejabberd, reopen}, {Fd, File, Type}) -> ++ case file:close(Fd) of ++ ok -> ++ case file:open(File, [append]) of ++ {ok, NewFd} -> ++ {ok, {NewFd, File, Type}}; ++ Error -> ++ Error ++ end; ++ Error -> ++ Error ++ end; ++handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() -> ++ {ok, State}; ++handle_event(Event, {Fd, File, Type}) -> ++ sasl_report:write_report(Fd, Type, tag_event(Event)), ++ {ok, {Fd, File, Type}}; ++handle_event(_, State) -> ++ {ok, State}. ++ ++handle_info({'EXIT', Fd, _Reason}, {Fd, _File, _Type}) -> ++ remove_handler; ++handle_info(_, State) -> ++ {ok, State}. ++ ++handle_call(_Query, _State) -> {error, bad_query}. ++ ++terminate(_, {Fd, _File, _Type}) -> ++ file:close(Fd), ++ []. ++ ++tag_event(Event) -> ++ {calendar:local_time(), Event}. ++ +--- a/src/ejabberd_app.erl ++++ b/src/ejabberd_app.erl +@@ -103,6 +103,13 @@ + register(ejabberd, self()), + %erlang:system_flag(fullsweep_after, 0), + %error_logger:logfile({open, ?LOG_PATH}), ++ case get_sasl_logger() of ++ {File, Type} -> ++ error_logger:add_report_handler(sasl_report_append_file_h, ++ {File, Type}); ++ _ -> ++ ok ++ end, + LogPath = get_log_path(), + error_logger:add_report_handler(ejabberd_logger_h, LogPath), + erl_ddll:load_driver(ejabberd:get_so_path(), tls_drv), +@@ -113,6 +120,23 @@ + Port = open_port({spawn, "expat_erl"}, [binary]), + loop(Port). + ++get_sasl_logger() -> ++ case application:get_env(ejabberd, erlang_log_path) of ++ {ok, File} -> ++ {File, get_sasl_error_logger_type()}; ++ _ -> ++ false ++ end. ++ ++%% Function copied from Erlang/OTP lib/sasl/src/sasl.erl which doesn't export it ++get_sasl_error_logger_type () -> ++ case application:get_env (sasl, errlog_type) of ++ {ok, error} -> error; ++ {ok, progress} -> progress; ++ {ok, all} -> all; ++ {ok, Bad} -> exit ({bad_config, {sasl, {errlog_type, Bad}}}); ++ _ -> all ++ end. + + loop(Port) -> + receive --- ejabberd-2.1.10.orig/debian/patches/disable-insecure-ssl-cyphers.patch +++ ejabberd-2.1.10/debian/patches/disable-insecure-ssl-cyphers.patch @@ -0,0 +1,34 @@ +Description: Disable old and insecure cyphers in TLS driver + Disabled: + * Export ciphers - broken by design, 40 and 56 bit encryption. + * Low encryption ciphers - 56 and 64 bit encryption. + * SSLv2 ciphers - some ciphers using MD5 MAC. + . + This patch is a backport of changes introduced by the commit + d2d51381ec3fea97d0bd968cd7ffed2364b644c6 in the upstream Git repository + to the ejabberd code base as of version 2.1.12. +Author: Janusz Dziemidowicz +Forwarded: not-needed +Last-Update: 2013-09-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/tls/tls_drv.c ++++ b/src/tls/tls_drv.c +@@ -44,6 +44,8 @@ typedef unsigned __int32 uint32_t; + #define SSL_OP_NO_TICKET 0 + #endif + ++#define CIPHERS "DEFAULT:!EXPORT:!LOW:!SSLv2" ++ + /* + * R15B changed several driver callbacks to use ErlDrvSizeT and + * ErlDrvSSizeT typedefs instead of int. +@@ -356,6 +358,8 @@ static ErlDrvSSizeT tls_drv_control(ErlDrvData handle, + + SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET); + ++ SSL_CTX_set_cipher_list(ctx, CIPHERS); ++ + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); + SSL_CTX_set_default_verify_paths(ctx); + #ifdef SSL_MODE_RELEASE_BUFFERS --- ejabberd-2.1.10.orig/debian/patches/use_dpkg_buildflags.patch +++ ejabberd-2.1.10/debian/patches/use_dpkg_buildflags.patch @@ -0,0 +1,70 @@ +Description: Use CPPFLAGS from environment (dpkg-buildflags). + Necessary for hardening flags. +Author: Simon Ruderich +Last-Update: 2012-03-15 + +Index: ejabberd-2.1.10/src/configure +=================================================================== +--- ejabberd-2.1.10.orig/src/configure 2012-03-15 00:20:28.288591657 +0100 ++++ ejabberd-2.1.10/src/configure 2012-03-15 00:22:09.780595520 +0100 +@@ -4479,7 +4479,7 @@ + fi + zlib_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" +- zlib_save_CPPFLAGS="$CFLAGS" ++ zlib_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" + for ac_header in zlib.h + do : +Index: ejabberd-2.1.10/src/acinclude.m4 +=================================================================== +--- ejabberd-2.1.10.orig/src/acinclude.m4 2012-03-15 00:20:28.288591657 +0100 ++++ ejabberd-2.1.10/src/acinclude.m4 2012-03-15 00:22:09.784595520 +0100 +@@ -54,7 +54,7 @@ + fi + zlib_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" +- zlib_save_CPPFLAGS="$CFLAGS" ++ zlib_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" + AC_CHECK_HEADERS(zlib.h, , zlib_found=no) + if test $zlib_found = no; then +Index: ejabberd-2.1.10/src/Makefile.in +=================================================================== +--- ejabberd-2.1.10.orig/src/Makefile.in 2012-03-15 00:20:28.288591657 +0100 ++++ ejabberd-2.1.10/src/Makefile.in 2012-03-15 00:22:09.784595520 +0100 +@@ -168,7 +168,7 @@ + @ERLC@ -W $(EFLAGS) $*.erl + + $(ERLSHLIBS): %.so: %.c +- $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \ ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LIBS) \ + $(subst ../,,$(subst .so,.c,$@)) \ + $(EXPAT_LIBS) \ + $(EXPAT_CFLAGS) \ +Index: ejabberd-2.1.10/src/mod_irc/Makefile.in +=================================================================== +--- ejabberd-2.1.10.orig/src/mod_irc/Makefile.in 2012-03-15 00:20:28.288591657 +0100 ++++ ejabberd-2.1.10/src/mod_irc/Makefile.in 2012-03-15 00:22:09.784595520 +0100 +@@ -41,7 +41,7 @@ + # erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt + + $(ERLSHLIBS): ../%.so: %.c +- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) \ ++ $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ + $(subst ../,,$(subst .so,.c,$@)) \ + $(LIBS) \ + $(ERLANG_CFLAGS) \ +Index: ejabberd-2.1.10/src/stringprep/Makefile.in +=================================================================== +--- ejabberd-2.1.10.orig/src/stringprep/Makefile.in 2012-03-15 00:22:43.904596819 +0100 ++++ ejabberd-2.1.10/src/stringprep/Makefile.in 2012-03-15 00:22:58.844597386 +0100 +@@ -42,7 +42,7 @@ + # erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt + + $(ERLSHLIBS): ../%.so: %.c uni_data.c uni_norm.c +- $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) \ ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(INCLUDES) \ + $(subst ../,,$(subst .so,.c,$@)) $(LIBS) \ + $(ERLANG_LIBS) \ + $(ERLANG_CFLAGS) \ --- ejabberd-2.1.10.orig/debian/patches/series +++ ejabberd-2.1.10/debian/patches/series @@ -0,0 +1,12 @@ +use_dpkg_buildflags.patch +ejabberd_regexp.patch +mod_admin_extra.patch +captcha.patch +fix_examples.patch +reopen-log.patch +relax-digest-uri-handling.patch +fix-ldap-vcard-jpeg-photos.patch +fix-parsing-split-https-requests.patch +scram-optional-parameter-parsing-bugfix.patch +disable-ssl2.patch +disable-insecure-ssl-cyphers.patch --- ejabberd-2.1.10.orig/debian/patches/scram-optional-parameter-parsing-bugfix.patch +++ ejabberd-2.1.10/debian/patches/scram-optional-parameter-parsing-bugfix.patch @@ -0,0 +1,99 @@ +Description: Fix parsing SCRAM optional parameters + The server gave an authentication error, if optional parameters + were present in the GS2 Header. Specifically, the "a=" parameter, + that can be used by admins to login as a different user. + . + This patch is a backport of changes introduced by the commit + 9e9b0eae802ee0508db6780426954efd048e7976 in the upstream Git repository + to the ejabberd code base as of version 2.1.10. +Author: Stephen Röttger +Forwarded: not-needed +Bug: https://support.process-one.net/browse/EJAB-1632 +Last-Update: 2013-03-25 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/cyrsasl_scram.erl ++++ b/src/cyrsasl_scram.erl +@@ -34,6 +34,8 @@ + + -include("ejabberd.hrl"). + ++-include("jlib.hrl"). ++ + -behaviour(cyrsasl). + + -record(state, {step, stored_key, server_key, username, get_password, check_password, +@@ -52,8 +54,12 @@ + {ok, #state{step = 2, get_password = GetPassword}}. + + mech_step(#state{step = 2} = State, ClientIn) -> +- case string:tokens(ClientIn, ",") of +- [CBind, UserNameAttribute, ClientNonceAttribute] when (CBind == "y") or (CBind == "n") -> ++ case re:split(ClientIn, ",", [{return, list}]) of ++ [_CBind, _AuthorizationIdentity, _UserNameAttribute, _ClientNonceAttribute, ExtensionAttribute | _] ++ when ExtensionAttribute /= [] -> ++ {error, <<"protocol-error-extension-not-supported">>}; ++ [CBind, _AuthorizationIdentity, UserNameAttribute, ClientNonceAttribute | _] ++ when (CBind == "y") or (CBind == "n") -> + case parse_attribute(UserNameAttribute) of + {error, Reason} -> + {error, Reason}; +@@ -100,32 +106,36 @@ + case string:tokens(ClientIn, ",") of + [GS2ChannelBindingAttribute, NonceAttribute, ClientProofAttribute] -> + case parse_attribute(GS2ChannelBindingAttribute) of +- {$c, CVal} when (CVal == "biws") or (CVal == "eSws") -> +- %% biws is base64 for n,, => channelbinding not supported +- %% eSws is base64 for y,, => channelbinding supported by client only +- Nonce = State#state.client_nonce ++ State#state.server_nonce, +- case parse_attribute(NonceAttribute) of +- {$r, CompareNonce} when CompareNonce == Nonce -> +- case parse_attribute(ClientProofAttribute) of +- {$p, ClientProofB64} -> +- ClientProof = base64:decode(ClientProofB64), +- AuthMessage = State#state.auth_message ++ "," ++ string:substr(ClientIn, 1, string:str(ClientIn, ",p=")-1), +- ClientSignature = scram:client_signature(State#state.stored_key, AuthMessage), +- ClientKey = scram:client_key(ClientProof, ClientSignature), +- CompareStoredKey = scram:stored_key(ClientKey), +- if CompareStoredKey == State#state.stored_key -> +- ServerSignature = scram:server_signature(State#state.server_key, AuthMessage), +- {ok, [{username, State#state.username}], "v=" ++ base64:encode_to_string(ServerSignature)}; +- true -> +- {error, "bad-auth"} ++ {$c, CVal} -> ++ ChannelBindingSupport = string:left(jlib:decode_base64(CVal), 1), ++ if (ChannelBindingSupport == "n") ++ or (ChannelBindingSupport == "y") -> ++ Nonce = State#state.client_nonce ++ State#state.server_nonce, ++ case parse_attribute(NonceAttribute) of ++ {$r, CompareNonce} when CompareNonce == Nonce -> ++ case parse_attribute(ClientProofAttribute) of ++ {$p, ClientProofB64} -> ++ ClientProof = base64:decode(ClientProofB64), ++ AuthMessage = State#state.auth_message ++ "," ++ string:substr(ClientIn, 1, string:str(ClientIn, ",p=")-1), ++ ClientSignature = scram:client_signature(State#state.stored_key, AuthMessage), ++ ClientKey = scram:client_key(ClientProof, ClientSignature), ++ CompareStoredKey = scram:stored_key(ClientKey), ++ if CompareStoredKey == State#state.stored_key -> ++ ServerSignature = scram:server_signature(State#state.server_key, AuthMessage), ++ {ok, [{username, State#state.username}], "v=" ++ base64:encode_to_string(ServerSignature)}; ++ true -> ++ {error, "bad-auth"} ++ end; ++ _Else -> ++ {error, "bad-protocol"} + end; ++ {$r, _} -> ++ {error, "bad-nonce"}; + _Else -> + {error, "bad-protocol"} + end; +- {$r, _} -> +- {error, "bad-nonce"}; +- _Else -> +- {error, "bad-protocol"} ++ true -> ++ {error, "bad-channel-binding"} + end; + _Else -> + {error, "bad-protocol"} --- ejabberd-2.1.10.orig/debian/patches/fix-ldap-vcard-jpeg-photos.patch +++ ejabberd-2.1.10/debian/patches/fix-ldap-vcard-jpeg-photos.patch @@ -0,0 +1,16 @@ +Description: Fix fetching JPEG vCard photos via LDAP +Origin: upstream, https://github.com/processone/ejabberd/commit/be33ab890e35ae5c41285dd5ed422db910534040 +Bug-ProcessOne: https://support.process-one.net/browse/EJAB-1526 +Applied-Upstream: 2.1.11 +Last-Update: 2013-02-17 +diff --git a/src/eldap/eldap_filter.erl b/src/eldap/eldap_filter.erl +index f8f20be..e78ee7e 100644 +--- a/src/eldap/eldap_filter.erl ++++ b/src/eldap/eldap_filter.erl +@@ -181,5 +181,6 @@ do_sub(S, {RegExp, New, Times}, Iter) -> + replace_amps(String) -> + lists:flatmap( + fun($&) -> "\\&"; ++ ($\\) -> "\\\\"; + (Chr) -> [Chr] + end, String). --- ejabberd-2.1.10.orig/debian/patches/relax-digest-uri-handling.patch +++ ejabberd-2.1.10/debian/patches/relax-digest-uri-handling.patch @@ -0,0 +1,129 @@ +Description: Relax digest-uri handling + This patch introduces a new config option - fqdn - to set the fully + qualified domain name of the host: + {fqdn, "foo.example.com"}. + This fixes a problem with Pidgin not being able to log in on a server + that used SRV records. +Origin: upstream, https://github.com/processone/ejabberd/commit/983da9c887d6cb64812087cba961dc85f349e1f9 +Bug-ProcessOne: https://support.process-one.net/browse/EJAB-1529 +Applied-Upstream: 2.1.11 +Last-Update: 2012-08-15 +--- a/doc/guide.tex ++++ b/doc/guide.tex +@@ -1226,6 +1226,12 @@ + If the client uses old Jabber Non-SASL authentication (\xepref{0078}), + then this option is not respected, and the action performed is \term{closeold}. + ++The option \option{fqdn} allows you to define the Fully Qualified Domain Name ++of the machine, in case it isn't detected automatically. ++The FQDN is used to authenticate some clients that use the DIGEST-MD5 SASL mechanism. ++The option syntax is: ++\esyntax{\{fqdn, undefined|FqdnString\}.} ++ + \makesubsubsection{internalauth}{Internal} + \ind{internal authentication}\ind{Mnesia} + +--- a/src/cyrsasl_digest.erl ++++ b/src/cyrsasl_digest.erl +@@ -37,9 +37,11 @@ + -behaviour(cyrsasl). + + -record(state, {step, nonce, username, authzid, get_password, check_password, auth_module, +- host}). ++ host, hostfqdn}). + + start(_Opts) -> ++ Fqdn = get_local_fqdn(), ++ ?INFO_MSG("FQDN used to check DIGEST-MD5 SASL authentication: ~p", [Fqdn]), + cyrsasl:register_mechanism("DIGEST-MD5", ?MODULE, digest). + + stop() -> +@@ -49,6 +51,7 @@ + {ok, #state{step = 1, + nonce = randoms:get_string(), + host = Host, ++ hostfqdn = get_local_fqdn(), + get_password = GetPassword, + check_password = CheckPasswordDigest}}. + +@@ -64,10 +67,11 @@ + KeyVals -> + DigestURI = xml:get_attr_s("digest-uri", KeyVals), + UserName = xml:get_attr_s("username", KeyVals), +- case is_digesturi_valid(DigestURI, State#state.host) of ++ case is_digesturi_valid(DigestURI, State#state.host, State#state.hostfqdn) of + false -> + ?DEBUG("User login not authorized because digest-uri " +- "seems invalid: ~p", [DigestURI]), ++ "seems invalid: ~p (checking for Host ~p, FQDN ~p)", [DigestURI, ++ State#state.host, State#state.hostfqdn]), + {error, "not-authorized", UserName}; + true -> + AuthzId = xml:get_attr_s("authzid", KeyVals), +@@ -154,21 +158,35 @@ + %% however ejabberd doesn't allow that. + %% If the service (for example jabber.example.org) + %% is provided by several hosts (being one of them server3.example.org), +-%% then digest-uri can be like xmpp/server3.example.org/jabber.example.org +-%% In that case, ejabberd only checks the service name, not the host. +-is_digesturi_valid(DigestURICase, JabberHost) -> ++%% then acceptable digest-uris would be: ++%% xmpp/server3.example.org/jabber.example.org, xmpp/server3.example.org and ++%% xmpp/jabber.example.org ++%% The last version is not actually allowed by the RFC, but implemented by popular clients ++is_digesturi_valid(DigestURICase, JabberDomain, JabberFQDN) -> + DigestURI = stringprep:tolower(DigestURICase), + case catch string:tokens(DigestURI, "/") of +- ["xmpp", Host] when Host == JabberHost -> ++ ["xmpp", Host] when (Host == JabberDomain) or (Host == JabberFQDN) -> + true; +- ["xmpp", _Host, ServName] when ServName == JabberHost -> ++ ["xmpp", Host, ServName] when (ServName == JabberDomain) and (Host == JabberFQDN) -> + true; + _ -> + false + end. + +- +- ++get_local_fqdn() -> ++ case (catch get_local_fqdn2()) of ++ Str when is_list(Str) -> Str; ++ _ -> "unknown-fqdn, please configure fqdn option in ejabberd.cfg!" ++ end. ++get_local_fqdn2() -> ++ case ejabberd_config:get_local_option(fqdn) of ++ ConfiguredFqdn when is_list(ConfiguredFqdn) -> ++ ConfiguredFqdn; ++ _undefined -> ++ {ok, Hostname} = inet:gethostname(), ++ {ok, {hostent, Fqdn, _, _, _, _}} = inet:gethostbyname(Hostname), ++ Fqdn ++ end. + + digit_to_xchar(D) when (D >= 0) and (D < 10) -> + D + 48; +--- a/src/ejabberd.cfg.example ++++ b/src/ejabberd.cfg.example +@@ -222,6 +222,9 @@ + %% Store the plain passwords or hashed for SCRAM: + %%{auth_password_format, plain}. + %%{auth_password_format, scram}. ++%% ++%% Define the FQDN if ejabberd doesn't detect it: ++%%{fqdn, "server3.example.com"}. + + %% + %% Authentication using external script +--- a/src/ejabberd_config.erl ++++ b/src/ejabberd_config.erl +@@ -374,6 +374,9 @@ + State; + {hosts, _Hosts} -> + State; ++ {fqdn, HostFQDN} -> ++ ?DEBUG("FQDN set to: ~p", [HostFQDN]), ++ add_option(fqdn, HostFQDN, State); + {host_config, Host, Terms} -> + lists:foldl(fun(T, S) -> process_host_term(T, Host, S) end, + State, Terms); --- ejabberd-2.1.10.orig/debian/patches/fix_examples.patch +++ ejabberd-2.1.10/debian/patches/fix_examples.patch @@ -0,0 +1,32 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Fix syntax problems with the example scripts + +Index: VCS/examples/mtr/ejabberd +=================================================================== +--- VCS.orig/examples/mtr/ejabberd ++++ VCS/examples/mtr/ejabberd +@@ -44,9 +44,8 @@ force*) + ;; + esac + +-if checkyesno ${rcvar} ++if ! checkyesno ${rcvar} + then +-else + exit 0 + fi + +Index: VCS/examples/mtr/ejabberd-netbsd.sh +=================================================================== +--- VCS.orig/examples/mtr/ejabberd-netbsd.sh ++++ VCS/examples/mtr/ejabberd-netbsd.sh +@@ -8,8 +8,7 @@ if [ ! pkg_info erlang 1>/dev/null 2>&1 + make + make install + fi +-if pkg_info erlang | grep -q erlang-9.1nb1; then +-else ++if ! pkg_info erlang | grep -q erlang-9.1nb1; then + echo "erlang-9.1nb1 not installed" 1>&2 + exit 1 + fi --- ejabberd-2.1.10.orig/debian/patches/mod_admin_extra.patch +++ ejabberd-2.1.10/debian/patches/mod_admin_extra.patch @@ -0,0 +1,1581 @@ +Adds the mod_admin_extra module to ejabberd. +This module extends the functionality provided by ejabberdctl +by adding several new commands. + +The code is taken from the ProcessOne repository: +https://forge.process-one.net/browse/ejabberd-modules/mod_admin_extra +(trunk, revision 1123). + +--- a/src/ejabberd.app ++++ b/src/ejabberd.app +@@ -105,6 +105,7 @@ + mod_vcard_ldap, + mod_vcard_odbc, + mod_version, ++ mod_admin_extra, + node_buddy, + node_club, + node_default, +--- /dev/null ++++ b/src/mod_admin_extra.erl +@@ -0,0 +1,1560 @@ ++%%%------------------------------------------------------------------- ++%%% File : mod_admin_extra.erl ++%%% Author : Badlop ++%%% Purpose : Contributed administrative functions and commands ++%%% Created : 10 Aug 2008 by Badlop ++%%% ++%%% ++%%% ejabberd, Copyright (C) 2002-2008 ProcessOne ++%%% ++%%% This program is free software; you can redistribute it and/or ++%%% modify it under the terms of the GNU General Public License as ++%%% published by the Free Software Foundation; either version 2 of the ++%%% License, or (at your option) any later version. ++%%% ++%%% This program is distributed in the hope that it will be useful, ++%%% but WITHOUT ANY WARRANTY; without even the implied warranty of ++%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++%%% General Public License for more details. ++%%% ++%%% You should have received a copy of the GNU General Public License ++%%% along with this program; if not, write to the Free Software ++%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++%%% 02111-1307 USA ++%%% ++%%%------------------------------------------------------------------- ++ ++-module(mod_admin_extra). ++-author('badlop@process-one.net'). ++ ++-behaviour(gen_mod). ++ ++-export([start/2, stop/1, ++ %% Node ++ compile/1, ++ load_config/1, ++ get_cookie/0, ++ remove_node/1, ++ export2odbc/2, ++ %% Accounts ++ set_password/3, ++ check_password_hash/4, ++ delete_old_users/1, ++ delete_old_users_vhost/2, ++ ban_account/3, ++ num_active_users/2, ++ %% Sessions ++ num_resources/2, ++ resource_num/3, ++ kick_session/4, ++ status_num/2, status_num/1, ++ status_list/2, status_list/1, ++ connected_users_info/0, ++ connected_users_vhost/1, ++ set_presence/7, ++ user_sessions_info/2, ++ %% Vcard ++ set_nickname/3, ++ get_vcard/3, ++ get_vcard/4, ++ get_vcard_multi/4, ++ set_vcard/4, ++ set_vcard/5, ++ %% Roster ++ add_rosteritem/7, ++ delete_rosteritem/4, ++ process_rosteritems/5, ++ get_roster/2, ++ push_roster/3, ++ push_roster_all/1, ++ push_alltoall/2, ++ %% mod_last ++ set_last/4, ++ %% mod_private ++ private_get/4, ++ private_set/3, ++ %% mod_shared_roster ++ srg_create/5, ++ srg_delete/2, ++ srg_list/1, ++ srg_get_info/2, ++ srg_get_members/2, ++ srg_user_add/4, ++ srg_user_del/4, ++ %% Stanza ++ send_message_headline/4, ++ send_message_chat/3, ++ send_stanza_c2s/4, ++ privacy_set/3, ++ %% Stats ++ stats/1, stats/2 ++ ]). ++ ++-include("ejabberd.hrl"). ++-include("ejabberd_commands.hrl"). ++-include("mod_roster.hrl"). ++-include("jlib.hrl"). ++ ++%% Copied from ejabberd_sm.erl ++-record(session, {sid, usr, us, priority, info}). ++ ++ ++%%% ++%%% gen_mod ++%%% ++ ++start(_Host, _Opts) -> ++ ejabberd_commands:register_commands(commands()). ++ ++stop(_Host) -> ++ ejabberd_commands:unregister_commands(commands()). ++ ++ ++%%% ++%%% Register commands ++%%% ++ ++commands() -> ++ Vcard1FieldsString = "Some vcard field names in get/set_vcard are:\n" ++ " FN - Full Name\n" ++ " NICKNAME - Nickname\n" ++ " BDAY - Birthday\n" ++ " TITLE - Work: Position\n" ++ " ROLE - Work: Role", ++ ++ Vcard2FieldsString = "Some vcard field names and subnames in get/set_vcard2 are:\n" ++ " N FAMILY - Family name\n" ++ " N GIVEN - Given name\n" ++ " N MIDDLE - Middle name\n" ++ " ADR CTRY - Address: Country\n" ++ " ADR LOCALITY - Address: City\n" ++ " EMAIL USERID - E-Mail Address\n" ++ " ORG ORGNAME - Work: Company\n" ++ " ORG ORGUNIT - Work: Department", ++ ++ VcardXEP = "For a full list of vCard fields check XEP-0054: vcard-temp at " ++ "http://www.xmpp.org/extensions/xep-0054.html", ++ ++ [ ++ #ejabberd_commands{name = compile, tags = [erlang], ++ desc = "Recompile and reload Erlang source code file", ++ module = ?MODULE, function = compile, ++ args = [{file, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = load_config, tags = [server], ++ desc = "Load ejabberd configuration file", ++ module = ?MODULE, function = load_config, ++ args = [{file, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = get_cookie, tags = [erlang], ++ desc = "Get the Erlang cookie of this node", ++ module = ?MODULE, function = get_cookie, ++ args = [], ++ result = {cookie, string}}, ++ #ejabberd_commands{name = remove_node, tags = [erlang], ++ desc = "Remove an ejabberd node from Mnesia clustering config", ++ module = ?MODULE, function = remove_node, ++ args = [{node, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = export2odbc, tags = [mnesia], ++ desc = "Export Mnesia tables to files in directory", ++ module = ?MODULE, function = export2odbc, ++ args = [{host, string}, {path, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = num_active_users, tags = [accounts, stats], ++ desc = "Get number of users active in the last days", ++ module = ?MODULE, function = num_active_users, ++ args = [{host, string}, {days, integer}], ++ result = {users, integer}}, ++ #ejabberd_commands{name = delete_old_users, tags = [accounts, purge], ++ desc = "Delete users that didn't log in last days, or that never logged", ++ module = ?MODULE, function = delete_old_users, ++ args = [{days, integer}], ++ result = {res, restuple}}, ++ #ejabberd_commands{name = delete_old_users_vhost, tags = [accounts, purge], ++ desc = "Delete users that didn't log in last days in vhost, or that never logged", ++ module = ?MODULE, function = delete_old_users_vhost, ++ args = [{host, string}, {days, integer}], ++ result = {res, restuple}}, ++ ++ #ejabberd_commands{name = check_account, tags = [accounts], ++ desc = "Check if an account exists or not", ++ module = ejabberd_auth, function = is_user_exists, ++ args = [{user, string}, {host, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = check_password, tags = [accounts], ++ desc = "Check if a password is correct", ++ module = ejabberd_auth, function = check_password, ++ args = [{user, string}, {host, string}, {password, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = check_password_hash, tags = [accounts], ++ desc = "Check if the password hash is correct", ++ longdesc = "Allowed hash methods: md5, sha.", ++ module = ?MODULE, function = check_password_hash, ++ args = [{user, string}, {host, string}, {passwordhash, string}, {hashmethod, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = change_password, tags = [accounts], ++ desc = "Change the password of an account", ++ module = ?MODULE, function = set_password, ++ args = [{user, string}, {host, string}, {newpass, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = ban_account, tags = [accounts], ++ desc = "Ban an account: kick sessions and set random password", ++ module = ?MODULE, function = ban_account, ++ args = [{user, string}, {host, string}, {reason, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = num_resources, tags = [session], ++ desc = "Get the number of resources of a user", ++ module = ?MODULE, function = num_resources, ++ args = [{user, string}, {host, string}], ++ result = {resources, integer}}, ++ #ejabberd_commands{name = resource_num, tags = [session], ++ desc = "Resource string of a session number", ++ module = ?MODULE, function = resource_num, ++ args = [{user, string}, {host, string}, {num, integer}], ++ result = {resource, string}}, ++ #ejabberd_commands{name = kick_session, tags = [session], ++ desc = "Kick a user session", ++ module = ?MODULE, function = kick_session, ++ args = [{user, string}, {host, string}, {resource, string}, {reason, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = status_num_host, tags = [session, stats], ++ desc = "Number of logged users with this status in host", ++ module = ?MODULE, function = status_num, ++ args = [{host, string}, {status, string}], ++ result = {users, integer}}, ++ #ejabberd_commands{name = status_num, tags = [session, stats], ++ desc = "Number of logged users with this status", ++ module = ?MODULE, function = status_num, ++ args = [{status, string}], ++ result = {users, integer}}, ++ #ejabberd_commands{name = status_list_host, tags = [session], ++ desc = "List of users logged in host with their statuses", ++ module = ?MODULE, function = status_list, ++ args = [{host, string}, {status, string}], ++ result = {users, {list, ++ {userstatus, {tuple, [ ++ {user, string}, ++ {host, string}, ++ {resource, string}, ++ {priority, integer}, ++ {status, string} ++ ]}} ++ }}}, ++ #ejabberd_commands{name = status_list, tags = [session], ++ desc = "List of logged users with this status", ++ module = ?MODULE, function = status_list, ++ args = [{status, string}], ++ result = {users, {list, ++ {userstatus, {tuple, [ ++ {user, string}, ++ {host, string}, ++ {resource, string}, ++ {priority, integer}, ++ {status, string} ++ ]}} ++ }}}, ++ #ejabberd_commands{name = connected_users_info, ++ tags = [session], ++ desc = "List all established sessions and their information", ++ module = ?MODULE, function = connected_users_info, ++ args = [], ++ result = {connected_users_info, ++ {list, ++ {sessions, {tuple, ++ [{jid, string}, ++ {connection, string}, ++ {ip, string}, ++ {port, integer}, ++ {priority, integer}, ++ {node, string}, ++ {uptime, integer} ++ ]}} ++ }}}, ++ #ejabberd_commands{name = connected_users_vhost, ++ tags = [session], ++ desc = "Get the list of established sessions in a vhost", ++ module = ?MODULE, function = connected_users_vhost, ++ args = [{host, string}], ++ result = {connected_users_vhost, {list, {sessions, string}}}}, ++ #ejabberd_commands{name = user_sessions_info, ++ tags = [session], ++ desc = "Get information about all sessions of a user", ++ module = ?MODULE, function = user_sessions_info, ++ args = [{user, string}, {host, string}], ++ result = {sessions_info, ++ {list, ++ {session, {tuple, ++ [{connection, string}, ++ {ip, string}, ++ {port, integer}, ++ {priority, integer}, ++ {node, string}, ++ {uptime, integer}, ++ {status, string}, ++ {resource, string}, ++ {statustext, string} ++ ]}} ++ }}}, ++ ++ #ejabberd_commands{name = set_presence, ++ tags = [session], ++ desc = "Set presence of a session", ++ module = ?MODULE, function = set_presence, ++ args = [{user, string}, {host, string}, ++ {resource, string}, {type, string}, ++ {show, string}, {status, string}, ++ {priority, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = set_nickname, tags = [vcard], ++ desc = "Set nickname in a user's vCard", ++ module = ?MODULE, function = set_nickname, ++ args = [{user, string}, {host, string}, {nickname, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = get_vcard, tags = [vcard], ++ desc = "Get content from a vCard field", ++ longdesc = Vcard1FieldsString ++ "\n" ++ Vcard2FieldsString ++ "\n\n" ++ VcardXEP, ++ module = ?MODULE, function = get_vcard, ++ args = [{user, string}, {host, string}, {name, string}], ++ result = {content, string}}, ++ #ejabberd_commands{name = get_vcard2, tags = [vcard], ++ desc = "Get content from a vCard field", ++ longdesc = Vcard2FieldsString ++ "\n\n" ++ Vcard1FieldsString ++ "\n" ++ VcardXEP, ++ module = ?MODULE, function = get_vcard, ++ args = [{user, string}, {host, string}, {name, string}, {subname, string}], ++ result = {content, string}}, ++ #ejabberd_commands{name = get_vcard2_multi, tags = [vcard], ++ desc = "Get multiple contents from a vCard field (requires exmpp installed)", ++ longdesc = Vcard2FieldsString ++ "\n\n" ++ Vcard1FieldsString ++ "\n" ++ VcardXEP, ++ module = ?MODULE, function = get_vcard_multi, ++ args = [{user, string}, {host, string}, {name, string}, {subname, string}], ++ result = {contents, {list, string}}}, ++ ++ #ejabberd_commands{name = set_vcard, tags = [vcard], ++ desc = "Set content in a vCard field", ++ longdesc = Vcard1FieldsString ++ "\n" ++ Vcard2FieldsString ++ "\n\n" ++ VcardXEP, ++ module = ?MODULE, function = set_vcard, ++ args = [{user, string}, {host, string}, {name, string}, {content, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = set_vcard2, tags = [vcard], ++ desc = "Set content in a vCard subfield", ++ longdesc = Vcard2FieldsString ++ "\n\n" ++ Vcard1FieldsString ++ "\n" ++ VcardXEP, ++ module = ?MODULE, function = set_vcard, ++ args = [{user, string}, {host, string}, {name, string}, {subname, string}, {content, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = set_vcard2_multi, tags = [vcard], ++ desc = "Set multiple contents in a vCard subfield", ++ longdesc = Vcard2FieldsString ++ "\n\n" ++ Vcard1FieldsString ++ "\n" ++ VcardXEP, ++ module = ?MODULE, function = set_vcard, ++ args = [{user, string}, {host, string}, {name, string}, {subname, string}, {contents, {list, string}}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = add_rosteritem, tags = [roster], ++ desc = "Add an item to a user's roster", ++ module = ?MODULE, function = add_rosteritem, ++ args = [{localuser, string}, {localserver, string}, ++ {user, string}, {server, string}, ++ {nick, string}, {group, string}, ++ {subs, string}], ++ result = {res, rescode}}, ++ %%{"", "subs= none, from, to or both"}, ++ %%{"", "example: add-roster peter localhost mike server.com MiKe Employees both"}, ++ %%{"", "will add mike@server.com to peter@localhost roster"}, ++ #ejabberd_commands{name = delete_rosteritem, tags = [roster], ++ desc = "Delete an item from a user's roster", ++ module = ?MODULE, function = delete_rosteritem, ++ args = [{localuser, string}, {localserver, string}, ++ {user, string}, {server, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = process_rosteritems, tags = [roster], ++ desc = "List or delete rosteritems that match filtering options", ++ longdesc = "Explanation of each argument:\n" ++ " - action: what to do with each rosteritem that " ++ "matches all the filtering options\n" ++ " - subs: subscription type\n" ++ " - asks: pending subscription\n" ++ " - users: the JIDs of the local user\n" ++ " - contacts: the JIDs of the contact in the roster\n" ++ "\n" ++ "Allowed values in the arguments:\n" ++ " ACTION = list | delete\n" ++ " SUBS = SUB[:SUB]* | any\n" ++ " SUB = none | from | to | both\n" ++ " ASKS = ASK[:ASK]* | any\n" ++ " ASK = none | out | in\n" ++ " USERS = JID[:JID]* | any\n" ++ " CONTACTS = JID[:JID]* | any\n" ++ " JID = characters valid in a JID, and can use the " ++ "globs: *, ?, ! and [...]\n" ++ "\n" ++ "This example will list roster items with subscription " ++ "'none', 'from' or 'to' that have any ask property, of " ++ "local users which JID is in the virtual host " ++ "'example.org' and that the contact JID is either a " ++ "bare server name (without user part) or that has a " ++ "user part and the server part contains the word 'icq'" ++ ":\n list none:from:to any *@example.org *:*@*icq*", ++ module = ?MODULE, function = process_rosteritems, ++ args = [{action, string}, {subs, string}, ++ {asks, string}, {users, string}, ++ {contacts, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = get_roster, tags = [roster], ++ desc = "Get roster of a local user", ++ module = ?MODULE, function = get_roster, ++ args = [{user, string}, {host, string}], ++ result = {contacts, {list, {contact, {tuple, [ ++ {jid, string}, ++ {nick, string}, ++ {subscription, string}, ++ {ask, string}, ++ {group, string} ++ ]}}}}}, ++ #ejabberd_commands{name = push_roster, tags = [roster], ++ desc = "Push template roster from file to a user", ++ module = ?MODULE, function = push_roster, ++ args = [{file, string}, {user, string}, {host, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = push_roster_all, tags = [roster], ++ desc = "Push template roster from file to all those users", ++ module = ?MODULE, function = push_roster_all, ++ args = [{file, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = push_alltoall, tags = [roster], ++ desc = "Add all the users to all the users of Host in Group", ++ module = ?MODULE, function = push_alltoall, ++ args = [{host, string}, {group, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = set_last, tags = [last], ++ desc = "Set last activity information", ++ longdesc = "Timestamp is the seconds since" ++ "1970-01-01 00:00:00 UTC, for example: date +%s", ++ module = ?MODULE, function = set_last, ++ args = [{user, string}, {host, string}, {timestamp, integer}, {status, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = private_get, tags = [private], ++ desc = "Get some information from a user private storage", ++ module = ?MODULE, function = private_get, ++ args = [{user, string}, {host, string}, {element, string}, {ns, string}], ++ result = {res, string}}, ++ #ejabberd_commands{name = private_set, tags = [private], ++ desc = "Set to the user private storage", ++ module = ?MODULE, function = private_set, ++ args = [{user, string}, {host, string}, {element, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = srg_create, tags = [shared_roster_group], ++ desc = "Create a Shared Roster Group", ++ longdesc = "If you want to specify several group " ++ "identifiers in the Display argument,\n" ++ "put \\ \" around the argument and\nseparate the " ++ "identifiers with \\ \\ n\n" ++ "For example:\n" ++ " ejabberdctl srg_create group3 localhost " ++ "name desc \\\"group1\\\\ngroup2\\\"", ++ module = ?MODULE, function = srg_create, ++ args = [{group, string}, {host, string}, ++ {name, string}, {description, string}, {display, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = srg_delete, tags = [shared_roster_group], ++ desc = "Delete a Shared Roster Group", ++ module = ?MODULE, function = srg_delete, ++ args = [{group, string}, {host, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = srg_list, tags = [shared_roster_group], ++ desc = "List the Shared Roster Groups in Host", ++ module = ?MODULE, function = srg_list, ++ args = [{host, string}], ++ result = {groups, {list, {id, string}}}}, ++ #ejabberd_commands{name = srg_get_info, tags = [shared_roster_group], ++ desc = "Get info of a Shared Roster Group", ++ module = ?MODULE, function = srg_get_info, ++ args = [{group, string}, {host, string}], ++ result = {informations, {list, {information, {tuple, [{key, string}, {value, string}]}}}}}, ++ #ejabberd_commands{name = srg_get_members, tags = [shared_roster_group], ++ desc = "Get members of a Shared Roster Group", ++ module = ?MODULE, function = srg_get_members, ++ args = [{group, string}, {host, string}], ++ result = {members, {list, {member, string}}}}, ++ #ejabberd_commands{name = srg_user_add, tags = [shared_roster_group], ++ desc = "Add the JID user@host to the Shared Roster Group", ++ module = ?MODULE, function = srg_user_add, ++ args = [{user, string}, {host, string}, {group, string}, {grouphost, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = srg_user_del, tags = [shared_roster_group], ++ desc = "Delete this JID user@host from the Shared Roster Group", ++ module = ?MODULE, function = srg_user_del, ++ args = [{user, string}, {host, string}, {group, string}, {grouphost, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = send_message_chat, tags = [stanza], ++ desc = "Send a chat message to a local or remote bare of full JID", ++ module = ?MODULE, function = send_message_chat, ++ args = [{from, string}, {to, string}, {body, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = send_message_headline, tags = [stanza], ++ desc = "Send a headline message to a local or remote bare of full JID", ++ module = ?MODULE, function = send_message_headline, ++ args = [{from, string}, {to, string}, ++ {subject, string}, {body, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = send_stanza_c2s, tags = [stanza], ++ desc = "Send a stanza as if sent from a c2s session", ++ module = ?MODULE, function = send_stanza_c2s, ++ args = [{user, string}, {host, string}, {resource, string}, {stanza, string}], ++ result = {res, rescode}}, ++ #ejabberd_commands{name = privacy_set, tags = [stanza], ++ desc = "Send a IQ set privacy stanza for a local account", ++ module = ?MODULE, function = privacy_set, ++ args = [{user, string}, {host, string}, {xmlquery, string}], ++ result = {res, rescode}}, ++ ++ #ejabberd_commands{name = stats, tags = [stats], ++ desc = "Get statistical value: registeredusers onlineusers onlineusersnode uptimeseconds", ++ module = ?MODULE, function = stats, ++ args = [{name, string}], ++ result = {stat, integer}}, ++ #ejabberd_commands{name = stats_host, tags = [stats], ++ desc = "Get statistical value for this host: registeredusers onlineusers", ++ module = ?MODULE, function = stats, ++ args = [{name, string}, {host, string}], ++ result = {stat, integer}} ++ ]. ++ ++ ++%%% ++%%% Node ++%%% ++ ++compile(File) -> ++ case compile:file(File) of ++ ok -> ok; ++ _ -> error ++ end. ++ ++load_config(Path) -> ++ ok = ejabberd_config:load_file(Path). ++ ++get_cookie() -> ++ atom_to_list(erlang:get_cookie()). ++ ++remove_node(Node) -> ++ mnesia:del_table_copy(schema, list_to_atom(Node)), ++ ok. ++ ++export2odbc(Host, Directory) -> ++ Tables = [ ++ {export_last, last}, ++ {export_offline, offline}, ++ {export_passwd, passwd}, ++ {export_private_storage, private_storage}, ++ {export_roster, roster}, ++ {export_vcard, vcard}, ++ {export_vcard_search, vcard_search}], ++ Export = fun({TableFun, Table}) -> ++ Filename = filename:join([Directory, atom_to_list(Table)++".txt"]), ++ io:format("Trying to export Mnesia table '~p' on Host '~s' to file '~s'~n", [Table, Host, Filename]), ++ Res = (catch ejd2odbc:TableFun(Host, Filename)), ++ io:format(" Result: ~p~n", [Res]) ++ end, ++ lists:foreach(Export, Tables), ++ ok. ++ ++ ++%%% ++%%% Accounts ++%%% ++ ++set_password(User, Host, Password) -> ++ case ejabberd_auth:set_password(User, Host, Password) of ++ ok -> ++ ok; ++ _ -> ++ error ++ end. ++ ++%% Copied some code from ejabberd_commands.erl ++check_password_hash(User, Host, PasswordHash, HashMethod) -> ++ AccountPass = ejabberd_auth:get_password_s(User, Host), ++ AccountPassHash = case HashMethod of ++ "md5" -> get_md5(AccountPass); ++ "sha" -> get_sha(AccountPass); ++ _ -> undefined ++ end, ++ case AccountPassHash of ++ undefined -> error; ++ PasswordHash -> ok; ++ _ -> error ++ end. ++get_md5(AccountPass) -> ++ lists:flatten([io_lib:format("~.16B", [X]) ++ || X <- binary_to_list(crypto:md5(AccountPass))]). ++get_sha(AccountPass) -> ++ lists:flatten([io_lib:format("~.16B", [X]) ++ || X <- binary_to_list(crypto:sha(AccountPass))]). ++ ++num_active_users(Host, Days) -> ++ list_last_activity(Host, true, Days). ++ ++%% Code based on ejabberd/src/web/ejabberd_web_admin.erl ++list_last_activity(Host, Integral, Days) -> ++ {MegaSecs, Secs, _MicroSecs} = now(), ++ TimeStamp = MegaSecs * 1000000 + Secs, ++ TS = TimeStamp - Days * 86400, ++ case catch mnesia:dirty_select( ++ last_activity, [{{last_activity, {'_', Host}, '$1', '_'}, ++ [{'>', '$1', TS}], ++ [{'trunc', {'/', ++ {'-', TimeStamp, '$1'}, ++ 86400}}]}]) of ++ {'EXIT', _Reason} -> ++ []; ++ Vals -> ++ Hist = histogram(Vals, Integral), ++ if ++ Hist == [] -> ++ 0; ++ true -> ++ Left = Days - length(Hist), ++ Tail = if ++ Integral -> ++ lists:duplicate(Left, lists:last(Hist)); ++ true -> ++ lists:duplicate(Left, 0) ++ end, ++ lists:nth(Days, Hist ++ Tail) ++ end ++ end. ++histogram(Values, Integral) -> ++ histogram(lists:sort(Values), Integral, 0, 0, []). ++histogram([H | T], Integral, Current, Count, Hist) when Current == H -> ++ histogram(T, Integral, Current, Count + 1, Hist); ++histogram([H | _] = Values, Integral, Current, Count, Hist) when Current < H -> ++ if ++ Integral -> ++ histogram(Values, Integral, Current + 1, Count, [Count | Hist]); ++ true -> ++ histogram(Values, Integral, Current + 1, 0, [Count | Hist]) ++ end; ++histogram([], _Integral, _Current, Count, Hist) -> ++ if ++ Count > 0 -> ++ lists:reverse([Count | Hist]); ++ true -> ++ lists:reverse(Hist) ++ end. ++ ++ ++delete_old_users(Days) -> ++ %% Get the list of registered users ++ Users = ejabberd_auth:dirty_get_registered_users(), ++ ++ {removed, N, UR} = delete_old_users(Days, Users), ++ {ok, io_lib:format("Deleted ~p users: ~p", [N, UR])}. ++ ++delete_old_users_vhost(Host, Days) -> ++ %% Get the list of registered users ++ Users = ejabberd_auth:get_vh_registered_users(Host), ++ ++ {removed, N, UR} = delete_old_users(Days, Users), ++ {ok, io_lib:format("Deleted ~p users: ~p", [N, UR])}. ++ ++delete_old_users(Days, Users) -> ++ %% Convert older time ++ SecOlder = Days*24*60*60, ++ ++ %% Get current time ++ {MegaSecs, Secs, _MicroSecs} = now(), ++ TimeStamp_now = MegaSecs * 1000000 + Secs, ++ ++ %% For a user, remove if required and answer true ++ F = fun({LUser, LServer}) -> ++ %% Check if the user is logged ++ case ejabberd_sm:get_user_resources(LUser, LServer) of ++ %% If it isnt ++ [] -> ++ %% Look for his last_activity ++ case (get_lastactivity_module(LServer)):get_last_info(LUser, LServer) of ++ %% If it is ++ %% existent: ++ {ok, TimeStamp, _Status} -> ++ %% get his age ++ Sec = TimeStamp_now - TimeStamp, ++ %% If he is ++ if ++ %% younger than SecOlder: ++ Sec < SecOlder -> ++ %% do nothing ++ false; ++ %% older: ++ true -> ++ %% remove the user ++ ejabberd_auth:remove_user(LUser, LServer), ++ true ++ end; ++ %% nonexistent: ++ not_found -> ++ %% remove the user ++ ejabberd_auth:remove_user(LUser, LServer), ++ true ++ end; ++ %% Else ++ _ -> ++ %% do nothing ++ false ++ end ++ end, ++ %% Apply the function to every user in the list ++ Users_removed = lists:filter(F, Users), ++ {removed, length(Users_removed), Users_removed}. ++ ++get_lastactivity_module(Server) -> ++ case lists:member(mod_last, gen_mod:loaded_modules(Server)) of ++ true -> mod_last; ++ _ -> mod_last_odbc ++ end. ++ ++ ++%% ++%% Ban account ++ ++ban_account(User, Host, ReasonText) -> ++ Reason = prepare_reason(ReasonText), ++ kick_sessions(User, Host, Reason), ++ set_random_password(User, Host, Reason), ++ ok. ++ ++kick_sessions(User, Server, Reason) -> ++ lists:map( ++ fun(Resource) -> ++ kick_this_session(User, Server, Resource, Reason) ++ end, ++ get_resources(User, Server)). ++ ++get_resources(User, Server) -> ++ lists:map( ++ fun(Session) -> ++ element(3, Session#session.usr) ++ end, ++ get_sessions(User, Server)). ++ ++get_sessions(User, Server) -> ++ LUser = jlib:nodeprep(User), ++ LServer = jlib:nameprep(Server), ++ Sessions = mnesia:dirty_index_read(session, {LUser, LServer}, #session.us), ++ true = is_list(Sessions), ++ Sessions. ++ ++set_random_password(User, Server, Reason) -> ++ NewPass = build_random_password(Reason), ++ set_password_auth(User, Server, NewPass). ++ ++build_random_password(Reason) -> ++ Date = jlib:timestamp_to_iso(calendar:universal_time()), ++ RandomString = randoms:get_string(), ++ "BANNED_ACCOUNT--" ++ Date ++ "--" ++ RandomString ++ "--" ++ Reason. ++ ++set_password_auth(User, Server, Password) -> ++ ok = ejabberd_auth:set_password(User, Server, Password). ++ ++prepare_reason([]) -> ++ "Kicked by administrator"; ++prepare_reason([Reason]) -> ++ Reason; ++prepare_reason(Reason) when is_list(Reason) -> ++ Reason; ++prepare_reason(StringList) -> ++ string:join(StringList, "_"). ++ ++ ++%%% ++%%% Sessions ++%%% ++ ++num_resources(User, Host) -> ++ length(ejabberd_sm:get_user_resources(User, Host)). ++ ++resource_num(User, Host, Num) -> ++ Resources = ejabberd_sm:get_user_resources(User, Host), ++ case (0 ++ lists:nth(Num, Resources); ++ false -> ++ lists:flatten(io_lib:format("Error: Wrong resource number: ~p", [Num])) ++ end. ++ ++kick_session(User, Server, Resource, ReasonText) -> ++ kick_this_session(User, Server, Resource, prepare_reason(ReasonText)), ++ ok. ++ ++kick_this_session(User, Server, Resource, Reason) -> ++ ejabberd_router:route( ++ jlib:make_jid("", "", ""), ++ jlib:make_jid(User, Server, Resource), ++ {xmlelement, "broadcast", [], [{exit, Reason}]}). ++ ++ ++status_num(Host, Status) -> ++ length(get_status_list(Host, Status)). ++status_num(Status) -> ++ status_num("all", Status). ++status_list(Host, Status) -> ++ Res = get_status_list(Host, Status), ++ [{U, S, R, P, St} || {U, S, R, P, St} <- Res]. ++status_list(Status) -> ++ status_list("all", Status). ++ ++ ++get_status_list(Host, Status_required) -> ++ %% Get list of all logged users ++ Sessions = ejabberd_sm:dirty_get_my_sessions_list(), ++ %% Reformat the list ++ Sessions2 = [ {Session#session.usr, Session#session.sid, Session#session.priority} || Session <- Sessions], ++ Fhost = case Host of ++ "all" -> ++ %% All hosts are requested, so dont filter at all ++ fun(_, _) -> true end; ++ _ -> ++ %% Filter the list, only Host is interesting ++ fun(A, B) -> A == B end ++ end, ++ Sessions3 = [ {Pid, Server, Priority} || {{_User, Server, _Resource}, {_, Pid}, Priority} <- Sessions2, apply(Fhost, [Server, Host])], ++ %% For each Pid, get its presence ++ Sessions4 = [ {ejabberd_c2s:get_presence(Pid), Server, Priority} || {Pid, Server, Priority} <- Sessions3], ++ %% Filter by status ++ Fstatus = case Status_required of ++ "all" -> ++ fun(_, _) -> true end; ++ _ -> ++ fun(A, B) -> A == B end ++ end, ++ [{User, Server, Resource, Priority, stringize(Status_text)} ++ || {{User, Resource, Status, Status_text}, Server, Priority} <- Sessions4, ++ apply(Fstatus, [Status, Status_required])]. ++ ++connected_users_info() -> ++ USRIs = dirty_get_sessions_list2(), ++ CurrentSec = calendar:datetime_to_gregorian_seconds({date(), time()}), ++ lists:map( ++ fun([{U, S, R}, {Now, Pid}, Priority, Info]) -> ++ Conn = proplists:get_value(conn, Info), ++ {Ip, Port} = proplists:get_value(ip, Info), ++ IPS = inet_parse:ntoa(Ip), ++ NodeS = atom_to_list(node(Pid)), ++ Uptime = CurrentSec - calendar:datetime_to_gregorian_seconds( ++ calendar:now_to_local_time(Now)), ++ {[U, $@, S, $/, R], atom_to_list(Conn), IPS, Port, Priority, NodeS, Uptime} ++ end, ++ USRIs). ++ ++connected_users_vhost(Host) -> ++ USRs = ejabberd_sm:get_vh_session_list(Host), ++ [ [U, $@, S, $/, R] || {U, S, R} <- USRs]. ++ ++%% Code copied from ejabberd_sm.erl and customized ++dirty_get_sessions_list2() -> ++ mnesia:dirty_select( ++ session, ++ [{#session{usr = '$1', sid = '$2', priority = '$3', info = '$4', _ = '_'}, ++ [], ++ [['$1', '$2', '$3', '$4']]}]). ++ ++%% Make string more print-friendly ++stringize(String) -> ++ %% Replace newline characters with other code ++ ejabberd_regexp:greplace(String, "\n", "\\n"). ++ ++set_presence(User, Host, Resource, Type, Show, Status, Priority) -> ++ Pid = ejabberd_sm:get_session_pid(User, Host, Resource), ++ USR = User ++ "@" ++ Host ++ "/" ++ Resource, ++ US = User ++ "@" ++ Host, ++ Message = {route_xmlstreamelement, ++ {xmlelement, "presence", ++ [{"from", USR}, {"to", US}, {"type", Type}], ++ [{xmlelement, "show", [], [{xmlcdata, Show}]}, ++ {xmlelement, "status", [], [{xmlcdata, Status}]}, ++ {xmlelement, "priority", [], [{xmlcdata, Priority}]}]}}, ++ Pid ! Message. ++ ++user_sessions_info(User, Host) -> ++ CurrentSec = calendar:datetime_to_gregorian_seconds({date(), time()}), ++ US = {User, Host}, ++ Sessions = case catch mnesia:dirty_index_read(session, US, #session.us) of ++ {'EXIT', _Reason} -> ++ []; ++ Ss -> ++ Ss ++ end, ++ lists:map( ++ fun(Session) -> ++ {_U, _S, Resource} = Session#session.usr, ++ {Now, Pid} = Session#session.sid, ++ {_U, _Resource, Status, StatusText} = ejabberd_c2s:get_presence(Pid), ++ Info = Session#session.info, ++ Priority = Session#session.priority, ++ Conn = proplists:get_value(conn, Info), ++ {Ip, Port} = proplists:get_value(ip, Info), ++ IPS = inet_parse:ntoa(Ip), ++ NodeS = atom_to_list(node(Pid)), ++ Uptime = CurrentSec - calendar:datetime_to_gregorian_seconds( ++ calendar:now_to_local_time(Now)), ++ {atom_to_list(Conn), IPS, Port, Priority, NodeS, Uptime, Status, Resource, StatusText} ++ end, ++ Sessions). ++ ++ ++%%% ++%%% Vcard ++%%% ++ ++set_nickname(User, Host, Nickname) -> ++ R = mod_vcard:process_sm_iq( ++ {jid, User, Host, "", User, Host, ""}, ++ {jid, User, Host, "", User, Host, ""}, ++ {iq, "", set, "", "en", ++ {xmlelement, "vCard", ++ [{"xmlns", "vcard-temp"}], [ ++ {xmlelement, "NICKNAME", [], [{xmlcdata, Nickname}]} ++ ] ++ }}), ++ case R of ++ {iq, [], result, [], _L, []} -> ++ ok; ++ _ -> ++ error ++ end. ++ ++get_vcard(User, Host, Name) -> ++ [Res | _] = get_vcard_content(User, Host, [Name]), ++ Res. ++ ++get_vcard(User, Host, Name, Subname) -> ++ [Res | _] = get_vcard_content(User, Host, [Name, Subname]), ++ Res. ++ ++get_vcard_multi(User, Host, Name, Subname) -> ++ get_vcard_content(User, Host, [Name, Subname]). ++ ++set_vcard(User, Host, Name, SomeContent) -> ++ set_vcard_content(User, Host, [Name], SomeContent). ++ ++set_vcard(User, Host, Name, Subname, SomeContent) -> ++ set_vcard_content(User, Host, [Name, Subname], SomeContent). ++ ++ ++%% ++%% Internal vcard ++ ++get_module_resource(Server) -> ++ case gen_mod:get_module_opt(Server, ?MODULE, module_resource, none) of ++ none -> atom_to_list(?MODULE); ++ R when is_list(R) -> R ++ end. ++ ++get_vcard_content(User, Server, Data) -> ++ [{_, Module, Function, _Opts}] = ets:lookup(sm_iqtable, {?NS_VCARD, Server}), ++ JID = jlib:make_jid(User, Server, get_module_resource(Server)), ++ IQ = #iq{type = get, xmlns = ?NS_VCARD}, ++ IQr = Module:Function(JID, JID, IQ), ++ case IQr#iq.sub_el of ++ [A1] -> ++ case get_vcard(Data, A1) of ++ [] -> throw(error_no_value_found_in_vcard); ++ ElemList -> [xml:get_tag_cdata(Elem) || Elem <- ElemList] ++ end; ++ [] -> ++ throw(error_no_vcard_found) ++ end. ++ ++get_vcard([Data1, Data2], A1) -> ++ case get_subtag(A1, Data1) of ++ false -> false; ++ A2List -> lists:flatten([get_vcard([Data2], A2) || A2 <- A2List]) ++ end; ++ ++get_vcard([Data], A1) -> ++ get_subtag(A1, Data). ++ ++get_subtag(Xmlelement, Name) -> ++ case code:ensure_loaded(exmpp_xml) of ++ {error, _} -> ++ [get_subtag_xml(Xmlelement, Name)]; ++ {module, exmpp_xml} -> ++ get_subtag_exmpp(Xmlelement, Name) ++ end. ++ ++get_subtag_xml(Xmlelement, Name) -> ++ xml:get_subtag(Xmlelement, Name). ++ ++get_subtag_exmpp(Xmlelement, Name) -> ++ Xmlel = exmpp_xml:xmlelement_to_xmlel(Xmlelement), ++ XmlelList = exmpp_xml:get_elements(Xmlel, Name), ++ [exmpp_xml:xmlel_to_xmlelement(Xmlel2) || Xmlel2 <- XmlelList]. ++ ++set_vcard_content(User, Server, Data, SomeContent) -> ++ ContentList = case SomeContent of ++ [Char | _] when not is_list(Char) -> [SomeContent]; ++ [Char | _] when is_list(Char) -> SomeContent ++ end, ++ [{_, Module, Function, _Opts}] = ets:lookup(sm_iqtable, {?NS_VCARD, Server}), ++ JID = jlib:make_jid(User, Server, get_module_resource(Server)), ++ IQ = #iq{type = get, xmlns = ?NS_VCARD}, ++ IQr = Module:Function(JID, JID, IQ), ++ ++ %% Get old vcard ++ A4 = case IQr#iq.sub_el of ++ [A1] -> ++ {_, _, _, A2} = A1, ++ update_vcard_els(Data, ContentList, A2); ++ [] -> ++ update_vcard_els(Data, ContentList, []) ++ end, ++ ++ %% Build new vcard ++ SubEl = {xmlelement, "vCard", [{"xmlns","vcard-temp"}], A4}, ++ IQ2 = #iq{type=set, sub_el = SubEl}, ++ ++ Module:Function(JID, JID, IQ2), ++ ok. ++ ++update_vcard_els(Data, ContentList, Els1) -> ++ Els2 = lists:keysort(2, Els1), ++ [Data1 | Data2] = Data, ++ NewEls = case Data2 of ++ [] -> ++ [{xmlelement, Data1, [], [{xmlcdata,Content}]} || Content <- ContentList]; ++ [D2] -> ++ OldEl = case lists:keysearch(Data1, 2, Els2) of ++ {value, A} -> A; ++ false -> {xmlelement, Data1, [], []} ++ end, ++ {xmlelement, _, _, ContentOld1} = OldEl, ++ Content2 = [{xmlelement, D2, [], [{xmlcdata,Content}]} || Content <- ContentList], ++ ContentOld2 = [A || {_, X, _, _} = A <- ContentOld1, X/=D2], ++ ContentOld3 = lists:keysort(2, ContentOld2), ++ ContentNew = lists:keymerge(2, Content2, ContentOld3), ++ [{xmlelement, Data1, [], ContentNew}] ++ end, ++ Els3 = lists:keydelete(Data1, 2, Els2), ++ lists:keymerge(2, NewEls, Els3). ++ ++ ++%%% ++%%% Roster ++%%% ++ ++add_rosteritem(LocalUser, LocalServer, User, Server, Nick, Group, Subs) -> ++ case add_rosteritem(LocalUser, LocalServer, User, Server, Nick, Group, list_to_atom(Subs), []) of ++ {atomic, ok} -> ++ push_roster_item(LocalUser, LocalServer, User, Server, {add, Nick, Subs, Group}), ++ ok; ++ _ -> ++ error ++ end. ++ ++add_rosteritem(LU, LS, User, Server, Nick, Group, Subscription, Xattrs) -> ++ subscribe(LU, LS, User, Server, Nick, Group, Subscription, Xattrs). ++ ++subscribe(LU, LS, User, Server, Nick, Group, Subscription, Xattrs) -> ++ mnesia:transaction( ++ fun() -> ++ mnesia:write({roster, ++ {LU,LS,{User,Server,[]}}, % uj ++ {LU,LS}, % user ++ {User,Server,[]}, % jid ++ Nick, % name: "Mom", [] ++ Subscription, % subscription: none, to=you see him, from=he sees you, both ++ none, % ask: out=send request, in=somebody requests you, none ++ [Group], % groups: ["Family"] ++ Xattrs, % xattrs: [{"category","conference"}] ++ [] % xs: [] ++ }) ++ end). ++ ++delete_rosteritem(LocalUser, LocalServer, User, Server) -> ++ case unsubscribe(LocalUser, LocalServer, User, Server) of ++ {atomic, ok} -> ++ push_roster_item(LocalUser, LocalServer, User, Server, remove), ++ ok; ++ _ -> ++ error ++ end. ++ ++unsubscribe(LU, LS, User, Server) -> ++ mnesia:transaction( ++ fun() -> ++ mnesia:delete({roster, {LU, LS, {User, Server, []}}}) ++ end). ++ ++ ++%% ----------------------------- ++%% Get Roster ++%% ----------------------------- ++ ++get_roster(User, Server) -> ++ Items = ejabberd_hooks:run_fold(roster_get, Server, [], [{User, Server}]), ++ make_roster_xmlrpc(Items). ++ ++%% Note: if a contact is in several groups, the contact is returned ++%% several times, each one in a different group. ++make_roster_xmlrpc(Roster) -> ++ lists:foldl( ++ fun(Item, Res) -> ++ JIDS = jlib:jid_to_string(Item#roster.jid), ++ Nick = Item#roster.name, ++ Subs = atom_to_list(Item#roster.subscription), ++ Ask = atom_to_list(Item#roster.ask), ++ Groups = case Item#roster.groups of ++ [] -> [""]; ++ Gs -> Gs ++ end, ++ ItemsX = [{JIDS, Nick, Subs, Ask, Group} ++ || Group <- Groups], ++ ItemsX ++ Res ++ end, ++ [], ++ Roster). ++ ++ ++%%----------------------------- ++%% Push Roster from file ++%%----------------------------- ++ ++push_roster(File, User, Server) -> ++ {ok, [Roster]} = file:consult(File), ++ subscribe_roster({User, Server, "", User}, Roster). ++ ++push_roster_all(File) -> ++ {ok, [Roster]} = file:consult(File), ++ subscribe_all(Roster). ++ ++subscribe_all(Roster) -> ++ subscribe_all(Roster, Roster). ++subscribe_all([], _) -> ++ ok; ++subscribe_all([User1 | Users], Roster) -> ++ subscribe_roster(User1, Roster), ++ subscribe_all(Users, Roster). ++ ++subscribe_roster(_, []) -> ++ ok; ++%% Do not subscribe a user to itself ++subscribe_roster({Name, Server, Group, Nick}, [{Name, Server, _, _} | Roster]) -> ++ subscribe_roster({Name, Server, Group, Nick}, Roster); ++%% Subscribe Name2 to Name1 ++subscribe_roster({Name1, Server1, Group1, Nick1}, [{Name2, Server2, Group2, Nick2} | Roster]) -> ++ subscribe(Name1, Server1, Name2, Server2, Nick2, Group2, both, []), ++ subscribe_roster({Name1, Server1, Group1, Nick1}, Roster). ++ ++push_alltoall(S, G) -> ++ Users = ejabberd_auth:get_vh_registered_users(S), ++ Users2 = build_list_users(G, Users, []), ++ subscribe_all(Users2), ++ ok. ++ ++build_list_users(_Group, [], Res) -> ++ Res; ++build_list_users(Group, [{User, Server}|Users], Res) -> ++ build_list_users(Group, Users, [{User, Server, Group, User}|Res]). ++ ++%% @spec(LU, LS, U, S, Action) -> ok ++%% Action = {add, Nick, Subs, Group} | remove ++%% @doc Push to the roster of account LU@LS the contact U@S. ++%% The specific action to perform is defined in Action. ++push_roster_item(LU, LS, U, S, Action) -> ++ lists:foreach(fun(R) -> ++ push_roster_item(LU, LS, R, U, S, Action) ++ end, ejabberd_sm:get_user_resources(LU, LS)). ++ ++push_roster_item(LU, LS, R, U, S, Action) -> ++ LJID = jlib:make_jid(LU, LS, R), ++ BroadcastEl = build_broadcast(U, S, Action), ++ ejabberd_router:route(LJID, LJID, BroadcastEl), ++ Item = build_roster_item(U, S, Action), ++ ResIQ = build_iq_roster_push(Item), ++ ejabberd_router:route(LJID, LJID, ResIQ). ++ ++build_roster_item(U, S, {add, Nick, Subs, Group}) -> ++ {xmlelement, "item", ++ [{"jid", jlib:jid_to_string(jlib:make_jid(U, S, ""))}, ++ {"name", Nick}, ++ {"subscription", Subs}], ++ [{xmlelement, "group", [], [{xmlcdata, Group}]}] ++ }; ++build_roster_item(U, S, remove) -> ++ {xmlelement, "item", ++ [{"jid", jlib:jid_to_string(jlib:make_jid(U, S, ""))}, ++ {"subscription", "remove"}], ++ [] ++ }. ++ ++build_iq_roster_push(Item) -> ++ {xmlelement, "iq", ++ [{"type", "set"}, {"id", "push"}], ++ [{xmlelement, "query", ++ [{"xmlns", ?NS_ROSTER}], ++ [Item] ++ } ++ ] ++ }. ++ ++build_broadcast(U, S, {add, _Nick, Subs, _Group}) -> ++ build_broadcast(U, S, list_to_atom(Subs)); ++build_broadcast(U, S, remove) -> ++ build_broadcast(U, S, none); ++%% @spec (U::string(), S::string(), Subs::atom()) -> any() ++%% Subs = both | from | to | none ++build_broadcast(U, S, SubsAtom) when is_atom(SubsAtom) -> ++ {xmlelement, "broadcast", [], ++ [{item, {U, S, ""}, SubsAtom}] ++ }. ++ ++%%% ++%%% Last Activity ++%%% ++ ++set_last(User, Server, Timestamp, Status) -> ++ Mod = get_lastactivity_module(Server), ++ Mod:store_last_info(User, Server, Timestamp, Status). ++ ++%%% ++%%% Private Storage ++%%% ++ ++%% Example usage: ++%% $ ejabberdctl private_set badlop localhost "\Cluth\" ++%% $ ejabberdctl private_get badlop localhost aa bb ++%% Cluth ++ ++private_get(Username, Host, Element, Ns) -> ++ From = jlib:make_jid(Username, Host, ""), ++ To = jlib:make_jid(Username, Host, ""), ++ IQ = {iq, "", get, ?NS_PRIVATE, "", ++ {xmlelement,"query", ++ [{"xmlns",?NS_PRIVATE}], ++ [{xmlelement, Element, [{"xmlns", Ns}], []}]}}, ++ ResIq = mod_private:process_sm_iq(From, To, IQ), ++ [{xmlelement,"query", ++ [{"xmlns","jabber:iq:private"}], ++ [SubEl]}] = ResIq#iq.sub_el, ++ xml:element_to_string(SubEl). ++ ++private_set(Username, Host, ElementString) -> ++ case xml_stream:parse_element(ElementString) of ++ {error, Error} -> ++ io:format("Error found parsing the element:~n ~p~nError: ~p~n", ++ [ElementString, Error]), ++ error; ++ Xml -> ++ private_set2(Username, Host, Xml) ++ end. ++ ++private_set2(Username, Host, Xml) -> ++ From = jlib:make_jid(Username, Host, ""), ++ To = jlib:make_jid(Username, Host, ""), ++ IQ = {iq, "", set, ?NS_PRIVATE, "", ++ {xmlelement,"query", ++ [{"xmlns",?NS_PRIVATE}], ++ [Xml]}}, ++ mod_private:process_sm_iq(From, To, IQ), ++ ok. ++ ++%%% ++%%% Shared Roster Groups ++%%% ++ ++srg_create(Group, Host, Name, Description, Display) -> ++ DisplayList = case Display of ++ [] -> []; ++ _ -> ejabberd_regexp:split(Display, "\\\\n") ++ end, ++ Opts = [{name, Name}, ++ {displayed_groups, DisplayList}, ++ {description, Description}], ++ {atomic, ok} = mod_shared_roster:create_group(Host, Group, Opts), ++ ok. ++ ++srg_delete(Group, Host) -> ++ {atomic, ok} = mod_shared_roster:delete_group(Host, Group), ++ ok. ++ ++srg_list(Host) -> ++ lists:sort(mod_shared_roster:list_groups(Host)). ++ ++srg_get_info(Group, Host) -> ++ Opts = mod_shared_roster:get_group_opts(Host,Group), ++ [{io_lib:format("~p", [Title]), ++ io_lib:format("~p", [Value])} || {Title, Value} <- Opts]. ++ ++srg_get_members(Group, Host) -> ++ Members = mod_shared_roster:get_group_explicit_users(Host,Group), ++ [jlib:jid_to_string(jlib:make_jid(MUser, MServer, "")) ++ || {MUser, MServer} <- Members]. ++ ++srg_user_add(User, Host, Group, GroupHost) -> ++ {atomic, ok} = mod_shared_roster:add_user_to_group(GroupHost, {User, Host}, Group), ++ ok. ++ ++srg_user_del(User, Host, Group, GroupHost) -> ++ {atomic, ok} = mod_shared_roster:remove_user_from_group(GroupHost, {User, Host}, Group), ++ ok. ++ ++ ++%%% ++%%% Stanza ++%%% ++ ++%% @doc Send a chat message to a Jabber account. ++%% @spec (From::string(), To::string(), Body::string()) -> ok ++send_message_chat(From, To, Body) -> ++ Packet = build_packet(message_chat, [Body]), ++ send_packet_all_resources(From, To, Packet). ++ ++%% @doc Send a headline message to a Jabber account. ++%% @spec (From::string(), To::string(), Subject::string(), Body::string()) -> ok ++send_message_headline(From, To, Subject, Body) -> ++ Packet = build_packet(message_headline, [Subject, Body]), ++ send_packet_all_resources(From, To, Packet). ++ ++%% @doc Send a packet to a Jabber account. ++%% If a resource was specified in the JID, ++%% the packet is sent only to that specific resource. ++%% If no resource was specified in the JID, ++%% and the user is remote or local but offline, ++%% the packet is sent to the bare JID. ++%% If the user is local and is online in several resources, ++%% the packet is sent to all its resources. ++send_packet_all_resources(FromJIDString, ToJIDString, Packet) -> ++ FromJID = jlib:string_to_jid(FromJIDString), ++ ToJID = jlib:string_to_jid(ToJIDString), ++ ToUser = ToJID#jid.user, ++ ToServer = ToJID#jid.server, ++ case ToJID#jid.resource of ++ "" -> ++ send_packet_all_resources(FromJID, ToUser, ToServer, Packet); ++ Res -> ++ send_packet_all_resources(FromJID, ToUser, ToServer, Res, Packet) ++ end. ++ ++send_packet_all_resources(FromJID, ToUser, ToServer, Packet) -> ++ case ejabberd_sm:get_user_resources(ToUser, ToServer) of ++ [] -> ++ send_packet_all_resources(FromJID, ToUser, ToServer, "", Packet); ++ ToResources -> ++ lists:foreach( ++ fun(ToResource) -> ++ send_packet_all_resources(FromJID, ToUser, ToServer, ++ ToResource, Packet) ++ end, ++ ToResources) ++ end. ++ ++send_packet_all_resources(FromJID, ToU, ToS, ToR, Packet) -> ++ ToJID = jlib:make_jid(ToU, ToS, ToR), ++ ejabberd_router:route(FromJID, ToJID, Packet). ++ ++ ++build_packet(message_chat, [Body]) -> ++ {xmlelement, "message", ++ [{"type", "chat"}, {"id", randoms:get_string()}], ++ [{xmlelement, "body", [], [{xmlcdata, Body}]}] ++ }; ++build_packet(message_headline, [Subject, Body]) -> ++ {xmlelement, "message", ++ [{"type", "headline"}, {"id", randoms:get_string()}], ++ [{xmlelement, "subject", [], [{xmlcdata, Subject}]}, ++ {xmlelement, "body", [], [{xmlcdata, Body}]} ++ ] ++ }. ++ ++send_stanza_c2s(Username, Host, Resource, Stanza) -> ++ C2sPid = ejabberd_sm:get_session_pid(Username, Host, Resource), ++ XmlEl = xml_stream:parse_element(Stanza), ++ p1_fsm:send_event(C2sPid, {xmlstreamelement, XmlEl}). ++ ++privacy_set(Username, Host, QueryS) -> ++ From = jlib:string_to_jid(Username ++ "@" ++ Host), ++ To = jlib:string_to_jid(Host), ++ QueryEl = xml_stream:parse_element(QueryS), ++ StanzaEl = {xmlelement, "iq", [{"type", "set"}], [QueryEl]}, ++ IQ = jlib:iq_query_info(StanzaEl), ++ ejabberd_hooks:run_fold( ++ privacy_iq_set, ++ Host, ++ {error, ?ERR_FEATURE_NOT_IMPLEMENTED}, ++ [From, To, IQ] ++ ), ++ ok. ++ ++%%% ++%%% Stats ++%%% ++ ++stats(Name) -> ++ case Name of ++ "uptimeseconds" -> trunc(element(1, erlang:statistics(wall_clock))/1000); ++ "registeredusers" -> length(ejabberd_auth:dirty_get_registered_users()); ++ "onlineusersnode" -> length(ejabberd_sm:dirty_get_my_sessions_list()); ++ "onlineusers" -> length(ejabberd_sm:dirty_get_sessions_list()) ++ end. ++ ++stats(Name, Host) -> ++ case Name of ++ "registeredusers" -> length(ejabberd_auth:get_vh_registered_users(Host)); ++ "onlineusers" -> length(ejabberd_sm:get_vh_session_list(Host)) ++ end. ++ ++ ++ ++%%----------------------------- ++%% Purge roster items ++%%----------------------------- ++ ++process_rosteritems(ActionS, SubsS, AsksS, UsersS, ContactsS) -> ++ Action = case ActionS of ++ "list" -> list; ++ "delete" -> delete ++ end, ++ ++ Subs = lists:foldl( ++ fun(any, _) -> [none, from, to, both]; ++ (Sub, Subs) -> [Sub | Subs] ++ end, ++ [], ++ [list_to_atom(S) || S <- string:tokens(SubsS, ":")] ++ ), ++ ++ Asks = lists:foldl( ++ fun(any, _) -> [none, out, in]; ++ (Ask, Asks) -> [Ask | Asks] ++ end, ++ [], ++ [list_to_atom(S) || S <- string:tokens(AsksS, ":")] ++ ), ++ ++ Users = lists:foldl( ++ fun("any", _) -> ["*", "*@*"]; ++ (U, Us) -> [U | Us] ++ end, ++ [], ++ [S || S <- string:tokens(UsersS, ":")] ++ ), ++ ++ Contacts = lists:foldl( ++ fun("any", _) -> ["*", "*@*"]; ++ (U, Us) -> [U | Us] ++ end, ++ [], ++ [S || S <- string:tokens(ContactsS, ":")] ++ ), ++ ++ case rosteritem_purge({Action, Subs, Asks, Users, Contacts}) of ++ {atomic, ok} -> ++ ok; ++ {error, Reason} -> ++ io:format("Error purging rosteritems: ~p~n", [Reason]), ++ error; ++ {badrpc, Reason} -> ++ io:format("BadRPC purging rosteritems: ~p~n", [Reason]), ++ error ++ end. ++ ++%% @spec ({Action::atom(), Subs::[atom()], Asks::[atom()], User::string(), Contact::string()}) -> {atomic, ok} ++rosteritem_purge(Options) -> ++ Num_rosteritems = mnesia:table_info(roster, size), ++ io:format("There are ~p roster items in total.~n", [Num_rosteritems]), ++ Key = mnesia:dirty_first(roster), ++ ok = rip(Key, Options, {0, Num_rosteritems, 0, 0}), ++ {atomic, ok}. ++ ++rip('$end_of_table', _Options, Counters) -> ++ print_progress_line(Counters), ++ ok; ++rip(Key, Options, {Pr, NT, NV, ND}) -> ++ Key_next = mnesia:dirty_next(roster, Key), ++ {Action, _, _, _, _} = Options, ++ ND2 = case decide_rip(Key, Options) of ++ true -> ++ apply_action(Action, Key), ++ ND+1; ++ false -> ++ ND ++ end, ++ NV2 = NV+1, ++ Pr2 = print_progress_line({Pr, NT, NV2, ND2}), ++ rip(Key_next, Options, {Pr2, NT, NV2, ND2}). ++ ++apply_action(list, Key) -> ++ {User, Server, JID} = Key, ++ {RUser, RServer, _} = JID, ++ io:format("Matches: ~s@~s ~s@~s~n", [User, Server, RUser, RServer]); ++apply_action(delete, Key) -> ++ apply_action(list, Key), ++ mnesia:dirty_delete(roster, Key). ++ ++print_progress_line({Pr, NT, NV, ND}) -> ++ Pr2 = trunc((NV/NT)*100), ++ case Pr == Pr2 of ++ true -> ++ ok; ++ false -> ++ io:format("Progress ~p% - visited ~p - deleted ~p~n", [Pr2, NV, ND]) ++ end, ++ Pr2. ++ ++decide_rip(Key, {_Action, Subs, Asks, User, Contact}) -> ++ case catch mnesia:dirty_read(roster, Key) of ++ [RI] -> ++ lists:member(RI#roster.subscription, Subs) ++ andalso lists:member(RI#roster.ask, Asks) ++ andalso decide_rip_jid(RI#roster.us, User) ++ andalso decide_rip_jid(RI#roster.jid, Contact); ++ _ -> ++ false ++ end. ++ ++%% Returns true if the server of the JID is included in the servers ++decide_rip_jid({UName, UServer, _UResource}, Match_list) -> ++ decide_rip_jid({UName, UServer}, Match_list); ++decide_rip_jid({UName, UServer}, Match_list) -> ++ lists:any( ++ fun(Match_string) -> ++ MJID = jlib:string_to_jid(Match_string), ++ MName = MJID#jid.luser, ++ MServer = MJID#jid.lserver, ++ Is_server = is_glob_match(UServer, MServer), ++ case MName of ++ [] when UName == [] -> ++ Is_server; ++ [] -> ++ false; ++ _ -> ++ Is_server ++ andalso is_glob_match(UName, MName) ++ end ++ end, ++ Match_list). ++ ++%% Copied from ejabberd-2.0.0/src/acl.erl ++is_regexp_match(String, RegExp) -> ++ case ejabberd_regexp:run(String, RegExp) of ++ nomatch -> ++ false; ++ match -> ++ true; ++ {error, ErrDesc} -> ++ io:format( ++ "Wrong regexp ~p in ACL: ~p", ++ [RegExp, ErrDesc]), ++ false ++ end. ++is_glob_match(String, [$! | Glob]) -> ++ not is_regexp_match(String, ejabberd_regexp:sh_to_awk(Glob)); ++is_glob_match(String, Glob) -> ++ is_regexp_match(String, ejabberd_regexp:sh_to_awk(Glob)). --- ejabberd-2.1.10.orig/debian/scripts/ejabberdctl +++ ejabberd-2.1.10/debian/scripts/ejabberdctl @@ -0,0 +1,67 @@ +#!/bin/sh + +ERLANG_NODE=ejabberd + +if [ -f /etc/default/ejabberd ] ; then + . /etc/default/ejabberd +fi + +if [ "$FIREWALL_WINDOW" = "" ] ; then + KERNEL_OPTS="" +else + KERNEL_OPTS="-kernel \ + inet_dist_listen_min ${FIREWALL_WINDOW%-*} \ + inet_dist_listen_max ${FIREWALL_WINDOW#*-}" +fi + +if [ -r /var/lib/ejabberd/.erlang.cookie ] ; then + HOME=/var/lib/ejabberd + export HOME +fi + +ERL_CRASH_DUMP=/var/log/ejabberd/erl_crash.dump +export ERL_CRASH_DUMP + +ERL=/usr/bin/erl +EBIN_DIR=/usr/lib/ejabberd/ebin +SUFFIX='' + +if [ $# -ne 0 ] ; then + case $1 in + --) shift; break ;; + --node) shift ; ERLANG_NODE=$1 ; shift ;; + --concurrent) shift; SUFFIX=$$ ;; + esac +fi + +if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then + SNAME=-sname +else + SNAME=-name +fi + +case $1 in + debug) + shift + + if [ "$ERLANG_NODE" = "${ERLANG_NODE%@*}" ] ; then + ERLANG_NODE=$ERLANG_NODE@$(hostname -s) + fi + + echo "Attaching Erlang shell to node $ERLANG_NODE." + echo "To detach it, press: Ctrl+G, q, Return" + echo "" + exec $ERL $SNAME ejabberddebug$SUFFIX \ + -remsh $ERLANG_NODE \ + $KERNEL_OPTS \ + "$@" + ;; + *) + exec $ERL $SNAME ejabberdctl$SUFFIX \ + -pa $EBIN_DIR \ + -s ejabberd_ctl \ + -noinput \ + $KERNEL_OPTS \ + -extra $ERLANG_NODE "$@" + ;; +esac --- ejabberd-2.1.10.orig/debian/scripts/ejabberd +++ ejabberd-2.1.10/debian/scripts/ejabberd @@ -0,0 +1,83 @@ +#!/bin/sh + +# define default configuration +POLL=false +SMP=disable +PROCESSES=250000 +ERL_MAX_PORTS=32000 +ERL_MAX_ETS_TABLES=1400 +ERLANG_NODE=ejabberd + +# Location of the guide.html, for the web administration interface: +EJABBERD_DOC_PATH=/usr/share/doc/ejabberd +export EJABBERD_DOC_PATH + +if [ -f /etc/default/ejabberd ] ; then + . /etc/default/ejabberd +fi + +if [ "$FIREWALL_WINDOW" = "" ] ; then + KERNEL_OPTS="" +else + KERNEL_OPTS="-kernel \ + inet_dist_listen_min ${FIREWALL_WINDOW%-*} \ + inet_dist_listen_max ${FIREWALL_WINDOW#*-}" +fi + +ERLANG_OPTS="+K $POLL -smp $SMP +P $PROCESSES $KERNEL_OPTS" + +if [ -r /var/lib/ejabberd/.erlang.cookie ] ; then + HOME=/var/lib/ejabberd + export HOME +fi + +ERL=/usr/bin/erl +EBIN_DIR=/usr/lib/ejabberd/ebin +CONFIG=/etc/ejabberd/ejabberd.cfg +INETRC=/etc/ejabberd/inetrc +LOG=/var/log/ejabberd/ejabberd.log +ERLANG_LOG=/var/log/ejabberd/erlang.log +SPOOL=/var/lib/ejabberd +ERL_CRASH_DUMP=/var/log/ejabberd/erl_crash.dump +EJABBERD_PID_PATH=/var/run/ejabberd/ejabberd.pid + +export ERL_CRASH_DUMP +export ERL_MAX_PORTS +export ERL_MAX_ETS_TABLES +export ERL_FULLSWEEP_AFTER +export EJABBERD_PID_PATH + + +ARGS= +while [ $# -ne 0 ] ; do + PARAM=$1 + shift + case $PARAM in + --) break ;; + --node) ERLANG_NODE=$1; shift ;; + --config) CONFIG=$1 ; shift ;; + --log) LOG=$1 ; shift ;; + --erlang-log) ERLANG_LOG=$1 ; shift ;; + --spool) SPOOL=$1 ; shift ;; + *) ARGS="$ARGS $PARAM" ;; + esac +done + +if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then + SNAME=-sname +else + SNAME=-name +fi + +umask 027 + +exec $ERL $SNAME $ERLANG_NODE \ + -pa $EBIN_DIR \ + -s ejabberd \ + -kernel inetrc \"$INETRC\" \ + -ejabberd config \"$CONFIG\" log_path \"$LOG\" \ + erlang_log_path \"$ERLANG_LOG\" \ + -sasl sasl_error_logger false \ + -mnesia dir \"$SPOOL\" \ + $ERLANG_OPTS $ERL_OPTIONS $ARGS "$@" + --- ejabberd-2.1.10.orig/debian/po/pt_BR.po +++ ejabberd-2.1.10/debian/po/pt_BR.po @@ -0,0 +1,106 @@ +# ejabberd Brazilian Portuguese translation +# Copyright (C) 2007 ejabberd's PACKAGE COPYRIGHT HOLDER +# This file is distributed under the same license as the ejabberd package. +# Alex de Oliveira Silva , 2007. +# Felipe Augusto van de Wiel (faw) \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "O nome da máquina na qual o ejabberd será servidor:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "" +"Por favor, informe o nome da máquina do seu servidor Jabber (em letras " +"minúsculas)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "O nome de usuário de uma conta administrativa para o ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Por favor, forneça o nome de uma conta para administrar o servidor ejabberd. " +"Depois da instalação do ejabberd você pode usar esta conta para logar em " +"qualquer cliente Jabber para realizar tarefas administrativas ou acesse " +"http://${hostname}:5280/admin/ e efetue o login com esta conta para entrar " +"na interface administrativa. Informe aqui a parte do nome de usuário (e.g. " +"${user}), mas use um ID Jabber completo (e.g. ${user}@${hostname}) para " +"efetuar login na interface web do ejabberd; caso contrário não funcionará." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Deixe vazio se você não quer criar automaticamente uma conta administrativa." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "A senha para a conta administrativa:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Por favor, informe a senha para o usuário administrativo." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "A senha para a conta administrativa, novamente, para verificação:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Por favor, informe novamente a senha do usuário administrativo para " +"verificação." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "As senhas não conferem!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "As senhas que você digitou não conferem. Por favor, tente novamente." --- ejabberd-2.1.10.orig/debian/po/it.po +++ ejabberd-2.1.10/debian/po/it.po @@ -0,0 +1,104 @@ +# Italian translation of ejabberd debconf messages. +# Copyright (C) 2012, ejabberd package copyright holder. +# This file is distributed under the same license as the ejabberd package. +# Beatrice Torracca , 2012. +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2012-07-22 13:11+0200\n" +"Last-Translator: Beatrice Torracca \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Il nome dell'host per cui ejabberd farà da server:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Inserire il nome host del server Jabber (in lettere minuscole)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Il nome utente di un account di amministrazione per ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Inserire il nome di un account per amministrare il server ejabberd. Dopo " +"l'installazione di ejabberd sarà possibile usare questo account per fare il " +"login con qualsiasi client Jabber per svolgere compiti di amministrazione " +"oppure si potrà andare all'indirizzo http://${hostname}:5280/admin/ e fare " +"il login con questo account per entrare nell'interfaccia di amministrazione. " +"Inserire qui la parte del nome utente (ad esempio ${user}), ma usare l'ID " +"Jabber completo (ad esempio ${user}@${hostname}) per fare il login " +"nell'interfaccia web, altrimenti non riuscirà." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Lasciare vuoto se non si desidera creare automaticamente un account di " +"amministrazione." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "La password per l'account di amministrazione:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Inserire la password dell'utente amministratore." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "" +"Inserire nuovamente la password per l'account di amministrazione per " +"verifica:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Reinserire la password per l'utente amministratore per verifica." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Le password non corrispondono." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Le password inserite non corrispondono. Riprovare." --- ejabberd-2.1.10.orig/debian/po/cs.po +++ ejabberd-2.1.10/debian/po/cs.po @@ -0,0 +1,102 @@ +# Czech translation of ejabberd debconf messages +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ejabberd package. +# Miroslav Kure , 2006, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-26 18:50+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Jméno počítače, na kterém bude ejabberd sloužit:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "" +"Zadejte prosím jméno počítače vašeho jabberového serveru (malými písmeny)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Jméno administrátorského účtu pro ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Zadejte prosím jméno účtu, který bude spravovat ejabberd server. Po " +"instalaci serveru ejabberd se můžete pomocí tohoto účtu přihlásit z " +"libovolného jabberového klienta a vzdáleně tak provádět správcovské úkony. " +"Jinou možností je webové rozhraní na http://${hostname}:5280/admin/, kde se " +"s tímto účtem (např. „${user}@${hostname}“) taktéž můžete přihlásit do " +"správcovského rozhraní. (Zde zadejte pouze uživatelskou část (např. " +"${user}), ale pro přihlášení do webového rozhraní používejte kompletní ID " +"včetně jména serveru.)" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Jestliže nechcete automaticky vytvořit správcovský účet, ponechte prázdné." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Heslo správcovského účtu:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Zadejte prosím heslo uživatele se správcovskými oprávněními." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Ověření hesla správcovského účtu:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Pro ověření prosím zopakujte heslo uživatele se správcovskými oprávněními." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Hesla nesouhlasí!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Zadaná hesla nesouhlasí. Zkuste to prosím znovu." --- ejabberd-2.1.10.orig/debian/po/fi.po +++ ejabberd-2.1.10/debian/po/fi.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-21 08:41+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Palvelin, jolla ejabberdia ajetaan:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Anna Jabber-palvelimen verkkonimi (pienellä kirjoitettuna)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "ejabberdin ylläpitotunnus:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Anna tunnus, jota käytetään ejabberd-palvelimen ylläpitoon. Asennuksen " +"jälkeen tällä tunnuksella voidaan tehdä ylläpitoon liittyviä tehtäviä " +"käyttäen mitä tahansa Jabber-asiakasta. Sen avulla voidaan myös kirjautua " +"osoitteessa http://${hostname}:5280/admin/ olevaan ylläpitokäyttöliittymään. " +"Anna tässä vain käyttäjätunnus (esim. ${user}), mutta käytä ejabberdin " +"verkkokäyttöliittymässä Jabber ID:tä kokonaisuudessaan (esim. ${user}@" +"${hostname}). " + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Jätä kenttä tyhjäksi, jos ylläpitotunnusta ei haluta luoda automaattisesti." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Ylläpitotunnuksen salasana:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Anna salasana ylläpitotunnukselle." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Ylläpitotunnuksen salasana uudelleen:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Anna ylläpitotunnuksen salasana uudelleen varmennuksena." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Salasanat eivät täsmää!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Annetut salasanat eivät täsmää. Yritä uudelleen." --- ejabberd-2.1.10.orig/debian/po/ru.po +++ ejabberd-2.1.10/debian/po/ru.po @@ -0,0 +1,112 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# Sergei Golovan , 2007. +# Sergey Alyoshin , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: 2.0.1-2\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-19 14:36+0400\n" +"Last-Translator: Sergey Alyoshin \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Имя хоста, которое будет обслуживать ejabberd:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Введите имя вашего Jabber-сервера (строчными буквами)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Имя учётной записи администратора ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Пожалуйста, введите имя учётной записи администратора сервера ejabberd. " +"После установки ejabberd вы сможете подключаться к нему с помощью Jabber-" +"клиента, используя эту учетную запись, и администрировать сервер. Также вы " +"сможете использовать интерфейс администратора по адресу http://" +"${hostname}:5280/admin/. Сейчас введите только имя (например, ${user}), а " +"для последующего подключения используйте полный Jabber ID (например, '${user}" +"@${hostname}'), иначе подключиться к интерфейсу администратора не удастся." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Оставьте поле пустым, если не хотите создавать учётную запись администратора " +"автоматически." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Пароль учётной записи администратора:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Введите пароль администратора." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Повторный ввод пароля администратора для проверки:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Введите пароль администратора ещё раз для проверки." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Пароли не совпадают!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Введённые пароли не совпадают. Попробуйте ещё раз." --- ejabberd-2.1.10.orig/debian/po/da.po +++ ejabberd-2.1.10/debian/po/da.po @@ -0,0 +1,102 @@ +# Danish translation ejabberd. +# Copyright (C) 2010 ejabberd & nedenstående oversættere. +# This file is distributed under the same license as the ejabberd package. +# Joe Hansen (joedalton2@yahoo.dk), 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2010-08-08 17:30+01:00\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Navnet på værten som ejabberd vil betjene:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Indtast venligst værtsnavnet på din Jabberserver (med små bogstaver)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Brugernavnet på en adminkonto for ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Angiv venligst navnet på en konto til administration af ejabberdserveren. " +"Efter installationen af ejabberd kan du bruge denne konto til at logge ind " +"med enhver Jabberklient og udføre administrative opgaver eller gå til http://" +"${hostname}:5280/admin/ og logge ind med denne konto for at tilgå " +"administrationsgrænsefladen. Indtast brugernavnsdelen her (f.eks. ${user}), " +"men brug den fulde Jabber-id (f.eks. ${user}@${hostname}) for at logge ind " +"på ejabberds internetgrænseflade; ellers vil den fejle." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Efterlad blank hvis du ikke automatisk ønsker at oprette en " +"administrationskonto." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Adgangskoden for administrationskontoen:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Indtast venligst adgangskoden for den administrative bruger." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Adgangskoden for administrationskontoen endnu en gang for bekræftelse:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Genindtast venligst adgangskoden for den administrative bruger for " +"bekræftelse." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Adgangskoderne er ikke ens!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Adgangskoderne, du har indtastet, er ikke ens. Forsøg venligst igen." --- ejabberd-2.1.10.orig/debian/po/de.po +++ ejabberd-2.1.10/debian/po/de.po @@ -0,0 +1,100 @@ +# translation of po-debconf template to German +# Copyright (C) 2006, Matthias Julius +# Copyright (C) 2008 Helge Kreutzmann +# This file is distributed under the same license as the ejabberd package. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd 2.0.0-6\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-04-28 21:21+0200\n" +"Last-Translator: Torsten Werner \n" +"Language-Team: de \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Der Name Ihres Ejabberd-Servers:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Geben Sie bitte (in Kleinbuchstaben) den Namen Ihres Jabberservers an." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Der Benutzername eines administrativen Kontos für Ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Geben Sie bitte den Namen für ein Konto an, dass den Ejabberd-Server " +"verwalten kann. Nach der Installation können Sie mit Hilfe dieses Kontos und " +"eines beliebigen Jabber-Clients Verwaltungsaufgaben durchführen oder sich " +"unter http://{hostname}:5280/admin/ an der Administratorschnittstelle " +"anmelden. Geben Sie hier den Benutzernamen-Anteil ein (z.B. ${user}), " +"verwenden Sie aber die komplette Jabber-ID (z.B. ${user}@${hostname}) um " +"sich an der Ejabberd-Webschnittstelle anzumelden, da ansonsten die Anmeldung " +"nicht funktionieren wird." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "Lassen Sie das Feld leer, um kein privilegiertes Konto anzulegen." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Das Kennwort für das Administratorkonto:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Geben Sie das Kennwort für den Administrator an." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Wiederholen Sie das Passwort zur Vermeidung von Fehleingaben:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Bitte geben Sie noch einmal das Passwort ein." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Die Kennwörter waren nicht identisch!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "" +"Die Kennwörter waren nicht identisch, bitte versuchen Sie es noch einmal." --- ejabberd-2.1.10.orig/debian/po/templates.pot +++ ejabberd-2.1.10/debian/po/templates.pot @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "" --- ejabberd-2.1.10.orig/debian/po/tr.po +++ ejabberd-2.1.10/debian/po/tr.po @@ -0,0 +1,102 @@ +# Turkish translation of ejabberd debconf template. +# Copyright (C) 2008 +# This file is distributed under the same license as the ejabberd package. +# Mert Dirik , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-20 00:41+0200\n" +"Last-Translator: Mert Dirik \n" +"Language-Team: Debian L10n Turkish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-Language: Turkish\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "ejabberd hizmeti verecek olan makinenin adı:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Lütfen Jabber sunucunuzun makine adını girin (küçük harflerle)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "ejabberd yönetici hesabının kullanıcı adı:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Lütfen ejabberd sunucusunu yönetecek olan hesabın adını girin. Kurulum " +"bittikten sonra yönetimsel görevleri yerine getirmek için herhangi bir " +"Jabber istemcisini kullanarak bu hesapla oturum açabilir ya da http://" +"${hostname}:5280/admin/ adresine gidip bu hesapla oturum açarak yönetim " +"arayüzüne girebilirsiniz. Buraya kullanıcı adı kısmını girin (ör. ${user}), " +"ama ejabberd web arayüzüne erişmek için tam Jabber kimliğini (ör. ${user}@" +"${hostname}) kullanın, aksi takdirde oturum açamazsınız." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Yönetici hesabını otomatik olarak oluşturmak istemiyorsanız bu alanı boş " +"bırakın." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Yönetici hesabının parolası:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Lütfen yönetimsel kullanıcı için bir parola girin." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Yönetici hesabının parolası, doğrulama için tekrardan:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Lütfen yönetimsel kullanıcının parolasını doğrulama için tekrar girin." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Parolalar eşleşmedi!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Girdiğiniz parolalar eşleşmedi. Lütfen tekrar deneyin." --- ejabberd-2.1.10.orig/debian/po/POTFILES.in +++ ejabberd-2.1.10/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates --- ejabberd-2.1.10.orig/debian/po/nl.po +++ ejabberd-2.1.10/debian/po/nl.po @@ -0,0 +1,99 @@ +# Dutch translation of ejabberd debconf templates. +# Copyright (C) 2006-2012 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ejabberd package. +# Sander Devrieze , 2006. +# Jeroen Schot , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd 2.1.9-1\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2012-01-27 10:54+0100\n" +"Last-Translator: Jeroen Schot \n" +"Language-Team: \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Naam van de computer die ejabberd moet aanbieden:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Wat is de computernaam van uw Jabber-server (in kleine letters)?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Naam van een beheerdersaccount voor ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Geef de naam op van een account om ejabberd te beheren. Na de installatie " +"van ejabberd kunt u met deze account in elke Jabber-client of op http://" +"${hostname}:5280/admin/ beheerderstaken uitvoeren. Geeft hier alleen het " +"gebruiksnaam-deel op (bv. ${user}), maar gebruik het volledige Jabber-ID " +"(bv. ${user}@${hostname) om in te loggen op de webinterface van ejabberd, " +"anders zal dit mislukken." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Voer niets in als u niet automatisch een beheerdersaccount wilt aanmaken." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Wachtwoord voor de beheerdersaccount:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Voer het wachtwoord in voor de beheerder." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Nogmaals het wachtwoord voor de beheerdersaccount ter controle:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Voer het wachtwoord voor de beheerder nogmaals in ter controle." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "De wachtwoorden komen niet overeen!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "De ingevoerde wachtwoorden komen niet overeen. Probeer opnieuw." --- ejabberd-2.1.10.orig/debian/po/pt.po +++ ejabberd-2.1.10/debian/po/pt.po @@ -0,0 +1,100 @@ +# Portuguese translation of ejabberd's debconf messages. +# Copyright (C) 2007 +# This file is distributed under the same license as the ejabberd package. +# Luísa Lourenço , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd 1.1.2-6\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2007-03-28 13:03+0100\n" +"Last-Translator: Luísa Lourenço \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "O nome da máquina que o ejabberd irá servir:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "" +"Por favor insira o nome da máquina do seu servidor de Jabber (em minúsculas)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "O nome de uma conta de admin para o ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Por favor forneça o nome de uma conta para administrar o servidor ejabberd. " +"Depois da instalação do ejabberd pode usar esta conta para se ligar a " +"qualquer cliente Jabber para efectuar tarefas administrativas ou ir a http://" +"${hostname}:5280/admin/ e ligar com esta conta para entrar na interface de " +"admin. Certifique-se que insere o Jabber ID completo (p.e. '${user}@" +"${hostname}') para se ligar; caso contrário irá falhar." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "Deixe em branco caso não queira criar uma conta admin automaticamente." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "A palavra chave para a conta de admin:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Por favor insira a palavra chave para o utilizador administrativo." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "De novo a palavra chave para a conta de admin para verificação:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Por favor re-insira a palavra chave para o utilizador administrativo para " +"verificaçao." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "As palavras chave não coincidem!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "As palavras chave que inseriu não coincidem. Por favor tente de novo." --- ejabberd-2.1.10.orig/debian/po/es.po +++ ejabberd-2.1.10/debian/po/es.po @@ -0,0 +1,114 @@ +# translation of ejabberd-debian-es.po to Spanish +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Badlop , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: 2.0.1-2\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-14 13:57+0200\n" +"Last-Translator: Badlop \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Nombre del servidor Jabber que ejabberd servirá:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Por favor indica el nombre de tu servidor Jabber." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Cuenta de administrador en ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Por favor indica el nombre deseado para una cuenta de administrador en el " +"servidor ejabberd. Después de la instalación de ejabberd podrás usar esta " +"cuenta con un cliente Jabber y hacer tareas de administración, o entrar en " +"la web de administración http://${hostname}:5280/admin/ Al poner los datos " +"de administrador en esa web, recuerda introducir tu Jabber ID completo, por " +"ejemplo '${user}@${hostname}'" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Dejar vacío si no deseas que se cree automáticamente una cuenta de " +"administrador." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "La contraseña de la cuenta del administrador:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Por favor introduce la contraseña para la cuenta de administrador." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "" +"Introduce de nuevo la contraseña para la cuenta de administrador para " +"verificación:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Por favor introduce de nuevo la contraseña de la cuenta de administrador " +"para verificación." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "¡Las contraseñas no coinciden!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "" +"Las contraseñas que has tecleado no coinciden. Por favor inténtalo de nuevo." --- ejabberd-2.1.10.orig/debian/po/sv.po +++ ejabberd-2.1.10/debian/po/sv.po @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-13 18:03+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Värdnamnet som ejabberd ska arbeta för:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Ange värdnamnet på din jabber-server (endast gemener)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Användarnamnet för administratörskontot för ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Ange användarnamnet för ett administratörskonto för ejabberd-servern. Efter " +"att installationen är klar kan du använda detta kontot för att logga in med " +"en Jabber-klient för att utföra administrativa uppgifter, alternativt så kan " +"du besöka http://${hostname}:5280/admin/ och logga in med kontot där för att " +"komma åt administrationsgränssnittet. Ange användanamnet här (t.ex. " +"${user}), men kom ihåg att använda det fullständiga Jabber ID:t (t.ex. " +"${user}@${hostname}) för att logga in i ejabberd:s webbgränssnitt." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Lämna fältet tomt om du inte vill skapa ett administrationskonto automatiskt." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Lösenord för administrationskontot:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Ange lösenordet för administratörskontot." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Upprepa lösenordet för administratörskontot:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"För att kontrollera att du angivit rätt lösenord ska du upprepa det här." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Lösenorden var inte likadana!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Lösenorden du angav är inte likadana. Vänligen försök igen." --- ejabberd-2.1.10.orig/debian/po/sk.po +++ ejabberd-2.1.10/debian/po/sk.po @@ -0,0 +1,104 @@ +# Slovak translations for ejabberd package +# Slovenské preklady pre balík ejabberd. +# Copyright (C) 2011 THE ejabberd'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ejabberd package. +# Automatically generated, 2011. +# Slavko , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd 2.1.9-1\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2011-10-30 15:15+0100\n" +"Last-Translator: Slavko \n" +"Language-Team: slovenčina \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-POFile-SpellExtra: admin hostname Jabber ejabberd administračného\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Meno hostiteľa, ktoré bude ejabberd poskytovať:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Prosím, zadajte meno hostiteľa servera Jabber (malými písmenami)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Meno používateľa účtu administrátora pre ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Prosím, zadajte meno účtu administrátora servera ejabberd. Po inštalácii " +"ejabberd môžete tento účet použiť na prihlásenie sa pomocou ktoréhokoľvek " +"klienta Jabber a vykonávanie administratívnych úloh alebo použiť http://" +"${hostname}:5280/admin/ a prihlásiť sa pomocou tohoto účtu do " +"administračného rozhrania. Tu zadajte len časť s používateľským menom (napr. " +"${user}), ale na prihlásenie do webového rozhrania ejabberd použite úplný " +"identifikátor Jabber (napr. ${user}@${hostname}); inak prihlásenie zlyhá." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Nechajte prázdne, ak nechcete aby bol účet administrátora vytvorený " +"automaticky." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Heslo účtu administrátora:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Prosím, zadajte heslo administračného používateľa." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Heslo administrátora znova, kvôli overeniu:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "Prosím, zdajte znova heslo administrátora, kvôli overeniu." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Heslá sa nezhodujú!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Heslá, ktoré ste zadali sa nezhodujú. Prosím, skúste znova." --- ejabberd-2.1.10.orig/debian/po/fr.po +++ ejabberd-2.1.10/debian/po/fr.po @@ -0,0 +1,105 @@ +# Translation of ejabberd debconf templates to French +# Copyright (C) 2008 Florentin Duneau +# This file is distributed under the same license as the ejabberd package. +# +# +# Florentin Duneau , 2006. +# Florentin Duneau , 2008. +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-03-01 13:47+0100\n" +"Last-Translator: Florentin Duneau \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Nom d'hôte du serveur ejabberd :" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Veuillez indiquer le nom d'hôte (en minuscule) du serveur Jabber." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Identifiant du compte administrateur d'ejabberd :" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Veuillez indiquer un identifiant afin d'administrer le serveur ejabberd. " +"Après l'installation, vous pourrez utilisez cette identité pour vous " +"connecter avec tout client Jabber ou l'interface d'administration sur http://" +"${hostname}:5280/admin/ pour réaliser des tâches administratives. Veuillez " +"seulement entrer ici l'identifiant (par exemple, « ${user} »), cependant " +"vous devrez utiliser une identité Jabber complète (par exemple, « ${user}@" +"${hostname} ») pour vous connecter à l'interface web." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Veuillez laisser cette entrée vide si vous ne souhaitez pas créer de compte " +"administrateur automatiquement." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Mot de passe du compte administrateur :" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Veuillez entrer le mot de passe de l'utilisateur administrateur." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Mot de passe du compte administrateur :" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Veuillez indiquer de nouveau le mot de passe de l'utilisateur administrateur " +"pour vérification." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Mots de passe différents" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Les mots de passe saisis ne correspondent pas. Veuillez recommencer." --- ejabberd-2.1.10.orig/debian/po/gl.po +++ ejabberd-2.1.10/debian/po/gl.po @@ -0,0 +1,101 @@ +# Galician translation of ejabberd's debconf templates +# This file is distributed under the same license as the ejabberd package. +# Jacobo Tarrio , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-14 20:27+0100\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "O nome do servidor de ejabberd:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Introduza o nome do servidor Jabber (en minúsculas)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "O usuario dunha conta administrativa para ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Introduza o nome dunha conta para administrar o servidor ejabberd. Trala " +"instalación de ejabberd pode empregar esta conta para se conectar con " +"calquera cliente Jabber para realizar tarefas administrativas ou pode " +"conectarse a http://${hostname}:5280/admin/ e identifíquese con esta conta " +"para entrar na interface de administración. Introduza aquí a parte do nome " +"de usuario (por exemplo, ${user}), pero empregue o ID de Jabber completo " +"(por exemplo, ${user}@${hostname}) para se identificar na interface web de " +"ejabberd; se non o fai así, a identificación ha fallar." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Déixeo en branco se non quere crear unha conta de administrador " +"automaticamente." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "O contrasinal para a conta do administrador:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Introduza o contrasinal do usuario administrativo." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "O contrasinal do administrador outra vez para verificalo:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Volva introducir o contrasinal do usuario administrativo para verificalo." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Os contrasinais non coinciden" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Os contrasinais que introduciu non son iguais. Volva tentalo." --- ejabberd-2.1.10.orig/debian/po/eu.po +++ ejabberd-2.1.10/debian/po/eu.po @@ -0,0 +1,101 @@ +# translation of eu.po to Euskara +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Aitor Ibañez , 2008. +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-22 01:19+0200\n" +"Last-Translator: Aitor Ibañez \n" +"Language-Team: Euskara \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Ejabberd-ek zerbitzatuko duen ostalariaren izena:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Jabber zerbitzariaren ostalari izena sartu (letra xehez)." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Ejabberd-en administrazio konturako erabiltzaile-izena:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Kontu-izen bat eman, haren bidez ejabberd zerbitzaria administratzeko. " +"Ejabberd instalatu ostean, kontu hau erabil dezakezu edozein Jabber " +"bezerotan edo http://${ostalari-izena}:5280/admin/ helbideko administrazio-" +"interfazean saioa hasi eta administrazio lanak egiteko. Hemen erabiltzaile-" +"izena soilik sartu (adib. ${erabiltzailea}), baina Jabber ID osoa erabili (e." +"g. ${erabiltzailea}@${ostalari-izena}) ejabberd-en web interfazean sartzeko, " +"bestela huts egingo du." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Bete gabe utzi administrazio kontua automatikoki sortzea nahi ez baduzu." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Pasahitza administrazio konturako:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Administratzaile erabiltzailearen pasahitza sartu." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Berriz sartu administrazio kontuko pasahitza, egiaztatzeko:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Berriz sartu administratzaile erabiltzailearen pasahitza, egiaztatzeko." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Pasahitzak ez datoz bat!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Sartutako pasahitzak ez datoz bat. Mesedez, berriro saiatu." --- ejabberd-2.1.10.orig/debian/po/ja.po +++ ejabberd-2.1.10/debian/po/ja.po @@ -0,0 +1,98 @@ +# Copyright (C) 2009 Torsten Werner +# This file is distributed under the same license as ejabberd package. +# Hideki Yamane (Debian-JP) , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd 2.0.5-1.1\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2009-11-07 14:26+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "ejabberd が動作するホスト名:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Jabber サーバのホスト名を入力してください (小文字)。" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "ejabberd 管理者アカウントのユーザ名:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"ejabberd サーバを管理するアカウントの名前を入力してください。ejabberd のイン" +"ストール後は、どの Jabber クライアントからでも、このアカウントを使って管理作" +"業を実施することができますし、http://${hostname}:5280/admin/ からこのアカウン" +"トでログインして管理画面に入れます。ここでユーザ名の部分 (例: ${user}) を入力" +"するわけですが、ejabberd のウェブインターフェイスでは、ログインするのに完全" +"な Jabber ID (例: ${user}@${hostname}) を使ってください。それ以外はログインに" +"失敗します。" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"自動的に管理者アカウントを作りたくない場合は空のままにしておいてください。" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "管理者アカウントのパスワード:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "管理者権限ユーザのパスワードを入力してください。" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "確認のため、管理者アカウントのパスワードの再入力:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "管理者権限ユーザのパスワードを確認のため再入力してください。" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "パスワードが一致しません!" + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "入力されたパスワードが一致しません。再入力してください。" --- ejabberd-2.1.10.orig/debian/po/vi.po +++ ejabberd-2.1.10/debian/po/vi.po @@ -0,0 +1,103 @@ +# Vietnamese translation for eJabberD. +# Copyright © 2008 Free Software Foundation, Inc. +# Clytie Siddall , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ejabberd\n" +"Report-Msgid-Bugs-To: twerner@debian.org\n" +"POT-Creation-Date: 2008-02-15 10:37+0300\n" +"PO-Revision-Date: 2008-07-16 17:20+0930\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.7b3\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "The name of the host ejabberd will serve:" +msgstr "Tên máy của máy phục vụ Jabber:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Please enter the hostname of your Jabber server (in lowercase)." +msgstr "Hãy nhập (bằng chữ thường) tên của máy sẽ được ejabberd phục vụ. " + +#. Type: string +#. Description +#: ../templates:2001 +msgid "The username of an admin account for ejabberd:" +msgstr "Tên đăng nhập của tài khoản quản trị cho ejabberd:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"Please provide the name of an account to administrate the ejabberd server. " +"After the installation of ejabberd you can use this account to log in with " +"any Jabber client to do administrative tasks or go to http://" +"${hostname}:5280/admin/ and log in with this account to enter the admin " +"interface. Enter the username part here (e.g. ${user}), but use the full " +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " +"otherwise it will fail." +msgstr "" +"Hãy cung cấp tên của một tài khoản sẽ quản trị máy phục vụ ejabberd. Sau khi " +"cài đặt trình nền ejabberd, bạn có thể sử dụng tài khoản này để đăng nhập " +"với bất cứ ứng dụng khách Jabber nào, để làm các công việc quản trị, hoặc " +"thăm địa chỉ « http://${hostname}:5280/admin/ » và đăng nhập với tài khoản " +"này để vào giao diện quản trị. Ở đây thì nhập chỉ phần tên người dùng (v.d. " +"« ${user} »), nhưng hãy sử dụng Jabber ID hoàn toàn (v.d. « ${user}@" +"${hostname} ») để đăng nhập vào giao diện Web của ejabberd; không thì không " +"đăng nhập được." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Leave empty if you don't want to create an admin account automatically." +msgstr "" +"Bỏ trống trường này nếu bạn không muốn tự động tạo một tài khoản quản trị." + +#. Type: password +#. Description +#: ../templates:3001 +msgid "The password for the admin account:" +msgstr "Mật khẩu cho tài khoản quản trị:" + +#. Type: password +#. Description +#: ../templates:3001 +msgid "Please enter the password for the administrative user." +msgstr "Hãy nhập mật khẩu của người dùng quản trị." + +#. Type: password +#. Description +#: ../templates:4001 +msgid "The password for the admin account again for verification:" +msgstr "Nhập lại mật khẩu quản trị, để xác nhận:" + +#. Type: password +#. Description +#: ../templates:4001 +msgid "" +"Please reenter the password for the administrative user for verification." +msgstr "" +"Hãy nhập lần nữa mật khẩu của người dùng quản trị, để xác nhận đây là mật " +"khẩu đúng." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords do not match!" +msgstr "Hai mật khẩu không trùng nhau." + +#. Type: error +#. Description +#: ../templates:5001 +msgid "The passwords you have typed do not match. Please try again." +msgstr "Bạn đã gõ hai mật khẩu khác nhau. Hãy thử lại."