Merge lp:~benlangfeld/ubuntu/precise/ejabberd/2.1.13 into lp:ubuntu/precise/ejabberd
- Precise (12.04)
- 2.1.13
- Merge into precise
Status: | Needs review |
---|---|
Proposed branch: | lp:~benlangfeld/ubuntu/precise/ejabberd/2.1.13 |
Merge into: | lp:ubuntu/precise/ejabberd |
Diff against target: |
66860 lines (+19047/-14443) (has conflicts) 295 files modified
.git/FETCH_HEAD (+3/-0) .git/HEAD (+1/-0) .git/config (+13/-0) .git/description (+1/-0) .git/hooks/applypatch-msg.sample (+15/-0) .git/hooks/commit-msg.sample (+24/-0) .git/hooks/post-update.sample (+8/-0) .git/hooks/pre-applypatch.sample (+14/-0) .git/hooks/pre-commit.sample (+49/-0) .git/hooks/pre-push.sample (+54/-0) .git/hooks/pre-rebase.sample (+169/-0) .git/hooks/prepare-commit-msg.sample (+36/-0) .git/hooks/update.sample (+128/-0) .git/info/exclude (+6/-0) .git/logs/HEAD (+1/-0) .git/logs/refs/heads/master (+1/-0) .git/logs/refs/remotes/origin/HEAD (+1/-0) .git/packed-refs (+141/-0) .git/refs/heads/master (+1/-0) .git/refs/remotes/origin/HEAD (+1/-0) .gitignore (+3/-0) README (+1/-1) contrib/extract_translations/extract_translations.erl (+4/-4) debian/NEWS (+19/-0) debian/README.Debian (+42/-0) debian/bzr-builddeb.conf (+2/-0) debian/changelog (+121/-1) debian/control (+6/-1) debian/dirs (+1/-0) debian/ejabberd.ufw.profile (+14/-0) debian/logrotate (+1/-1) debian/patches/ejabberd_regexp.patch (+95/-0) debian/patches/ldap-filter-dnattributes.patch (+25/-0) debian/patches/mod_admin_extra.patch (+31/-23) debian/patches/reopen-log.patch (+1/-1) debian/patches/series (+3/-0) debian/patches/use_dpkg_buildflags.patch (+70/-0) debian/po/it.po (+104/-0) debian/po/sk.po (+104/-0) debian/prerm (+10/-2) debian/rules (+8/-6) doc/api/overview.edoc (+1/-1) doc/dev.html (+2/-2) doc/features.html (+2/-2) doc/guide.html (+115/-81) doc/guide.tex (+84/-82) doc/release_notes_2.1.11.txt (+58/-0) doc/release_notes_2.1.12.txt (+67/-0) doc/release_notes_2.1.13.txt (+29/-0) doc/version.tex (+1/-1) src/Makefile.win32 (+2/-2) src/acl.erl (+12/-4) src/adhoc.erl (+1/-1) src/adhoc.hrl (+1/-1) src/cache_tab.erl (+7/-2) src/cache_tab_sup.erl (+1/-1) src/configure (+11/-11) src/configure.ac (+2/-2) src/configure.erl (+1/-1) src/cyrsasl.erl (+1/-1) src/cyrsasl_anonymous.erl (+1/-1) src/cyrsasl_digest.erl (+42/-13) src/cyrsasl_plain.erl (+1/-1) src/cyrsasl_scram.erl (+1/-1) src/ejabberd.app (+1/-7) src/ejabberd.cfg.example (+3/-0) src/ejabberd.erl (+1/-1) src/ejabberd.hrl (+1/-1) src/ejabberd_admin.erl (+45/-7) src/ejabberd_app.erl (+2/-1) src/ejabberd_auth.erl (+1/-1) src/ejabberd_auth_anonymous.erl (+1/-1) src/ejabberd_auth_external.erl (+8/-15) src/ejabberd_auth_internal.erl (+1/-1) src/ejabberd_auth_ldap.erl (+1/-1) src/ejabberd_auth_odbc.erl (+1/-1) src/ejabberd_auth_pam.erl (+1/-1) src/ejabberd_c2s.erl (+10/-7) src/ejabberd_c2s_config.erl (+1/-1) src/ejabberd_captcha.erl (+2/-2) src/ejabberd_check.erl (+1/-1) src/ejabberd_commands.erl (+3/-10) src/ejabberd_commands.hrl (+1/-1) src/ejabberd_config.erl (+33/-1) src/ejabberd_config.hrl (+1/-1) src/ejabberd_ctl.erl (+12/-1) src/ejabberd_ctl.hrl (+1/-1) src/ejabberd_frontend_socket.erl (+1/-1) src/ejabberd_hooks.erl (+1/-1) src/ejabberd_listener.erl (+3/-3) src/ejabberd_local.erl (+1/-1) src/ejabberd_logger_h.erl (+1/-1) src/ejabberd_loglevel.erl (+1/-1) src/ejabberd_node_groups.erl (+1/-1) src/ejabberd_piefxis.erl (+36/-36) src/ejabberd_rdbms.erl (+1/-1) src/ejabberd_receiver.erl (+13/-5) src/ejabberd_regexp.erl (+1/-1) src/ejabberd_router.erl (+1/-1) src/ejabberd_s2s.erl (+1/-1) src/ejabberd_s2s_in.erl (+1/-1) src/ejabberd_s2s_out.erl (+1/-1) src/ejabberd_service.erl (+1/-1) src/ejabberd_sm.erl (+1/-1) src/ejabberd_socket.erl (+1/-1) src/ejabberd_sup.erl (+1/-1) src/ejabberd_system_monitor.erl (+1/-1) src/ejabberd_tmp_sup.erl (+1/-1) src/ejabberd_update.erl (+22/-16) src/ejabberd_zlib/Makefile.win32 (+2/-2) src/ejabberd_zlib/ejabberd_zlib.erl (+1/-1) src/ejabberd_zlib/ejabberd_zlib_drv.c (+1/-1) src/ejabberdctl.template (+15/-0) src/ejd2odbc.erl (+207/-3) src/eldap/eldap.erl (+1/-8) src/eldap/eldap.hrl (+1/-1) src/eldap/eldap_filter.erl (+2/-1) src/eldap/eldap_pool.erl (+1/-1) src/eldap/eldap_utils.erl (+1/-1) src/expat_erl.c (+1/-1) src/extauth.erl (+1/-1) src/gen_iq_handler.erl (+1/-1) src/gen_mod.erl (+15/-1) src/idna.erl (+1/-1) src/jd2ejd.erl (+11/-37) src/jlib.erl (+1/-1) src/jlib.hrl (+5/-1) src/mod_adhoc.erl (+1/-1) src/mod_announce.erl (+147/-43) src/mod_blocking.erl (+226/-94) src/mod_caps.erl (+8/-12) src/mod_configure.erl (+6/-8) src/mod_configure2.erl (+1/-1) src/mod_disco.erl (+1/-1) src/mod_echo.erl (+1/-1) src/mod_ip_blacklist.erl (+1/-1) src/mod_irc/Makefile.win32 (+2/-2) src/mod_irc/iconv.erl (+1/-1) src/mod_irc/iconv_erl.c (+1/-1) src/mod_irc/mod_irc.erl (+141/-88) src/mod_irc/mod_irc_connection.erl (+44/-13) src/mod_last.erl (+47/-8) src/mod_last_odbc.erl (+0/-204) src/mod_muc/mod_muc.erl (+227/-63) src/mod_muc/mod_muc_log.erl (+39/-9) src/mod_muc/mod_muc_room.erl (+19/-9) src/mod_muc/mod_muc_room.hrl (+2/-1) src/mod_offline.erl (+347/-104) src/mod_offline_odbc.erl (+0/-548) src/mod_ping.erl (+1/-1) src/mod_pres_counter.erl (+1/-1) src/mod_privacy.erl (+475/-149) src/mod_privacy.hrl (+1/-1) src/mod_privacy_odbc.erl (+0/-863) src/mod_private.erl (+142/-73) src/mod_private_odbc.erl (+0/-136) src/mod_proxy65/mod_proxy65.erl (+1/-1) src/mod_proxy65/mod_proxy65.hrl (+1/-1) src/mod_proxy65/mod_proxy65_lib.erl (+1/-1) src/mod_proxy65/mod_proxy65_service.erl (+2/-2) src/mod_proxy65/mod_proxy65_sm.erl (+1/-1) src/mod_proxy65/mod_proxy65_stream.erl (+1/-1) src/mod_pubsub/gen_pubsub_node.erl (+5/-5) src/mod_pubsub/gen_pubsub_nodetree.erl (+5/-5) src/mod_pubsub/mod_pubsub.erl (+56/-16) src/mod_pubsub/mod_pubsub_odbc.erl (+40/-6) src/mod_pubsub/node.template (+3/-3) src/mod_pubsub/node_buddy.erl (+5/-5) src/mod_pubsub/node_club.erl (+5/-5) src/mod_pubsub/node_dispatch.erl (+5/-5) src/mod_pubsub/node_flat.erl (+3/-3) src/mod_pubsub/node_flat_odbc.erl (+3/-3) src/mod_pubsub/node_hometree.erl (+14/-11) src/mod_pubsub/node_hometree_odbc.erl (+5/-5) src/mod_pubsub/node_mb.erl (+5/-5) src/mod_pubsub/node_pep.erl (+5/-5) src/mod_pubsub/node_pep_odbc.erl (+5/-5) src/mod_pubsub/node_private.erl (+5/-5) src/mod_pubsub/node_public.erl (+5/-5) src/mod_pubsub/nodetree_tree.erl (+5/-5) src/mod_pubsub/nodetree_tree_odbc.erl (+5/-5) src/mod_pubsub/nodetree_virtual.erl (+5/-5) src/mod_pubsub/pubsub.hrl (+9/-6) src/mod_pubsub/pubsub_db_odbc.erl (+2/-2) src/mod_pubsub/pubsub_index.erl (+5/-5) src/mod_pubsub/pubsub_odbc.patch (+16/-16) src/mod_pubsub/pubsub_subscription.erl (+6/-7) src/mod_pubsub/pubsub_subscription_odbc.erl (+2/-2) src/mod_register.erl (+1/-1) src/mod_roster.erl (+542/-140) src/mod_roster.hrl (+1/-1) src/mod_roster_odbc.erl (+0/-1211) src/mod_service_log.erl (+1/-1) src/mod_shared_roster.erl (+258/-98) src/mod_shared_roster_ldap.erl (+6/-3) src/mod_sic.erl (+1/-1) src/mod_stats.erl (+1/-1) src/mod_time.erl (+1/-1) src/mod_vcard.erl (+282/-95) src/mod_vcard_ldap.erl (+4/-3) src/mod_vcard_odbc.erl (+0/-653) src/mod_vcard_xupdate.erl (+51/-7) src/mod_version.erl (+1/-1) src/msgs/ca.msg (+68/-23) src/msgs/ca.po (+447/-375) src/msgs/cs.msg (+18/-5) src/msgs/cs.po (+370/-315) src/msgs/de.msg (+25/-12) src/msgs/de.po (+385/-327) src/msgs/ejabberd.pot (+370/-315) src/msgs/el.msg (+17/-4) src/msgs/el.po (+371/-316) src/msgs/eo.msg (+48/-4) src/msgs/eo.po (+414/-356) src/msgs/es.msg (+17/-4) src/msgs/es.po (+377/-321) src/msgs/fr.msg (+2/-3) src/msgs/fr.po (+374/-316) src/msgs/gl.msg (+2/-3) src/msgs/gl.po (+376/-318) src/msgs/he.msg (+283/-0) src/msgs/he.po (+1927/-0) src/msgs/id.msg (+2/-3) src/msgs/id.po (+372/-314) src/msgs/it.msg (+48/-3) src/msgs/it.po (+424/-356) src/msgs/ja.msg (+89/-76) src/msgs/ja.po (+451/-402) src/msgs/nl.msg (+48/-3) src/msgs/nl.po (+411/-350) src/msgs/no.msg (+48/-3) src/msgs/no.po (+415/-353) src/msgs/pl.msg (+19/-6) src/msgs/pl.po (+375/-320) src/msgs/pt-br.msg (+21/-10) src/msgs/pt-br.po (+389/-332) src/msgs/pt.po (+371/-313) src/msgs/ru.msg (+16/-3) src/msgs/ru.po (+372/-315) src/msgs/sk.msg (+2/-3) src/msgs/sk.po (+397/-369) src/msgs/sv.msg (+1/-2) src/msgs/sv.po (+374/-316) src/msgs/th.po (+371/-313) src/msgs/tr.msg (+54/-3) src/msgs/tr.po (+420/-370) src/msgs/uk.msg (+27/-26) src/msgs/uk.po (+374/-314) src/msgs/vi.po (+371/-313) src/msgs/wa.po (+370/-312) src/msgs/zh.msg (+32/-19) src/msgs/zh.po (+388/-332) src/odbc/ejabberd_odbc.erl (+11/-1) src/odbc/ejabberd_odbc_sup.erl (+1/-1) src/odbc/mssql2000.sql (+1/-1) src/odbc/mssql2005.sql (+1/-1) src/odbc/mysql.sql (+55/-1) src/odbc/odbc_queries.erl (+15/-2) src/odbc/pg.sql (+56/-1) src/p1_fsm.erl (+3/-3) src/p1_mnesia.erl (+1/-1) src/p1_prof.erl (+1/-1) src/pam/epam.c (+1/-1) src/pam/epam.erl (+1/-1) src/randoms.erl (+1/-1) src/scram.erl (+1/-1) src/sha.erl (+1/-1) src/shaper.erl (+1/-1) src/stringprep/Makefile.win32 (+2/-2) src/stringprep/stringprep.erl (+1/-1) src/stringprep/stringprep_drv.c (+1/-1) src/stringprep/stringprep_sup.erl (+1/-1) src/stun/ejabberd_stun.erl (+1/-1) src/stun/stun.hrl (+1/-1) src/stun/stun_codec.erl (+1/-1) src/tls/Makefile.win32 (+2/-2) src/tls/sha_drv.c (+1/-1) src/tls/tls.erl (+23/-14) src/tls/tls_drv.c (+122/-8) src/translate.erl (+1/-1) src/treap.erl (+1/-1) src/web/ejabberd_http.erl (+160/-157) src/web/ejabberd_http.hrl (+1/-1) src/web/ejabberd_http_bind.erl (+52/-41) src/web/ejabberd_http_poll.erl (+1/-1) src/web/ejabberd_web.erl (+1/-1) src/web/ejabberd_web_admin.erl (+12/-19) src/web/ejabberd_web_admin.hrl (+1/-1) src/web/http_bind.hrl (+1/-1) src/web/mod_http_bind.erl (+3/-1) src/web/mod_http_fileserver.erl (+3/-2) src/web/mod_register_web.erl (+1/-1) src/win32_dns.erl (+1/-1) src/xml.erl (+1/-1) src/xml_stream.erl (+22/-23) Text conflict in debian/changelog Text conflict in debian/control |
To merge this branch: | bzr merge lp:~benlangfeld/ubuntu/precise/ejabberd/2.1.13 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lionel Porcheron | Pending | ||
Review via email: mp+225238@code.launchpad.net |
Commit message
Update to ejabberd 2.1.13
Description of the change
This is my very first attempt at packaging for Debian/Ubuntu, so if I'm doing something wrong, please accept my apologies and be gentle in your criticism.
This upgrades ejabberd to 2.1.13, the latest 2.1.x release. I require at least 2.1.12 so that I can use mod_muc_admin successfully; 2.1.11 contains changes related to ODBC which are not API compatible with 2.1.10, and API compatibility was restored in 2.1.12.
- 39. By Ben Langfeld
-
Second attempt at package upload, this time including original source tarball
- 40. By Ben Langfeld
-
Changelog formatting
- 41. By Ben Langfeld
-
Update git repo
- 42. By Ben Langfeld
-
Update git repo
- 43. By Ben Langfeld
-
Patch for LDAP filter breakage
- 44. By Ben Langfeld
-
Include patch
Unmerged revisions
- 44. By Ben Langfeld
-
Include patch
- 43. By Ben Langfeld
-
Patch for LDAP filter breakage
- 42. By Ben Langfeld
-
Update git repo
- 41. By Ben Langfeld
-
Update git repo
- 40. By Ben Langfeld
-
Changelog formatting
- 39. By Ben Langfeld
-
Second attempt at package upload, this time including original source tarball
- 38. By Ben Langfeld
-
Should use my own namespace for package version
- 37. By Ben Langfeld
-
Ubuntu release of Debian's 2.1.13-1
- 36. By Ben Langfeld
-
Revert unintentional modifications from 33
- 35. By Ben Langfeld
-
declare package source format as 3.0 (quilt)
Preview Diff
1 | === added directory '.git' |
2 | === added file '.git/FETCH_HEAD' |
3 | --- .git/FETCH_HEAD 1970-01-01 00:00:00 +0000 |
4 | +++ .git/FETCH_HEAD 2014-07-10 22:50:00 +0000 |
5 | @@ -0,0 +1,3 @@ |
6 | +260f43840924bf203bf210b8863de38153a33038 branch 'master' of github.com:benlangfeld/debian-ejabberd |
7 | +f0b36b45a6a70e673fca841dff5c5af0d7f33d04 not-for-merge branch 'upstream' of github.com:benlangfeld/debian-ejabberd |
8 | +305e14c0ec9f2391b1b7149e5629c535d066368b not-for-merge branch 'wheezy' of github.com:benlangfeld/debian-ejabberd |
9 | |
10 | === added file '.git/HEAD' |
11 | --- .git/HEAD 1970-01-01 00:00:00 +0000 |
12 | +++ .git/HEAD 2014-07-10 22:50:00 +0000 |
13 | @@ -0,0 +1,1 @@ |
14 | +ref: refs/heads/master |
15 | |
16 | === added file '.git/config' |
17 | --- .git/config 1970-01-01 00:00:00 +0000 |
18 | +++ .git/config 2014-07-10 22:50:00 +0000 |
19 | @@ -0,0 +1,13 @@ |
20 | +[core] |
21 | + repositoryformatversion = 0 |
22 | + filemode = true |
23 | + bare = false |
24 | + logallrefupdates = true |
25 | + ignorecase = true |
26 | + precomposeunicode = true |
27 | +[remote "origin"] |
28 | + url = git@github.com:benlangfeld/debian-ejabberd.git |
29 | + fetch = +refs/heads/*:refs/remotes/origin/* |
30 | +[branch "master"] |
31 | + remote = origin |
32 | + merge = refs/heads/master |
33 | |
34 | === added file '.git/description' |
35 | --- .git/description 1970-01-01 00:00:00 +0000 |
36 | +++ .git/description 2014-07-10 22:50:00 +0000 |
37 | @@ -0,0 +1,1 @@ |
38 | +Unnamed repository; edit this file 'description' to name the repository. |
39 | |
40 | === added directory '.git/hooks' |
41 | === added file '.git/hooks/applypatch-msg.sample' |
42 | --- .git/hooks/applypatch-msg.sample 1970-01-01 00:00:00 +0000 |
43 | +++ .git/hooks/applypatch-msg.sample 2014-07-10 22:50:00 +0000 |
44 | @@ -0,0 +1,15 @@ |
45 | +#!/bin/sh |
46 | +# |
47 | +# An example hook script to check the commit log message taken by |
48 | +# applypatch from an e-mail message. |
49 | +# |
50 | +# The hook should exit with non-zero status after issuing an |
51 | +# appropriate message if it wants to stop the commit. The hook is |
52 | +# allowed to edit the commit message file. |
53 | +# |
54 | +# To enable this hook, rename this file to "applypatch-msg". |
55 | + |
56 | +. git-sh-setup |
57 | +test -x "$GIT_DIR/hooks/commit-msg" && |
58 | + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} |
59 | +: |
60 | |
61 | === added file '.git/hooks/commit-msg.sample' |
62 | --- .git/hooks/commit-msg.sample 1970-01-01 00:00:00 +0000 |
63 | +++ .git/hooks/commit-msg.sample 2014-07-10 22:50:00 +0000 |
64 | @@ -0,0 +1,24 @@ |
65 | +#!/bin/sh |
66 | +# |
67 | +# An example hook script to check the commit log message. |
68 | +# Called by "git commit" with one argument, the name of the file |
69 | +# that has the commit message. The hook should exit with non-zero |
70 | +# status after issuing an appropriate message if it wants to stop the |
71 | +# commit. The hook is allowed to edit the commit message file. |
72 | +# |
73 | +# To enable this hook, rename this file to "commit-msg". |
74 | + |
75 | +# Uncomment the below to add a Signed-off-by line to the message. |
76 | +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg |
77 | +# hook is more suited to it. |
78 | +# |
79 | +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
80 | +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
81 | + |
82 | +# This example catches duplicate Signed-off-by lines. |
83 | + |
84 | +test "" = "$(grep '^Signed-off-by: ' "$1" | |
85 | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { |
86 | + echo >&2 Duplicate Signed-off-by lines. |
87 | + exit 1 |
88 | +} |
89 | |
90 | === added file '.git/hooks/post-update.sample' |
91 | --- .git/hooks/post-update.sample 1970-01-01 00:00:00 +0000 |
92 | +++ .git/hooks/post-update.sample 2014-07-10 22:50:00 +0000 |
93 | @@ -0,0 +1,8 @@ |
94 | +#!/bin/sh |
95 | +# |
96 | +# An example hook script to prepare a packed repository for use over |
97 | +# dumb transports. |
98 | +# |
99 | +# To enable this hook, rename this file to "post-update". |
100 | + |
101 | +exec git update-server-info |
102 | |
103 | === added file '.git/hooks/pre-applypatch.sample' |
104 | --- .git/hooks/pre-applypatch.sample 1970-01-01 00:00:00 +0000 |
105 | +++ .git/hooks/pre-applypatch.sample 2014-07-10 22:50:00 +0000 |
106 | @@ -0,0 +1,14 @@ |
107 | +#!/bin/sh |
108 | +# |
109 | +# An example hook script to verify what is about to be committed |
110 | +# by applypatch from an e-mail message. |
111 | +# |
112 | +# The hook should exit with non-zero status after issuing an |
113 | +# appropriate message if it wants to stop the commit. |
114 | +# |
115 | +# To enable this hook, rename this file to "pre-applypatch". |
116 | + |
117 | +. git-sh-setup |
118 | +test -x "$GIT_DIR/hooks/pre-commit" && |
119 | + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} |
120 | +: |
121 | |
122 | === added file '.git/hooks/pre-commit.sample' |
123 | --- .git/hooks/pre-commit.sample 1970-01-01 00:00:00 +0000 |
124 | +++ .git/hooks/pre-commit.sample 2014-07-10 22:50:00 +0000 |
125 | @@ -0,0 +1,49 @@ |
126 | +#!/bin/sh |
127 | +# |
128 | +# An example hook script to verify what is about to be committed. |
129 | +# Called by "git commit" with no arguments. The hook should |
130 | +# exit with non-zero status after issuing an appropriate message if |
131 | +# it wants to stop the commit. |
132 | +# |
133 | +# To enable this hook, rename this file to "pre-commit". |
134 | + |
135 | +if git rev-parse --verify HEAD >/dev/null 2>&1 |
136 | +then |
137 | + against=HEAD |
138 | +else |
139 | + # Initial commit: diff against an empty tree object |
140 | + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
141 | +fi |
142 | + |
143 | +# If you want to allow non-ASCII filenames set this variable to true. |
144 | +allownonascii=$(git config --bool hooks.allownonascii) |
145 | + |
146 | +# Redirect output to stderr. |
147 | +exec 1>&2 |
148 | + |
149 | +# Cross platform projects tend to avoid non-ASCII filenames; prevent |
150 | +# them from being added to the repository. We exploit the fact that the |
151 | +# printable range starts at the space character and ends with tilde. |
152 | +if [ "$allownonascii" != "true" ] && |
153 | + # Note that the use of brackets around a tr range is ok here, (it's |
154 | + # even required, for portability to Solaris 10's /usr/bin/tr), since |
155 | + # the square bracket bytes happen to fall in the designated range. |
156 | + test $(git diff --cached --name-only --diff-filter=A -z $against | |
157 | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 |
158 | +then |
159 | + cat <<\EOF |
160 | +Error: Attempt to add a non-ASCII file name. |
161 | + |
162 | +This can cause problems if you want to work with people on other platforms. |
163 | + |
164 | +To be portable it is advisable to rename the file. |
165 | + |
166 | +If you know what you are doing you can disable this check using: |
167 | + |
168 | + git config hooks.allownonascii true |
169 | +EOF |
170 | + exit 1 |
171 | +fi |
172 | + |
173 | +# If there are whitespace errors, print the offending file names and fail. |
174 | +exec git diff-index --check --cached $against -- |
175 | |
176 | === added file '.git/hooks/pre-push.sample' |
177 | --- .git/hooks/pre-push.sample 1970-01-01 00:00:00 +0000 |
178 | +++ .git/hooks/pre-push.sample 2014-07-10 22:50:00 +0000 |
179 | @@ -0,0 +1,54 @@ |
180 | +#!/bin/sh |
181 | + |
182 | +# An example hook script to verify what is about to be pushed. Called by "git |
183 | +# push" after it has checked the remote status, but before anything has been |
184 | +# pushed. If this script exits with a non-zero status nothing will be pushed. |
185 | +# |
186 | +# This hook is called with the following parameters: |
187 | +# |
188 | +# $1 -- Name of the remote to which the push is being done |
189 | +# $2 -- URL to which the push is being done |
190 | +# |
191 | +# If pushing without using a named remote those arguments will be equal. |
192 | +# |
193 | +# Information about the commits which are being pushed is supplied as lines to |
194 | +# the standard input in the form: |
195 | +# |
196 | +# <local ref> <local sha1> <remote ref> <remote sha1> |
197 | +# |
198 | +# This sample shows how to prevent push of commits where the log message starts |
199 | +# with "WIP" (work in progress). |
200 | + |
201 | +remote="$1" |
202 | +url="$2" |
203 | + |
204 | +z40=0000000000000000000000000000000000000000 |
205 | + |
206 | +IFS=' ' |
207 | +while read local_ref local_sha remote_ref remote_sha |
208 | +do |
209 | + if [ "$local_sha" = $z40 ] |
210 | + then |
211 | + # Handle delete |
212 | + : |
213 | + else |
214 | + if [ "$remote_sha" = $z40 ] |
215 | + then |
216 | + # New branch, examine all commits |
217 | + range="$local_sha" |
218 | + else |
219 | + # Update to existing branch, examine new commits |
220 | + range="$remote_sha..$local_sha" |
221 | + fi |
222 | + |
223 | + # Check for WIP commit |
224 | + commit=`git rev-list -n 1 --grep '^WIP' "$range"` |
225 | + if [ -n "$commit" ] |
226 | + then |
227 | + echo "Found WIP commit in $local_ref, not pushing" |
228 | + exit 1 |
229 | + fi |
230 | + fi |
231 | +done |
232 | + |
233 | +exit 0 |
234 | |
235 | === added file '.git/hooks/pre-rebase.sample' |
236 | --- .git/hooks/pre-rebase.sample 1970-01-01 00:00:00 +0000 |
237 | +++ .git/hooks/pre-rebase.sample 2014-07-10 22:50:00 +0000 |
238 | @@ -0,0 +1,169 @@ |
239 | +#!/bin/sh |
240 | +# |
241 | +# Copyright (c) 2006, 2008 Junio C Hamano |
242 | +# |
243 | +# The "pre-rebase" hook is run just before "git rebase" starts doing |
244 | +# its job, and can prevent the command from running by exiting with |
245 | +# non-zero status. |
246 | +# |
247 | +# The hook is called with the following parameters: |
248 | +# |
249 | +# $1 -- the upstream the series was forked from. |
250 | +# $2 -- the branch being rebased (or empty when rebasing the current branch). |
251 | +# |
252 | +# This sample shows how to prevent topic branches that are already |
253 | +# merged to 'next' branch from getting rebased, because allowing it |
254 | +# would result in rebasing already published history. |
255 | + |
256 | +publish=next |
257 | +basebranch="$1" |
258 | +if test "$#" = 2 |
259 | +then |
260 | + topic="refs/heads/$2" |
261 | +else |
262 | + topic=`git symbolic-ref HEAD` || |
263 | + exit 0 ;# we do not interrupt rebasing detached HEAD |
264 | +fi |
265 | + |
266 | +case "$topic" in |
267 | +refs/heads/??/*) |
268 | + ;; |
269 | +*) |
270 | + exit 0 ;# we do not interrupt others. |
271 | + ;; |
272 | +esac |
273 | + |
274 | +# Now we are dealing with a topic branch being rebased |
275 | +# on top of master. Is it OK to rebase it? |
276 | + |
277 | +# Does the topic really exist? |
278 | +git show-ref -q "$topic" || { |
279 | + echo >&2 "No such branch $topic" |
280 | + exit 1 |
281 | +} |
282 | + |
283 | +# Is topic fully merged to master? |
284 | +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` |
285 | +if test -z "$not_in_master" |
286 | +then |
287 | + echo >&2 "$topic is fully merged to master; better remove it." |
288 | + exit 1 ;# we could allow it, but there is no point. |
289 | +fi |
290 | + |
291 | +# Is topic ever merged to next? If so you should not be rebasing it. |
292 | +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` |
293 | +only_next_2=`git rev-list ^master ${publish} | sort` |
294 | +if test "$only_next_1" = "$only_next_2" |
295 | +then |
296 | + not_in_topic=`git rev-list "^$topic" master` |
297 | + if test -z "$not_in_topic" |
298 | + then |
299 | + echo >&2 "$topic is already up-to-date with master" |
300 | + exit 1 ;# we could allow it, but there is no point. |
301 | + else |
302 | + exit 0 |
303 | + fi |
304 | +else |
305 | + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` |
306 | + /usr/bin/perl -e ' |
307 | + my $topic = $ARGV[0]; |
308 | + my $msg = "* $topic has commits already merged to public branch:\n"; |
309 | + my (%not_in_next) = map { |
310 | + /^([0-9a-f]+) /; |
311 | + ($1 => 1); |
312 | + } split(/\n/, $ARGV[1]); |
313 | + for my $elem (map { |
314 | + /^([0-9a-f]+) (.*)$/; |
315 | + [$1 => $2]; |
316 | + } split(/\n/, $ARGV[2])) { |
317 | + if (!exists $not_in_next{$elem->[0]}) { |
318 | + if ($msg) { |
319 | + print STDERR $msg; |
320 | + undef $msg; |
321 | + } |
322 | + print STDERR " $elem->[1]\n"; |
323 | + } |
324 | + } |
325 | + ' "$topic" "$not_in_next" "$not_in_master" |
326 | + exit 1 |
327 | +fi |
328 | + |
329 | +exit 0 |
330 | + |
331 | +################################################################ |
332 | + |
333 | +This sample hook safeguards topic branches that have been |
334 | +published from being rewound. |
335 | + |
336 | +The workflow assumed here is: |
337 | + |
338 | + * Once a topic branch forks from "master", "master" is never |
339 | + merged into it again (either directly or indirectly). |
340 | + |
341 | + * Once a topic branch is fully cooked and merged into "master", |
342 | + it is deleted. If you need to build on top of it to correct |
343 | + earlier mistakes, a new topic branch is created by forking at |
344 | + the tip of the "master". This is not strictly necessary, but |
345 | + it makes it easier to keep your history simple. |
346 | + |
347 | + * Whenever you need to test or publish your changes to topic |
348 | + branches, merge them into "next" branch. |
349 | + |
350 | +The script, being an example, hardcodes the publish branch name |
351 | +to be "next", but it is trivial to make it configurable via |
352 | +$GIT_DIR/config mechanism. |
353 | + |
354 | +With this workflow, you would want to know: |
355 | + |
356 | +(1) ... if a topic branch has ever been merged to "next". Young |
357 | + topic branches can have stupid mistakes you would rather |
358 | + clean up before publishing, and things that have not been |
359 | + merged into other branches can be easily rebased without |
360 | + affecting other people. But once it is published, you would |
361 | + not want to rewind it. |
362 | + |
363 | +(2) ... if a topic branch has been fully merged to "master". |
364 | + Then you can delete it. More importantly, you should not |
365 | + build on top of it -- other people may already want to |
366 | + change things related to the topic as patches against your |
367 | + "master", so if you need further changes, it is better to |
368 | + fork the topic (perhaps with the same name) afresh from the |
369 | + tip of "master". |
370 | + |
371 | +Let's look at this example: |
372 | + |
373 | + o---o---o---o---o---o---o---o---o---o "next" |
374 | + / / / / |
375 | + / a---a---b A / / |
376 | + / / / / |
377 | + / / c---c---c---c B / |
378 | + / / / \ / |
379 | + / / / b---b C \ / |
380 | + / / / / \ / |
381 | + ---o---o---o---o---o---o---o---o---o---o---o "master" |
382 | + |
383 | + |
384 | +A, B and C are topic branches. |
385 | + |
386 | + * A has one fix since it was merged up to "next". |
387 | + |
388 | + * B has finished. It has been fully merged up to "master" and "next", |
389 | + and is ready to be deleted. |
390 | + |
391 | + * C has not merged to "next" at all. |
392 | + |
393 | +We would want to allow C to be rebased, refuse A, and encourage |
394 | +B to be deleted. |
395 | + |
396 | +To compute (1): |
397 | + |
398 | + git rev-list ^master ^topic next |
399 | + git rev-list ^master next |
400 | + |
401 | + if these match, topic has not merged in next at all. |
402 | + |
403 | +To compute (2): |
404 | + |
405 | + git rev-list master..topic |
406 | + |
407 | + if this is empty, it is fully merged to "master". |
408 | |
409 | === added file '.git/hooks/prepare-commit-msg.sample' |
410 | --- .git/hooks/prepare-commit-msg.sample 1970-01-01 00:00:00 +0000 |
411 | +++ .git/hooks/prepare-commit-msg.sample 2014-07-10 22:50:00 +0000 |
412 | @@ -0,0 +1,36 @@ |
413 | +#!/bin/sh |
414 | +# |
415 | +# An example hook script to prepare the commit log message. |
416 | +# Called by "git commit" with the name of the file that has the |
417 | +# commit message, followed by the description of the commit |
418 | +# message's source. The hook's purpose is to edit the commit |
419 | +# message file. If the hook fails with a non-zero status, |
420 | +# the commit is aborted. |
421 | +# |
422 | +# To enable this hook, rename this file to "prepare-commit-msg". |
423 | + |
424 | +# This hook includes three examples. The first comments out the |
425 | +# "Conflicts:" part of a merge commit. |
426 | +# |
427 | +# The second includes the output of "git diff --name-status -r" |
428 | +# into the message, just before the "git status" output. It is |
429 | +# commented because it doesn't cope with --amend or with squashed |
430 | +# commits. |
431 | +# |
432 | +# The third example adds a Signed-off-by line to the message, that can |
433 | +# still be edited. This is rarely a good idea. |
434 | + |
435 | +case "$2,$3" in |
436 | + merge,) |
437 | + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; |
438 | + |
439 | +# ,|template,) |
440 | +# /usr/bin/perl -i.bak -pe ' |
441 | +# print "\n" . `git diff --cached --name-status -r` |
442 | +# if /^#/ && $first++ == 0' "$1" ;; |
443 | + |
444 | + *) ;; |
445 | +esac |
446 | + |
447 | +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
448 | +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
449 | |
450 | === added file '.git/hooks/update.sample' |
451 | --- .git/hooks/update.sample 1970-01-01 00:00:00 +0000 |
452 | +++ .git/hooks/update.sample 2014-07-10 22:50:00 +0000 |
453 | @@ -0,0 +1,128 @@ |
454 | +#!/bin/sh |
455 | +# |
456 | +# An example hook script to blocks unannotated tags from entering. |
457 | +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new |
458 | +# |
459 | +# To enable this hook, rename this file to "update". |
460 | +# |
461 | +# Config |
462 | +# ------ |
463 | +# hooks.allowunannotated |
464 | +# This boolean sets whether unannotated tags will be allowed into the |
465 | +# repository. By default they won't be. |
466 | +# hooks.allowdeletetag |
467 | +# This boolean sets whether deleting tags will be allowed in the |
468 | +# repository. By default they won't be. |
469 | +# hooks.allowmodifytag |
470 | +# This boolean sets whether a tag may be modified after creation. By default |
471 | +# it won't be. |
472 | +# hooks.allowdeletebranch |
473 | +# This boolean sets whether deleting branches will be allowed in the |
474 | +# repository. By default they won't be. |
475 | +# hooks.denycreatebranch |
476 | +# This boolean sets whether remotely creating branches will be denied |
477 | +# in the repository. By default this is allowed. |
478 | +# |
479 | + |
480 | +# --- Command line |
481 | +refname="$1" |
482 | +oldrev="$2" |
483 | +newrev="$3" |
484 | + |
485 | +# --- Safety check |
486 | +if [ -z "$GIT_DIR" ]; then |
487 | + echo "Don't run this script from the command line." >&2 |
488 | + echo " (if you want, you could supply GIT_DIR then run" >&2 |
489 | + echo " $0 <ref> <oldrev> <newrev>)" >&2 |
490 | + exit 1 |
491 | +fi |
492 | + |
493 | +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then |
494 | + echo "usage: $0 <ref> <oldrev> <newrev>" >&2 |
495 | + exit 1 |
496 | +fi |
497 | + |
498 | +# --- Config |
499 | +allowunannotated=$(git config --bool hooks.allowunannotated) |
500 | +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) |
501 | +denycreatebranch=$(git config --bool hooks.denycreatebranch) |
502 | +allowdeletetag=$(git config --bool hooks.allowdeletetag) |
503 | +allowmodifytag=$(git config --bool hooks.allowmodifytag) |
504 | + |
505 | +# check for no description |
506 | +projectdesc=$(sed -e '1q' "$GIT_DIR/description") |
507 | +case "$projectdesc" in |
508 | +"Unnamed repository"* | "") |
509 | + echo "*** Project description file hasn't been set" >&2 |
510 | + exit 1 |
511 | + ;; |
512 | +esac |
513 | + |
514 | +# --- Check types |
515 | +# if $newrev is 0000...0000, it's a commit to delete a ref. |
516 | +zero="0000000000000000000000000000000000000000" |
517 | +if [ "$newrev" = "$zero" ]; then |
518 | + newrev_type=delete |
519 | +else |
520 | + newrev_type=$(git cat-file -t $newrev) |
521 | +fi |
522 | + |
523 | +case "$refname","$newrev_type" in |
524 | + refs/tags/*,commit) |
525 | + # un-annotated tag |
526 | + short_refname=${refname##refs/tags/} |
527 | + if [ "$allowunannotated" != "true" ]; then |
528 | + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 |
529 | + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 |
530 | + exit 1 |
531 | + fi |
532 | + ;; |
533 | + refs/tags/*,delete) |
534 | + # delete tag |
535 | + if [ "$allowdeletetag" != "true" ]; then |
536 | + echo "*** Deleting a tag is not allowed in this repository" >&2 |
537 | + exit 1 |
538 | + fi |
539 | + ;; |
540 | + refs/tags/*,tag) |
541 | + # annotated tag |
542 | + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 |
543 | + then |
544 | + echo "*** Tag '$refname' already exists." >&2 |
545 | + echo "*** Modifying a tag is not allowed in this repository." >&2 |
546 | + exit 1 |
547 | + fi |
548 | + ;; |
549 | + refs/heads/*,commit) |
550 | + # branch |
551 | + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then |
552 | + echo "*** Creating a branch is not allowed in this repository" >&2 |
553 | + exit 1 |
554 | + fi |
555 | + ;; |
556 | + refs/heads/*,delete) |
557 | + # delete branch |
558 | + if [ "$allowdeletebranch" != "true" ]; then |
559 | + echo "*** Deleting a branch is not allowed in this repository" >&2 |
560 | + exit 1 |
561 | + fi |
562 | + ;; |
563 | + refs/remotes/*,commit) |
564 | + # tracking branch |
565 | + ;; |
566 | + refs/remotes/*,delete) |
567 | + # delete tracking branch |
568 | + if [ "$allowdeletebranch" != "true" ]; then |
569 | + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 |
570 | + exit 1 |
571 | + fi |
572 | + ;; |
573 | + *) |
574 | + # Anything else (is there anything else?) |
575 | + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 |
576 | + exit 1 |
577 | + ;; |
578 | +esac |
579 | + |
580 | +# --- Finished |
581 | +exit 0 |
582 | |
583 | === added file '.git/index' |
584 | Binary files .git/index 1970-01-01 00:00:00 +0000 and .git/index 2014-07-10 22:50:00 +0000 differ |
585 | === added directory '.git/info' |
586 | === added file '.git/info/exclude' |
587 | --- .git/info/exclude 1970-01-01 00:00:00 +0000 |
588 | +++ .git/info/exclude 2014-07-10 22:50:00 +0000 |
589 | @@ -0,0 +1,6 @@ |
590 | +# git ls-files --others --exclude-from=.git/info/exclude |
591 | +# Lines that start with '#' are comments. |
592 | +# For a project mostly in C, the following would be a good set of |
593 | +# exclude patterns (uncomment them if you want to use them): |
594 | +# *.[oa] |
595 | +# *~ |
596 | |
597 | === added directory '.git/logs' |
598 | === added file '.git/logs/HEAD' |
599 | --- .git/logs/HEAD 1970-01-01 00:00:00 +0000 |
600 | +++ .git/logs/HEAD 2014-07-10 22:50:00 +0000 |
601 | @@ -0,0 +1,1 @@ |
602 | +0000000000000000000000000000000000000000 260f43840924bf203bf210b8863de38153a33038 Ben Langfeld <ben@langfeld.me> 1404260569 -0300 clone: from git@github.com:benlangfeld/debian-ejabberd.git |
603 | |
604 | === added directory '.git/logs/refs' |
605 | === added directory '.git/logs/refs/heads' |
606 | === added file '.git/logs/refs/heads/master' |
607 | --- .git/logs/refs/heads/master 1970-01-01 00:00:00 +0000 |
608 | +++ .git/logs/refs/heads/master 2014-07-10 22:50:00 +0000 |
609 | @@ -0,0 +1,1 @@ |
610 | +0000000000000000000000000000000000000000 260f43840924bf203bf210b8863de38153a33038 Ben Langfeld <ben@langfeld.me> 1404260569 -0300 clone: from git@github.com:benlangfeld/debian-ejabberd.git |
611 | |
612 | === added directory '.git/logs/refs/remotes' |
613 | === added directory '.git/logs/refs/remotes/origin' |
614 | === added file '.git/logs/refs/remotes/origin/HEAD' |
615 | --- .git/logs/refs/remotes/origin/HEAD 1970-01-01 00:00:00 +0000 |
616 | +++ .git/logs/refs/remotes/origin/HEAD 2014-07-10 22:50:00 +0000 |
617 | @@ -0,0 +1,1 @@ |
618 | +0000000000000000000000000000000000000000 260f43840924bf203bf210b8863de38153a33038 Ben Langfeld <ben@langfeld.me> 1404260569 -0300 clone: from git@github.com:benlangfeld/debian-ejabberd.git |
619 | |
620 | === added directory '.git/objects' |
621 | === added directory '.git/objects/info' |
622 | === added directory '.git/objects/pack' |
623 | === added file '.git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.idx' |
624 | Binary files .git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.idx 1970-01-01 00:00:00 +0000 and .git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.idx 2014-07-10 22:50:00 +0000 differ |
625 | === added file '.git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.pack' |
626 | Binary files .git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.pack 1970-01-01 00:00:00 +0000 and .git/objects/pack/pack-44a21b0ac5bd1f713aa94df9f0d7c4c59c3d81ea.pack 2014-07-10 22:50:00 +0000 differ |
627 | === added file '.git/packed-refs' |
628 | --- .git/packed-refs 1970-01-01 00:00:00 +0000 |
629 | +++ .git/packed-refs 2014-07-10 22:50:00 +0000 |
630 | @@ -0,0 +1,141 @@ |
631 | +# pack-refs with: peeled fully-peeled |
632 | +260f43840924bf203bf210b8863de38153a33038 refs/remotes/origin/master |
633 | +f0b36b45a6a70e673fca841dff5c5af0d7f33d04 refs/remotes/origin/upstream |
634 | +305e14c0ec9f2391b1b7149e5629c535d066368b refs/remotes/origin/wheezy |
635 | +2f15f9fd0f5f9925e524dfc31645844a32ebb0c1 refs/tags/debian/1.0.0-2 |
636 | +d8b7809515a902c25d0f743ca2f0ec8110e607e4 refs/tags/debian/1.1.1-1 |
637 | +55235538210388605f4a7a7efc8d6f512ee35b05 refs/tags/debian/1.1.1-2 |
638 | +c17535e1352de6070b768810c588e336b12998c7 refs/tags/debian/1.1.1-3 |
639 | +751e1c30dfcd01f9098bf2f993340826fde9873f refs/tags/debian/1.1.1-4 |
640 | +ffccca32bf6ddb4b49af50931d39dfc66e0af7b7 refs/tags/debian/1.1.1-5 |
641 | +8de40fb22edcebe58c67f6c5a983425f592cfca4 refs/tags/debian/1.1.1-6 |
642 | +4e98eeada4486a94ae6adec5c18235a6febf967a refs/tags/debian/1.1.1-7 |
643 | +9a390b0c7d3000dc7e9421d89792718ec119bc57 refs/tags/debian/1.1.1-8 |
644 | +73dc1f8ee9f9b330b59c3d15f023c2b09f9b9b41 refs/tags/debian/1.1.1-9 |
645 | +c3c8f9fd5722f22cc8e4fa63eec0d04ba19da82c refs/tags/debian/1.1.2-1 |
646 | +747b00eb0ee4a424ae8cc477548bd0626ac58244 refs/tags/debian/1.1.2-10 |
647 | +f4f2d3d76afa7257c06b61c667b8ad58556abd57 refs/tags/debian/1.1.2-2 |
648 | +202e941d2c561a0902b7bab872f0dbfe321ab35e refs/tags/debian/1.1.2-3 |
649 | +062575f49c900530085aea00daec13d77bb3e5a7 refs/tags/debian/1.1.2-4 |
650 | +d437b8d4dd377442b16a5511aa5a8469b3a1e0d8 refs/tags/debian/1.1.2-5 |
651 | +ed61e0abcfe955105ad4ae909152226efc6b1564 refs/tags/debian/1.1.2-6 |
652 | +a608028575802c6bf007aca188ca66a2fd3752f8 refs/tags/debian/1.1.2-7 |
653 | +66fdfe6e4d17007e1ada6817d5868d4fcf2cd771 refs/tags/debian/1.1.2-8 |
654 | +f8b1088d2287effbcb4ea9df9b94beace2541204 refs/tags/debian/1.1.2-9 |
655 | +acfeb1d41313f7437a5ceba3cf5d8d11daf8feca refs/tags/debian/1.1.4-1 |
656 | +acacbd748c8ab861f98530a4c934c3014985016b refs/tags/debian/1.1.4-2 |
657 | +e0dd8127b9307f70795084d98931c50b86b2d01e refs/tags/debian/1.1.4-3 |
658 | +24fe08d31026449affed57531c5546d036a54b43 refs/tags/debian/1.1.4-4 |
659 | +a09d0ea2465c089a03130b56d480b52672abc16f refs/tags/debian/1.1.4-5 |
660 | +f00e1b9d3ae423b686def64fcef3a1e8dadbdd6c refs/tags/debian/1.1.4-6 |
661 | +b2a9c548cd5a5c799f106f1fca961c5e7ccea14c refs/tags/debian/1.1.4-7 |
662 | +2e539f3a0bded5e43ee96838e8e93e3a641e7c79 refs/tags/debian/2.0.0-1 |
663 | +8f8bb8317580e87d76754f6933a6f69738538460 refs/tags/debian/2.0.0-2 |
664 | +3611642f5b4e7fe51fae165a0e2a060d481ded19 refs/tags/debian/2.0.0-3 |
665 | +93299f29ec992955cb01fa751eb680b536b426f6 refs/tags/debian/2.0.0-4 |
666 | +a449f71764ebfb29dbcd79876ea918e51aa8d150 refs/tags/debian/2.0.0-5 |
667 | +3442fb972813b05eac11a7c799142aec98cc5c83 refs/tags/debian/2.0.0-6 |
668 | +49e1d980d2398bfa91d30f1caca9a70bc48ed794 refs/tags/debian/2.0.0-7 |
669 | +726d40c4eeb68cfdb1e6bfb895a2bb692ba61352 refs/tags/debian/2.0.1-1 |
670 | +7c82e86d1c65a4639cb998b104e596c4a7a12d8c refs/tags/debian/2.0.1-2 |
671 | +43f1b4aab532d684f0b3a097b3d7711e62309b68 refs/tags/debian/2.0.1-3 |
672 | +999fd1804f479d513f29bcff90e47c7cddc89a3d refs/tags/debian/2.0.1-4 |
673 | +717477142901192fa25d7916b80369c4f20d862d refs/tags/debian/2.0.1-5 |
674 | +142a59ee7a8df8ca3bd111fe6f24ee69ca788292 refs/tags/debian/2.0.1-6 |
675 | +34e1c538dbc240b694a0f9b64def89fb27b2f4ec refs/tags/debian/2.0.1-6+lenny1 |
676 | +892f73dec04b272d4c7fbc4c42dc91c7380262d9 refs/tags/debian/2.0.2-1 |
677 | +72ed7070c81f7ea52046cd5c95e3c58465af802d refs/tags/debian/2.0.2-2 |
678 | +bb13c3f7af9b95c46e8a4bd0192677ea63cecbda refs/tags/debian/2.0.2-3 |
679 | +2c81f5ff5061784676beadf224485504968ee491 refs/tags/debian/2.0.3-1 |
680 | +2898b5cc3618d15278522eb05f4266484619b0c5 refs/tags/debian/2.0.3-2 |
681 | +42bf12c0d413a4ace59ee9383eb2411951f288a4 refs/tags/debian/2.0.5-1 |
682 | +f4828b4140dc6dc909857790c57c1bfe6eeb1994 refs/tags/debian/2.0.5-1.1 |
683 | +2e93ea40ba3ce5ad891ddb8410e22ba477fbc9cc refs/tags/debian/2.0.5-1_bpo50+1 |
684 | +7c6d622ccde29796cdc18f012666e65b032e3f48 refs/tags/debian/2.1.0-2 |
685 | +20d532d5af21e53af5864f2af2689be895e7d3a9 refs/tags/debian/2.1.1-1 |
686 | +dd0ce4d725c16ce8b6ed558a5314da3ded6206f1 refs/tags/debian/2.1.10-1 |
687 | +^c352294f1784ba02dc2822a388c5c7cb7e78231d |
688 | +b12a995bffa88658a867e681deb2f937d985f6cd refs/tags/debian/2.1.10-2 |
689 | +^6073d6b63fef7497722c7f97a5d5325490e8b7d0 |
690 | +98a24504d09646aa544d23324b87ac907a51c888 refs/tags/debian/2.1.10-3 |
691 | +^0ea99c66cdaba71358752a3a211d27137df52bdf |
692 | +eda805df3b81bbf8b53b4694106c444fed44484c refs/tags/debian/2.1.10-4 |
693 | +^dbe8f65123c4c5166405a3d24dd84f7c96c99c37 |
694 | +daab52b0d0cc3d5b535eac10dcbf73483c2d7652 refs/tags/debian/2.1.10-4+deb7u1 |
695 | +^305e14c0ec9f2391b1b7149e5629c535d066368b |
696 | +f6a0e318c8372d001fcb79a96d0fce2fa42266ab refs/tags/debian/2.1.10-5 |
697 | +^01237e5cfd4d5b5be8d4e852f32b54ad9348ea37 |
698 | +3673e7ae5fc9a232b42820ddac5f3866c02204a2 refs/tags/debian/2.1.2-1 |
699 | +e5c0ff266d074e2ec4a30241d650bbe8f00bf5fe refs/tags/debian/2.1.2-2 |
700 | +ddb509dbdfc4b07c3f5d3cf725faae778aa066c6 refs/tags/debian/2.1.2-3 |
701 | +6233e5c4f1b591c7bb97462b4cf5e2f36225c589 refs/tags/debian/2.1.3-1 |
702 | +^cd0bec699b118959650034f9b4c71eee787146b0 |
703 | +b6c7385bec8453eeafe10317eb4dadfd3f085ac3 refs/tags/debian/2.1.3-2 |
704 | +^52cd0f7f22d9438303489ec27090a58e95477200 |
705 | +e8316e28851fd56b5f8c612f6e681a92d13a9c7f refs/tags/debian/2.1.4-1 |
706 | +^4d6d2fefa0e329d7cf28b61b099e7a06799f0894 |
707 | +bcffd2ca1d25f58854fab273871f01e59e2e49c5 refs/tags/debian/2.1.5-1 |
708 | +^7f8a17352b97a2a16da4e2d8f84cbbc097200b1f |
709 | +47315c293f36a2c2eaec8b063723eacf22f3906f refs/tags/debian/2.1.5-2 |
710 | +^49467d2d00731957915c9d6cf5cc852ec3c31b6e |
711 | +adbe97a769f0270e89593710363c48a5cdc147f7 refs/tags/debian/2.1.5-3 |
712 | +^e81e802052910b1dfe0a4117c666dbb6d4b0ad6e |
713 | +2d54bad22f84fe790eb676e6bd23f03273bdd745 refs/tags/debian/2.1.5-3+squeeze1 |
714 | +^d133f4af9a0461b4d6b38a8617cd73d1b1e4cde9 |
715 | +9a35411a56795e1b389c7dabcca548023a5047be refs/tags/debian/2.1.5-3+squeeze1_bpo50+1 |
716 | +^8704f4ee40845e61b162b1a2779a546a8348c991 |
717 | +7781c1a6ef4d70a96ecc818c78f439c9456a02a5 refs/tags/debian/2.1.5-3+squeeze2 |
718 | +^6716aa6b176e4e79158e5e43f3e6e487eaf1ee15 |
719 | +44f26e7c815c54f341dbc00cff9178dfb443ac29 refs/tags/debian/2.1.6-1 |
720 | +^c8388c124037a24db131de341e929f7237bb5ee1 |
721 | +312d9640e5ac919fe631dfadeff76e19342f8bad refs/tags/debian/2.1.6-2.1 |
722 | +9323d95b64a3edb3d40b01cf52e3ea6afccba82d refs/tags/debian/2.1.8-1 |
723 | +^6f5fab8556fe986057126068f5b988fb65b39018 |
724 | +6ca86c18faf4d877afa1c9eff2721b8b2c45d1e4 refs/tags/debian/2.1.9-1 |
725 | +^0f3b2d547e358aed0767f59690d8ce9791ddba2b |
726 | +0ce6287ed5f80ccd9ca458de6fd04527cfcbe7c9 refs/tags/ubuntu/2.1.10-2ubuntu1 |
727 | +^2b1be0fc9c6da13b9b6ca295b7c202525b9361bd |
728 | +e65f9821ccf1d3aa310ce39f3dd47a740ae2932e refs/tags/upstream/1.0.0 |
729 | +^9c9e5d65ef6b47dc252a17d23a71951a2c108e7a |
730 | +4e909270cb140056c96425778a4553baf894e078 refs/tags/upstream/1.1.1 |
731 | +^a7bae6d3f4a2c02f48c9d3738060161521a93e68 |
732 | +da9e5b178aea985e91ba78eba6b36ed01f3c3adf refs/tags/upstream/1.1.2 |
733 | +^7fb54104aac9db81ef3ad5db09574f777459c9e7 |
734 | +de904e17421fc90eb940b5c27f15303ac77858a0 refs/tags/upstream/1.1.4 |
735 | +^b3a4375b911f3cf3d4c3c1c7d1535dc084340288 |
736 | +abf2dd98fdd35af4071df8578bfa83eabc911666 refs/tags/upstream/2.0.0 |
737 | +^808d37de52c3a06dc59427736c2f50d3852cb00a |
738 | +c03b7a4f7b2c0e0df08683b64d7ffd9931727116 refs/tags/upstream/2.0.1 |
739 | +^2a6409c2b43debf2abb82048deb60e60948aa5f1 |
740 | +ec6c7d152a17118874b16efcc7980f1a3ed98752 refs/tags/upstream/2.0.2 |
741 | +^d4507bbcaef1e429990476d32317c0a9b9bed04c |
742 | +23e0d38d60d23111fcab38c212846d918aed64b6 refs/tags/upstream/2.0.3 |
743 | +^20db5691ae04a3b07ac38f965581c6b5ef8be3ba |
744 | +666f620084fd6040b3eb457bd557396627498324 refs/tags/upstream/2.0.5 |
745 | +^2d328f8f5f6f81b767b3d35c742f79ed9f47d2d6 |
746 | +b362e4e02e7df2e97c93ae4a23a6f242e9045970 refs/tags/upstream/2.1.0 |
747 | +^96472ed382dca18ffa33ba057a0eb6e86f10c044 |
748 | +599f9e56288e7e2e2b2bce46fd0408fb4ec9e846 refs/tags/upstream/2.1.0rc1 |
749 | +^3fdaa89ed7477a546db9022360714296b92f2dcb |
750 | +2b6ebb237a0ce67e0848653f974786837c953644 refs/tags/upstream/2.1.1 |
751 | +^e0267f7704df7c64a2a801b31581cf82c13585d6 |
752 | +20ec34de6481821da182a074f69216d911f3c944 refs/tags/upstream/2.1.10 |
753 | +^d8ad8ab301acb7f7bf34f75fdaaec33f221cde55 |
754 | +526ab7bb2799a537e63e47c5076a15be45a8f834 refs/tags/upstream/2.1.13 |
755 | +^f0b36b45a6a70e673fca841dff5c5af0d7f33d04 |
756 | +8f999055e1d19944b787c14c960a62546a616826 refs/tags/upstream/2.1.2 |
757 | +^5a2ad5ab3cf7c264ed94a713e8e775765b43ed45 |
758 | +f71218fc975e48ffa05cf7ec72214d1792bcd416 refs/tags/upstream/2.1.3 |
759 | +^af124ba8c90b923fceba51d3c4d4bd7be578ff3d |
760 | +07fa519b1b826724c4aae0909a17c65548028b93 refs/tags/upstream/2.1.4 |
761 | +^bbb939b2b01e5e95185975821c40f6304bfe4181 |
762 | +e0c8a7a618a996ead6f409337973a77a136764a5 refs/tags/upstream/2.1.5 |
763 | +^0fa6975e87ecb185197f4ae5b2dd0b44444c79f5 |
764 | +fc0a5e08dbd169002aa391d25535342e029e2d62 refs/tags/upstream/2.1.6 |
765 | +^a7492727f476e373ab6b5423c3566dd7385953ef |
766 | +f885a6fe97320a43546e186f74857e2902b6ab60 refs/tags/upstream/2.1.7 |
767 | +^df055e1577fff2f9f745a79d17a5eebeb4dd033a |
768 | +e226ee32ee2fb039f2b639ac617d595e0237a81e refs/tags/upstream/2.1.8 |
769 | +^edbaef2110e4e0ed989ffe82274a65193ec28224 |
770 | +c937501d33af41f065e065509746932611e41926 refs/tags/upstream/2.1.9 |
771 | +^7e53c3ed3f78377b3356d3d7e0e0384794620604 |
772 | |
773 | === added directory '.git/refs' |
774 | === added directory '.git/refs/heads' |
775 | === added file '.git/refs/heads/master' |
776 | --- .git/refs/heads/master 1970-01-01 00:00:00 +0000 |
777 | +++ .git/refs/heads/master 2014-07-10 22:50:00 +0000 |
778 | @@ -0,0 +1,1 @@ |
779 | +260f43840924bf203bf210b8863de38153a33038 |
780 | |
781 | === added directory '.git/refs/remotes' |
782 | === added directory '.git/refs/remotes/origin' |
783 | === added file '.git/refs/remotes/origin/HEAD' |
784 | --- .git/refs/remotes/origin/HEAD 1970-01-01 00:00:00 +0000 |
785 | +++ .git/refs/remotes/origin/HEAD 2014-07-10 22:50:00 +0000 |
786 | @@ -0,0 +1,1 @@ |
787 | +ref: refs/remotes/origin/master |
788 | |
789 | === added directory '.git/refs/tags' |
790 | === added file '.gitignore' |
791 | --- .gitignore 1970-01-01 00:00:00 +0000 |
792 | +++ .gitignore 2014-07-10 22:50:00 +0000 |
793 | @@ -0,0 +1,3 @@ |
794 | +stamp-* |
795 | +*-stamp |
796 | +src |
797 | |
798 | === modified file 'README' |
799 | --- README 2011-09-11 16:16:55 +0000 |
800 | +++ README 2014-07-10 22:50:00 +0000 |
801 | @@ -9,7 +9,7 @@ |
802 | - GNU Make |
803 | - GCC |
804 | - Libexpat 1.95 or higher |
805 | - - Erlang/OTP R10B-9 or higher. Recommended: R12B-5 and R13B04. |
806 | + - Erlang/OTP R10B-9 or higher. Recommended: R13B04 and R14B04. |
807 | Avoid R14A and R14B. |
808 | - OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption. |
809 | - Zlib 1.2.3 or higher, for Stream Compression support |
810 | |
811 | === modified file 'contrib/extract_translations/extract_translations.erl' |
812 | --- contrib/extract_translations/extract_translations.erl 2010-04-06 13:00:03 +0000 |
813 | +++ contrib/extract_translations/extract_translations.erl 2014-07-10 22:50:00 +0000 |
814 | @@ -281,14 +281,14 @@ |
815 | List). |
816 | |
817 | print_translation(File, Line, Str, StrT) -> |
818 | - {ok, StrQ, _} = regexp:gsub(Str, "\"", "\\\""), |
819 | - {ok, StrTQ, _} = regexp:gsub(StrT, "\"", "\\\""), |
820 | + StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""), |
821 | + StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""), |
822 | io:format("#: ~s:~p~nmsgid \"~s\"~nmsgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]). |
823 | |
824 | print_translation_obsolete(Str, StrT) -> |
825 | File = "unknown.erl", |
826 | Line = 1, |
827 | - {ok, StrQ, _} = regexp:gsub(Str, "\"", "\\\""), |
828 | - {ok, StrTQ, _} = regexp:gsub(StrT, "\"", "\\\""), |
829 | + StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""), |
830 | + StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""), |
831 | io:format("#: ~s:~p~n#~~ msgid \"~s\"~n#~~ msgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]). |
832 | |
833 | |
834 | === modified file 'debian/NEWS' |
835 | --- debian/NEWS 2011-09-11 16:16:55 +0000 |
836 | +++ debian/NEWS 2014-07-10 22:50:00 +0000 |
837 | @@ -1,3 +1,22 @@ |
838 | +ejabberd (2.1.13-1) experimental; urgency=low |
839 | + |
840 | + This release fixes miscellaneous bugs. See the upstream release notes for details. |
841 | + |
842 | + -- Ben Langfeld <ben@langfeld.me> Tue, 1 Jul 2014 15:52:23 -0300 |
843 | + |
844 | +ejabberd (2.1.11-1) unstable; urgency=low |
845 | + |
846 | + This release adds support for the SCRAM-SHA-1 authentication mecnahism. |
847 | + If the fully-qualified hostname of the server differs from the name |
848 | + of the XMPP domain it serves, in order for this mechanism to work |
849 | + with compliant clients, a modification should be made to the ejabberd's |
850 | + configuration file. |
851 | + |
852 | + Please consult the section "Using SCRAM-SHA-1 authentication mechanism" |
853 | + in the README.Debian file for detailed information. |
854 | + |
855 | + -- Konstantin Khomoutov <flatworm@users.sourceforge.net> Thu, 16 May 2013 13:27:56 +0000 |
856 | + |
857 | ejabberd (2.1.8-1) unstable; urgency=low |
858 | |
859 | This release drops support for the @recent@ shared roster group |
860 | |
861 | === modified file 'debian/README.Debian' |
862 | --- debian/README.Debian 2010-04-06 13:00:03 +0000 |
863 | +++ debian/README.Debian 2014-07-10 22:50:00 +0000 |
864 | @@ -14,6 +14,7 @@ |
865 | 6. Upgrading from 2.0.x series |
866 | 6.1 Changes in ejabberdctl program |
867 | 6.2 Changes in logging |
868 | +7. Using SCRAM-SHA-1 authentication mechanism |
869 | |
870 | |
871 | 1. Running |
872 | @@ -361,6 +362,47 @@ |
873 | to "--erlang-log" to match the change above. |
874 | |
875 | |
876 | +7. Using SCRAM-SHA-1 authentication mechanism |
877 | +============================================= |
878 | + |
879 | +Since version 2.1.9 ejabberd supports the SCRAM-SHA-1 authentication |
880 | +mechanism (which, among other things, allows to not store passwords of |
881 | +XMPP accounts in clear text if the internal database backend is used |
882 | +for storage). This authentication process implemented by this |
883 | +mechanism includes the client sending a so-called "digest URI" which |
884 | +includes the server's identity as perceived by the connecting client. |
885 | +The SCRAM-SHA-1 RFC document requires this identity to be the |
886 | +fully-qualified host name of the server. This hostname is typically |
887 | +obtained by the client by looking up a server-specific DNS record of |
888 | +type SRV for the XMPP domain the client wants to register in. |
889 | + |
890 | +Unfortunately, the current implementation of SCRAM-SHA-1 in ejabberd |
891 | +is not able to perform the same kind of DNS query as used by the |
892 | +clients to know its "canonical" fully-qualified host name. |
893 | +Consequently, if the actual hostname of the server differs from the |
894 | +name of the XMPP domain it serves, a special option should be included |
895 | +in the configuration file to let the server know its hostname as seen |
896 | +by its clients. This configuration option is called "fqdn" and it |
897 | +expects a single argument -- the fully-qualified hostname of the |
898 | +server, as recorded in the appropriate DNS SRV record for the server. |
899 | +An example of its usage: |
900 | + |
901 | +{fqdn, "foo.example.com"}. |
902 | + |
903 | +It worth repeating that if the server's hostname is not different from |
904 | +the name of XMPP domain it servers (for instance, the XMPP domain is |
905 | +"example.com" and the server's hostname is also "example.com") the |
906 | +usage of this configuration option is not necessary as ejabberd will |
907 | +just use the domain name in the indicated case. |
908 | + |
909 | +It should be noted that while certain clients faithfully implement the |
910 | +SCRAM-SHA-1 specification, some other clients diverge and use the XMPP |
911 | +domain instead of the fully-qualified hostname of the server in the |
912 | +digest URI strings they send. Ejabberd implements relaxed rules for |
913 | +interpreting digest URIs to be interoperable with broken client |
914 | +implementations. |
915 | + |
916 | + |
917 | Authors |
918 | ======= |
919 | |
920 | |
921 | === added file 'debian/bzr-builddeb.conf' |
922 | --- debian/bzr-builddeb.conf 1970-01-01 00:00:00 +0000 |
923 | +++ debian/bzr-builddeb.conf 2014-07-10 22:50:00 +0000 |
924 | @@ -0,0 +1,2 @@ |
925 | +[BUILDDEB] |
926 | +native = True |
927 | |
928 | === modified file 'debian/changelog' |
929 | --- debian/changelog 2012-02-15 08:50:42 +0000 |
930 | +++ debian/changelog 2014-07-10 22:50:00 +0000 |
931 | @@ -1,3 +1,4 @@ |
932 | +<<<<<<< TREE |
933 | ejabberd (2.1.10-2ubuntu1) precise; urgency=low |
934 | |
935 | * Revert bumping erlang-dev Build-Depends version to >= 1:15.b, there is no |
936 | @@ -5,6 +6,125 @@ |
937 | |
938 | -- Gerfried Fuchs <rhonda@ubuntu.com> Wed, 15 Feb 2012 08:50:42 +0100 |
939 | |
940 | +======= |
941 | +ejabberd (2.1.13-1benlangfeld3) trusty; urgency=low |
942 | + |
943 | + [ Ben Langfeld ] |
944 | + * Include patch from https://github.com/processone/ejabberd/issues/246 |
945 | + |
946 | + -- Ben Langfeld <ben@langfeld.me> Thu, 10 Jul 2014 19:29:49 -0300 |
947 | + |
948 | +ejabberd (2.1.13-1benlangfeld2) trusty; urgency=low |
949 | + |
950 | + [ Ben Langfeld ] |
951 | + * Second attempt at package upload, this time including original source tarball |
952 | + |
953 | + -- Ben Langfeld <ben@langfeld.me> Tue, 1 Jul 2014 19:24:09 -0300 |
954 | + |
955 | +ejabberd (2.1.13-1benlangfeld1) trusty; urgency=low |
956 | + |
957 | + [ Ben Langfeld ] |
958 | + * Ubuntu release of Debian's 2.1.13-1 |
959 | + |
960 | + -- Ben Langfeld <ben@langfeld.me> Tue, 1 Jul 2014 18:47:12 -0300 |
961 | + |
962 | +ejabberd (2.1.13-1) unstable; urgency=low |
963 | + |
964 | + [ Ben Langfeld ] |
965 | + * New upstream release. |
966 | + * New upstream release made these patches obsolete: |
967 | + disable-insecure-ssl-cyphers.patch, disable-ssl2.patch, |
968 | + fix-ldap-vcard-jpeg-photos.patch, |
969 | + scram-optional-parameter-parsing-bugfix.patch |
970 | + |
971 | + |
972 | + -- Ben Langfeld <ben@langfeld.me> Tue, 1 Jul 2014 15:44:32 -0300 |
973 | + |
974 | +ejabberd (2.1.11-1ubuntu3) utopic; urgency=low |
975 | + |
976 | + * Fix LDAP authentication (LP: #1241632) |
977 | + - debian/patches/fix-erlang-r16b-compat.patch: backport upstream |
978 | + fix for Erlang 16b compatibility. |
979 | + - upstream reference: https://support.process-one.net/browse/EJAB-1612 |
980 | + * Add ufw profile (LP: #1254688) |
981 | + |
982 | + -- Lionel Porcheron <lionel.porcheron@ubuntu.com> Mon, 28 Apr 2014 13:27:21 +0200 |
983 | + |
984 | +ejabberd (2.1.11-1ubuntu2) trusty; urgency=low |
985 | + |
986 | + * Use autotools-dev for arm64. |
987 | + |
988 | + -- Daniel T Chen <crimsun@ubuntu.com> Mon, 10 Feb 2014 14:41:57 -0500 |
989 | + |
990 | +ejabberd (2.1.11-1ubuntu1) trusty; urgency=low |
991 | + |
992 | + * Add digest-uri-virtual-hosts.patch from upstream commit f434501 |
993 | + - Fixes a problem with Pidgin not being able to log in on a server |
994 | + with multiple virtual hosts and SRV records (LP: #1097366) |
995 | + |
996 | + -- a7x <ubuntu-a7x@scientician.org> Tue, 08 Jan 2013 12:52:21 -0500 |
997 | + |
998 | +ejabberd (2.1.11-1) unstable; urgency=low |
999 | + |
1000 | + [ Konstantin Khomoutov ] |
1001 | + * New upstream release (closes: #654853). |
1002 | + * Update mod_admin_extra module to revision 1126. |
1003 | + * Provide custom implementation of xmerl_regexp:sh_to_awk/1 |
1004 | + (closes: #670307). |
1005 | + * Refresh reopen-log.patch |
1006 | + * Add use_dpkg_buildflags.patch (thanks to Simon Ruderich, |
1007 | + closes: #664034). |
1008 | + * Explain the "fqdn" configuration file option which has to be used |
1009 | + in certain setups for the SCRAM-SHA-1 to work with complying clients. |
1010 | + Mention this fact in the NEWS file. (Closes: #706590) |
1011 | + * Add upstream patch fixing incorrect escaping of a single quote character |
1012 | + in SQL queries generated by the ODBC storage backend (closes: #708151, |
1013 | + thanks to Vladislav Chugunov). |
1014 | + |
1015 | + [ Gerfried Fuchs ] |
1016 | + * Add upstream patches disabling SSLv2 and weak cyphers in TLS driver |
1017 | + (closes: #722105). |
1018 | + * New upstream release made these patches obsolete: |
1019 | + relax-digest-uri-handling.patch, fix-parsing-split-https-requests.patch, |
1020 | + fix-odbc-escaping.patch |
1021 | + |
1022 | + -- Gerfried Fuchs <rhonda@debian.org> Thu, 17 Oct 2013 12:57:47 +0200 |
1023 | + |
1024 | +ejabberd (2.1.10-5) unstable; urgency=low |
1025 | + |
1026 | + [ Konstantin Khomoutov ] |
1027 | + * Add patch fixing parsing of optional parameters in SCRAM SHA-1 headers |
1028 | + (closes: #705613, thanks to Stephen Röttger for both writing the |
1029 | + original patch and backporting it to 2.1.10). |
1030 | + |
1031 | + -- Konstantin Khomoutov <flatworm@users.sourceforge.net> Thu, 25 Apr 2013 15:31:59 +0000 |
1032 | + |
1033 | +ejabberd (2.1.10-4) unstable; urgency=low |
1034 | + |
1035 | + [ Konstantin Khomoutov ] |
1036 | + * Do not run ejabberdctl as root in prerm and logrotate scripts |
1037 | + (closes: #691125, thanks to Michael Stapelberg and Felix Geyer). |
1038 | + * Add upstream patch fixing receiving JPEG vCard photos via LDAP |
1039 | + (closes: #660186). |
1040 | + * Add upstream patch fixing parsing HTTPS requests split into |
1041 | + multiple packets (closes: #698309). |
1042 | + |
1043 | + -- Konstantin Khomoutov <flatworm@users.sourceforge.net> Sat, 16 Feb 2013 16:59:21 +0000 |
1044 | + |
1045 | +ejabberd (2.1.10-3) unstable; urgency=low |
1046 | + |
1047 | + [ Konstantin Khomoutov ] |
1048 | + * Provide custom implementation of xmerl_regexp:sh_to_awk/1 |
1049 | + (closes: #670307). |
1050 | + * Add use_dpkg_buildflags.patch (thanks to Simon Ruderich, |
1051 | + closes: #664034). |
1052 | + * Add relax-digest-uri-handling.patch (closes: #654853). |
1053 | + * Add Slovak translation (thanks to Slavko, closes: #647115). |
1054 | + * Add Italian translation (thanks to Beatrice Torracca, closes: #682987). |
1055 | + |
1056 | + -- Konstantin Khomoutov <flatworm@users.sourceforge.net> Sun, 20 May 2012 14:51:12 +0400 |
1057 | + |
1058 | +>>>>>>> MERGE-SOURCE |
1059 | ejabberd (2.1.10-2) unstable; urgency=low |
1060 | |
1061 | [ Gerfried Fuchs ] |
1062 | @@ -729,7 +849,7 @@ |
1063 | [ Sergei Golovan ] |
1064 | * new upstream release |
1065 | * added spanish translation |
1066 | - * removed no longer needed mod_muc_log patch |
1067 | + * removed no longer needed mod_muc_log patch |
1068 | * added variable ERLANG_NODE, which allows to override default |
1069 | ejabberd node, to /etc/default/ejabberd file |
1070 | * changed erlang node selection by ejabberdctl (in some cases |
1071 | |
1072 | === modified file 'debian/control' |
1073 | --- debian/control 2012-02-15 08:50:42 +0000 |
1074 | +++ debian/control 2014-07-10 22:50:00 +0000 |
1075 | @@ -1,9 +1,14 @@ |
1076 | Source: ejabberd |
1077 | Section: net |
1078 | Priority: optional |
1079 | -Maintainer: Konstantin Khomoutov <flatworm@users.sourceforge.net> |
1080 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1081 | +XSBC-Original-Maintainer: Konstantin Khomoutov <flatworm@users.sourceforge.net> |
1082 | Uploaders: Gerfried Fuchs <rhonda@debian.org> |
1083 | +<<<<<<< TREE |
1084 | Build-Depends: debhelper (>= 7.3~), quilt, erlang-base, erlang-asn1, erlang-parsetools, erlang-dev (>= 1:13.b), libexpat1-dev, libssl-dev, zlib1g-dev, libpam0g-dev, po-debconf |
1085 | +======= |
1086 | +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, autotools-dev |
1087 | +>>>>>>> MERGE-SOURCE |
1088 | Standards-Version: 3.9.2 |
1089 | Homepage: http://www.process-one.net/en/projects/ejabberd/ |
1090 | Vcs-Git: git://git.deb.at/pkg/ejabberd.git |
1091 | |
1092 | === modified file 'debian/dirs' |
1093 | --- debian/dirs 2006-09-14 07:20:39 +0000 |
1094 | +++ debian/dirs 2014-07-10 22:50:00 +0000 |
1095 | @@ -1,2 +1,3 @@ |
1096 | var/lib/ejabberd |
1097 | var/log/ejabberd |
1098 | +etc/ufw/applications.d |
1099 | |
1100 | === added file 'debian/ejabberd.ufw.profile' |
1101 | --- debian/ejabberd.ufw.profile 1970-01-01 00:00:00 +0000 |
1102 | +++ debian/ejabberd.ufw.profile 2014-07-10 22:50:00 +0000 |
1103 | @@ -0,0 +1,14 @@ |
1104 | +[Ejabberd] |
1105 | +title=Jabber server (xmpp-client) |
1106 | +description=distributed, fault-tolerant Jabber/XMPP server written in Erlang |
1107 | +ports=5222/tcp |
1108 | + |
1109 | +[Ejabberd SSL] |
1110 | +title=Jabber server (xmpp-client-ssl) |
1111 | +description=distributed, fault-tolerant Jabber/XMPP server written in Erlang |
1112 | +ports=5223/tcp |
1113 | + |
1114 | +[Ejabberd S2S] |
1115 | +title=Jabber server (xmpp-server) |
1116 | +description=distributed, fault-tolerant Jabber/XMPP server written in Erlang |
1117 | +ports=5269/tcp |
1118 | |
1119 | === modified file 'debian/logrotate' |
1120 | --- debian/logrotate 2010-07-26 20:36:14 +0000 |
1121 | +++ debian/logrotate 2014-07-10 22:50:00 +0000 |
1122 | @@ -9,6 +9,6 @@ |
1123 | create 640 ejabberd adm |
1124 | sharedscripts |
1125 | postrotate |
1126 | - /usr/sbin/ejabberdctl reopen-log > /dev/null |
1127 | + su ejabberd -c '/usr/sbin/ejabberdctl reopen-log' > /dev/null |
1128 | endscript |
1129 | } |
1130 | |
1131 | === added file 'debian/patches/ejabberd_regexp.patch' |
1132 | --- debian/patches/ejabberd_regexp.patch 1970-01-01 00:00:00 +0000 |
1133 | +++ debian/patches/ejabberd_regexp.patch 2014-07-10 22:50:00 +0000 |
1134 | @@ -0,0 +1,95 @@ |
1135 | +Description: Provide custom replacement for xmerl_regexp:sh_to_awk/1 |
1136 | + Erlang R15 dropped support for its old regular expressions library |
1137 | + (implemented as the "regexp" module) and replaced it with a new, |
1138 | + PCRE-based, implementation (implemented as the "re" module). |
1139 | + This transition lost the regexp:sh_to_awk/1 function which, given |
1140 | + a "glob-style expression" commonly used in POSIX shells to match |
1141 | + filenames, would produce a regular expression specification with |
1142 | + the equivalent semantics. The ejabberd upstream tried to combat |
1143 | + this situation [1] by using xmerl_regexp:sh_to_awk/1. |
1144 | + This introduced an implicit dependency on the erlang-xmerl library |
1145 | + which has been the cause for a Debian bug #670307. |
1146 | + Depending on erlang-xmerl has two problems: |
1147 | + 1) It's a 1.5M library otherwise not used by ejabberd code while |
1148 | + the function itself is rather straightforward to implement. |
1149 | + 2) The implementation of xmerl_regexp:sh_to_awk/1 has certain |
1150 | + flaws (incorrect parsing of bracketed expressions, not escaping |
1151 | + match repetition counts). |
1152 | + As a result, a custom implementation of sh_to_awk/1 is provided, |
1153 | + which works almost like xmerl_regexp:sh_to_awk/1 but fixes its flaws. |
1154 | + 1. https://support.process-one.net/browse/EJAB-921 |
1155 | +Author: Konstantin Khomoutov <flatworm@users.sourceforge.net> |
1156 | +Forwarded: no |
1157 | +Last-Update: 2012-06-04 |
1158 | +--- |
1159 | +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
1160 | +--- a/src/ejabberd_regexp.erl |
1161 | ++++ b/src/ejabberd_regexp.erl |
1162 | +@@ -26,6 +26,7 @@ |
1163 | + |
1164 | + -module(ejabberd_regexp). |
1165 | + -compile([export_all]). |
1166 | ++-import(lists, [reverse/1, member/2]). |
1167 | + |
1168 | + exec(ReM, ReF, ReA, RgM, RgF, RgA) -> |
1169 | + try apply(ReM, ReF, ReA) |
1170 | +@@ -66,7 +67,56 @@ |
1171 | + A -> A |
1172 | + end. |
1173 | + |
1174 | +-sh_to_awk(ShRegExp) -> |
1175 | +- case exec(xmerl_regexp, sh_to_awk, [ShRegExp], regexp, sh_to_awk, [ShRegExp]) of |
1176 | +- A -> A |
1177 | ++sh_to_awk(Pattern) when is_list(Pattern) -> |
1178 | ++ fnmatch_char(Pattern, [$(,$^]). |
1179 | ++ |
1180 | ++fnmatch_char([], Acc) -> |
1181 | ++ lists:reverse([$$,$)|Acc]); |
1182 | ++fnmatch_char([Ch|Tail], Acc) -> |
1183 | ++ case Ch of |
1184 | ++ $\\ -> |
1185 | ++ fnmatch_char(Tail, [$\\,$\\|Acc]); |
1186 | ++ $[ -> |
1187 | ++ fnmatch_bexp_first(Tail, [Ch|Acc]); |
1188 | ++ $? -> |
1189 | ++ fnmatch_char(Tail, [$.|Acc]); |
1190 | ++ $* -> |
1191 | ++ fnmatch_char(Tail, [$*,$.|Acc]); |
1192 | ++ _ -> |
1193 | ++ case lists:member(Ch, "^.+{}()$|\\") of |
1194 | ++ true -> |
1195 | ++ fnmatch_char(Tail, [Ch,$\\|Acc]); |
1196 | ++ false -> |
1197 | ++ fnmatch_char(Tail, [Ch|Acc]) |
1198 | ++ end |
1199 | ++ end. |
1200 | ++ |
1201 | ++fnmatch_bexp_first([], _) -> |
1202 | ++ {error, unclosed_be}; |
1203 | ++fnmatch_bexp_first([Ch|Tail], Acc) -> |
1204 | ++ case Ch of |
1205 | ++ $] -> |
1206 | ++ {error, empty_be}; |
1207 | ++ $! -> |
1208 | ++ fnmatch_bexp_next(Tail, false, [$^|Acc]); |
1209 | ++ $\\ -> |
1210 | ++ fnmatch_bexp_next(Tail, true, Acc); |
1211 | ++ _ -> |
1212 | ++ fnmatch_bexp_next(Tail, false, [Ch|Acc]) |
1213 | ++ end. |
1214 | ++ |
1215 | ++fnmatch_bexp_next([], _, _) -> |
1216 | ++ {error, unclosed_be}; |
1217 | ++fnmatch_bexp_next([Ch|Tail], true, Acc) -> |
1218 | ++ fnmatch_bexp_next(Tail, false, [Ch,$\\|Acc]); |
1219 | ++fnmatch_bexp_next([Ch|Tail], false, Acc) -> |
1220 | ++ case Ch of |
1221 | ++ $] -> |
1222 | ++ fnmatch_char(Tail, [Ch|Acc]); |
1223 | ++ $\\ -> |
1224 | ++ fnmatch_bexp_next(Tail, true, Acc); |
1225 | ++ _ -> |
1226 | ++ fnmatch_bexp_next(Tail, false, [Ch|Acc]) |
1227 | + end. |
1228 | ++ |
1229 | ++%% vim:ts=8:sw=4:sts=4:noet |
1230 | |
1231 | === added file 'debian/patches/ldap-filter-dnattributes.patch' |
1232 | --- debian/patches/ldap-filter-dnattributes.patch 1970-01-01 00:00:00 +0000 |
1233 | +++ debian/patches/ldap-filter-dnattributes.patch 2014-07-10 22:50:00 +0000 |
1234 | @@ -0,0 +1,25 @@ |
1235 | +From f81c9c9953fd4970b156170bf5adeb9f4800d91f Mon Sep 17 00:00:00 2001 |
1236 | +From: Ben Langfeld <ben@langfeld.me> |
1237 | +Date: Thu, 10 Jul 2014 18:50:03 -0300 |
1238 | +Subject: [PATCH] Set dnAttributes on when it's requested by a filter |
1239 | + |
1240 | +--- |
1241 | + src/eldap/eldap_filter_yecc.yrl | 4 ++-- |
1242 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
1243 | + |
1244 | +diff --git a/src/eldap/eldap_filter_yecc.yrl b/src/eldap/eldap_filter_yecc.yrl |
1245 | +index a8f7970..303dda3 100644 |
1246 | +--- a/src/eldap/eldap_filter_yecc.yrl |
1247 | ++++ b/src/eldap/eldap_filter_yecc.yrl |
1248 | +@@ -38,9 +38,9 @@ any -> '$empty': []. |
1249 | + initial -> value: initial('$1'). |
1250 | + final -> value: final('$1'). |
1251 | + |
1252 | +-extensible -> xattr ':dn' ':' matchingrule ':=' value: extensible('$6', ['$1', '$4']). |
1253 | ++extensible -> xattr ':dn' ':' matchingrule ':=' value: extensible('$6', ['$1', '$4', {dnAttributes, true}]). |
1254 | + extensible -> xattr ':' matchingrule ':=' value: extensible('$5', ['$1', '$3']). |
1255 | +-extensible -> xattr ':dn' ':=' value: extensible('$4', ['$1']). |
1256 | ++extensible -> xattr ':dn' ':=' value: extensible('$4', ['$1', {dnAttributes, true}]). |
1257 | + extensible -> xattr ':=' value: extensible('$3', ['$1']). |
1258 | + extensible -> ':dn' ':' matchingrule ':=' value: extensible('$5', ['$3']). |
1259 | + extensible -> ':' matchingrule ':=' value: extensible('$4', ['$2']). |
1260 | |
1261 | === modified file 'debian/patches/mod_admin_extra.patch' |
1262 | --- debian/patches/mod_admin_extra.patch 2012-01-08 11:45:38 +0000 |
1263 | +++ debian/patches/mod_admin_extra.patch 2014-07-10 22:50:00 +0000 |
1264 | @@ -4,7 +4,7 @@ |
1265 | |
1266 | The code is taken from the ProcessOne repository: |
1267 | https://forge.process-one.net/browse/ejabberd-modules/mod_admin_extra |
1268 | -(trunk, revision 1123). |
1269 | +(trunk, revision 1126). |
1270 | |
1271 | --- a/src/ejabberd.app |
1272 | +++ b/src/ejabberd.app |
1273 | @@ -18,7 +18,7 @@ |
1274 | node_default, |
1275 | --- /dev/null |
1276 | +++ b/src/mod_admin_extra.erl |
1277 | -@@ -0,0 +1,1560 @@ |
1278 | +@@ -0,0 +1,1568 @@ |
1279 | +%%%------------------------------------------------------------------- |
1280 | +%%% File : mod_admin_extra.erl |
1281 | +%%% Author : Badlop <badlop@process-one.net> |
1282 | @@ -375,7 +375,7 @@ |
1283 | + result = {res, rescode}}, |
1284 | + |
1285 | + #ejabberd_commands{name = add_rosteritem, tags = [roster], |
1286 | -+ desc = "Add an item to a user's roster", |
1287 | ++ desc = "Add an item to a user's roster (supports ODBC)", |
1288 | + module = ?MODULE, function = add_rosteritem, |
1289 | + args = [{localuser, string}, {localserver, string}, |
1290 | + {user, string}, {server, string}, |
1291 | @@ -386,7 +386,7 @@ |
1292 | + %%{"", "example: add-roster peter localhost mike server.com MiKe Employees both"}, |
1293 | + %%{"", "will add mike@server.com to peter@localhost roster"}, |
1294 | + #ejabberd_commands{name = delete_rosteritem, tags = [roster], |
1295 | -+ desc = "Delete an item from a user's roster", |
1296 | ++ desc = "Delete an item from a user's roster (supports ODBC)", |
1297 | + module = ?MODULE, function = delete_rosteritem, |
1298 | + args = [{localuser, string}, {localserver, string}, |
1299 | + {user, string}, {server, string}], |
1300 | @@ -1082,21 +1082,18 @@ |
1301 | +add_rosteritem(LU, LS, User, Server, Nick, Group, Subscription, Xattrs) -> |
1302 | + subscribe(LU, LS, User, Server, Nick, Group, Subscription, Xattrs). |
1303 | + |
1304 | -+subscribe(LU, LS, User, Server, Nick, Group, Subscription, Xattrs) -> |
1305 | -+ mnesia:transaction( |
1306 | -+ fun() -> |
1307 | -+ mnesia:write({roster, |
1308 | -+ {LU,LS,{User,Server,[]}}, % uj |
1309 | -+ {LU,LS}, % user |
1310 | -+ {User,Server,[]}, % jid |
1311 | -+ Nick, % name: "Mom", [] |
1312 | -+ Subscription, % subscription: none, to=you see him, from=he sees you, both |
1313 | -+ none, % ask: out=send request, in=somebody requests you, none |
1314 | -+ [Group], % groups: ["Family"] |
1315 | -+ Xattrs, % xattrs: [{"category","conference"}] |
1316 | -+ [] % xs: [] |
1317 | -+ }) |
1318 | -+ end). |
1319 | ++subscribe(LU, LS, User, Server, Nick, Group, Subscription, _Xattrs) -> |
1320 | ++ SubscriptionS = case is_atom(Subscription) of |
1321 | ++ true -> atom_to_list(Subscription); |
1322 | ++ false -> Subscription |
1323 | ++ end, |
1324 | ++ ItemEl = build_roster_item(User, Server, {add, Nick, SubscriptionS, Group}), |
1325 | ++ {ok, M} = loaded_module(LS,[mod_roster_odbc,mod_roster]), |
1326 | ++ M:set_items( |
1327 | ++ LU, LS, |
1328 | ++ {xmlelement,"query", |
1329 | ++ [{"xmlns","jabber:iq:roster"}], |
1330 | ++ [ItemEl]}). |
1331 | + |
1332 | +delete_rosteritem(LocalUser, LocalServer, User, Server) -> |
1333 | + case unsubscribe(LocalUser, LocalServer, User, Server) of |
1334 | @@ -1108,11 +1105,22 @@ |
1335 | + end. |
1336 | + |
1337 | +unsubscribe(LU, LS, User, Server) -> |
1338 | -+ mnesia:transaction( |
1339 | -+ fun() -> |
1340 | -+ mnesia:delete({roster, {LU, LS, {User, Server, []}}}) |
1341 | -+ end). |
1342 | ++ ItemEl = build_roster_item(User, Server, remove), |
1343 | ++ {ok, M} = loaded_module(LS,[mod_roster_odbc,mod_roster]), |
1344 | ++ M:set_items( |
1345 | ++ LU, LS, |
1346 | ++ {xmlelement,"query", |
1347 | ++ [{"xmlns","jabber:iq:roster"}], |
1348 | ++ [ItemEl]}). |
1349 | + |
1350 | ++loaded_module(Domain,Options) -> |
1351 | ++ LoadedModules = gen_mod:loaded_modules(Domain), |
1352 | ++ case lists:filter(fun(Module) -> |
1353 | ++ lists:member(Module, LoadedModules) |
1354 | ++ end, Options) of |
1355 | ++ [M|_] -> {ok, M}; |
1356 | ++ [] -> {error,not_found} |
1357 | ++ end. |
1358 | + |
1359 | +%% ----------------------------- |
1360 | +%% Get Roster |
1361 | |
1362 | === modified file 'debian/patches/reopen-log.patch' |
1363 | --- debian/patches/reopen-log.patch 2011-10-03 20:27:12 +0000 |
1364 | +++ debian/patches/reopen-log.patch 2014-07-10 22:50:00 +0000 |
1365 | @@ -58,7 +58,7 @@ |
1366 | {ok, State#state{fd = Fd}}; |
1367 | --- a/src/ejabberd_admin.erl |
1368 | +++ b/src/ejabberd_admin.erl |
1369 | -@@ -219,28 +219,9 @@ |
1370 | +@@ -223,28 +223,9 @@ |
1371 | |
1372 | reopen_log() -> |
1373 | ejabberd_hooks:run(reopen_log_hook, []), |
1374 | |
1375 | === modified file 'debian/patches/series' |
1376 | --- debian/patches/series 2011-10-03 20:27:12 +0000 |
1377 | +++ debian/patches/series 2014-07-10 22:50:00 +0000 |
1378 | @@ -1,4 +1,7 @@ |
1379 | +use_dpkg_buildflags.patch |
1380 | +ejabberd_regexp.patch |
1381 | mod_admin_extra.patch |
1382 | captcha.patch |
1383 | fix_examples.patch |
1384 | reopen-log.patch |
1385 | +ldap-filter-dnattributes.patch |
1386 | |
1387 | === added file 'debian/patches/use_dpkg_buildflags.patch' |
1388 | --- debian/patches/use_dpkg_buildflags.patch 1970-01-01 00:00:00 +0000 |
1389 | +++ debian/patches/use_dpkg_buildflags.patch 2014-07-10 22:50:00 +0000 |
1390 | @@ -0,0 +1,70 @@ |
1391 | +Description: Use CPPFLAGS from environment (dpkg-buildflags). |
1392 | + Necessary for hardening flags. |
1393 | +Author: Simon Ruderich <simon@ruderich.org> |
1394 | +Last-Update: 2012-03-15 |
1395 | + |
1396 | +Index: ejabberd-2.1.10/src/configure |
1397 | +=================================================================== |
1398 | +--- ejabberd-2.1.10.orig/src/configure 2012-03-15 00:20:28.288591657 +0100 |
1399 | ++++ ejabberd-2.1.10/src/configure 2012-03-15 00:22:09.780595520 +0100 |
1400 | +@@ -4479,7 +4479,7 @@ |
1401 | + fi |
1402 | + zlib_save_CFLAGS="$CFLAGS" |
1403 | + CFLAGS="$CFLAGS $ZLIB_CFLAGS" |
1404 | +- zlib_save_CPPFLAGS="$CFLAGS" |
1405 | ++ zlib_save_CPPFLAGS="$CPPFLAGS" |
1406 | + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" |
1407 | + for ac_header in zlib.h |
1408 | + do : |
1409 | +Index: ejabberd-2.1.10/src/acinclude.m4 |
1410 | +=================================================================== |
1411 | +--- ejabberd-2.1.10.orig/src/acinclude.m4 2012-03-15 00:20:28.288591657 +0100 |
1412 | ++++ ejabberd-2.1.10/src/acinclude.m4 2012-03-15 00:22:09.784595520 +0100 |
1413 | +@@ -54,7 +54,7 @@ |
1414 | + fi |
1415 | + zlib_save_CFLAGS="$CFLAGS" |
1416 | + CFLAGS="$CFLAGS $ZLIB_CFLAGS" |
1417 | +- zlib_save_CPPFLAGS="$CFLAGS" |
1418 | ++ zlib_save_CPPFLAGS="$CPPFLAGS" |
1419 | + CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS" |
1420 | + AC_CHECK_HEADERS(zlib.h, , zlib_found=no) |
1421 | + if test $zlib_found = no; then |
1422 | +Index: ejabberd-2.1.10/src/Makefile.in |
1423 | +=================================================================== |
1424 | +--- ejabberd-2.1.10.orig/src/Makefile.in 2012-03-15 00:20:28.288591657 +0100 |
1425 | ++++ ejabberd-2.1.10/src/Makefile.in 2012-03-15 00:22:09.784595520 +0100 |
1426 | +@@ -168,7 +168,7 @@ |
1427 | + @ERLC@ -W $(EFLAGS) $*.erl |
1428 | + |
1429 | + $(ERLSHLIBS): %.so: %.c |
1430 | +- $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \ |
1431 | ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LIBS) \ |
1432 | + $(subst ../,,$(subst .so,.c,$@)) \ |
1433 | + $(EXPAT_LIBS) \ |
1434 | + $(EXPAT_CFLAGS) \ |
1435 | +Index: ejabberd-2.1.10/src/mod_irc/Makefile.in |
1436 | +=================================================================== |
1437 | +--- ejabberd-2.1.10.orig/src/mod_irc/Makefile.in 2012-03-15 00:20:28.288591657 +0100 |
1438 | ++++ ejabberd-2.1.10/src/mod_irc/Makefile.in 2012-03-15 00:22:09.784595520 +0100 |
1439 | +@@ -41,7 +41,7 @@ |
1440 | + # erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt |
1441 | + |
1442 | + $(ERLSHLIBS): ../%.so: %.c |
1443 | +- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) \ |
1444 | ++ $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ |
1445 | + $(subst ../,,$(subst .so,.c,$@)) \ |
1446 | + $(LIBS) \ |
1447 | + $(ERLANG_CFLAGS) \ |
1448 | +Index: ejabberd-2.1.10/src/stringprep/Makefile.in |
1449 | +=================================================================== |
1450 | +--- ejabberd-2.1.10.orig/src/stringprep/Makefile.in 2012-03-15 00:22:43.904596819 +0100 |
1451 | ++++ ejabberd-2.1.10/src/stringprep/Makefile.in 2012-03-15 00:22:58.844597386 +0100 |
1452 | +@@ -42,7 +42,7 @@ |
1453 | + # erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt |
1454 | + |
1455 | + $(ERLSHLIBS): ../%.so: %.c uni_data.c uni_norm.c |
1456 | +- $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) \ |
1457 | ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(INCLUDES) \ |
1458 | + $(subst ../,,$(subst .so,.c,$@)) $(LIBS) \ |
1459 | + $(ERLANG_LIBS) \ |
1460 | + $(ERLANG_CFLAGS) \ |
1461 | |
1462 | === added file 'debian/po/it.po' |
1463 | --- debian/po/it.po 1970-01-01 00:00:00 +0000 |
1464 | +++ debian/po/it.po 2014-07-10 22:50:00 +0000 |
1465 | @@ -0,0 +1,104 @@ |
1466 | +# Italian translation of ejabberd debconf messages. |
1467 | +# Copyright (C) 2012, ejabberd package copyright holder. |
1468 | +# This file is distributed under the same license as the ejabberd package. |
1469 | +# Beatrice Torracca <beatricet@libero.it>, 2012. |
1470 | +msgid "" |
1471 | +msgstr "" |
1472 | +"Project-Id-Version: ejabberd\n" |
1473 | +"Report-Msgid-Bugs-To: twerner@debian.org\n" |
1474 | +"POT-Creation-Date: 2008-02-15 10:37+0300\n" |
1475 | +"PO-Revision-Date: 2012-07-22 13:11+0200\n" |
1476 | +"Last-Translator: Beatrice Torracca <beatricet@libero.it>\n" |
1477 | +"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n" |
1478 | +"Language: it\n" |
1479 | +"MIME-Version: 1.0\n" |
1480 | +"Content-Type: text/plain; charset=UTF-8\n" |
1481 | +"Content-Transfer-Encoding: 8bit\n" |
1482 | +"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
1483 | +"X-Generator: Virtaal 0.7.1\n" |
1484 | + |
1485 | +#. Type: string |
1486 | +#. Description |
1487 | +#: ../templates:1001 |
1488 | +msgid "The name of the host ejabberd will serve:" |
1489 | +msgstr "Il nome dell'host per cui ejabberd farà da server:" |
1490 | + |
1491 | +#. Type: string |
1492 | +#. Description |
1493 | +#: ../templates:1001 |
1494 | +msgid "Please enter the hostname of your Jabber server (in lowercase)." |
1495 | +msgstr "Inserire il nome host del server Jabber (in lettere minuscole)." |
1496 | + |
1497 | +#. Type: string |
1498 | +#. Description |
1499 | +#: ../templates:2001 |
1500 | +msgid "The username of an admin account for ejabberd:" |
1501 | +msgstr "Il nome utente di un account di amministrazione per ejabberd:" |
1502 | + |
1503 | +#. Type: string |
1504 | +#. Description |
1505 | +#: ../templates:2001 |
1506 | +msgid "" |
1507 | +"Please provide the name of an account to administrate the ejabberd server. " |
1508 | +"After the installation of ejabberd you can use this account to log in with " |
1509 | +"any Jabber client to do administrative tasks or go to http://" |
1510 | +"${hostname}:5280/admin/ and log in with this account to enter the admin " |
1511 | +"interface. Enter the username part here (e.g. ${user}), but use the full " |
1512 | +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " |
1513 | +"otherwise it will fail." |
1514 | +msgstr "" |
1515 | +"Inserire il nome di un account per amministrare il server ejabberd. Dopo " |
1516 | +"l'installazione di ejabberd sarà possibile usare questo account per fare il " |
1517 | +"login con qualsiasi client Jabber per svolgere compiti di amministrazione " |
1518 | +"oppure si potrà andare all'indirizzo http://${hostname}:5280/admin/ e fare " |
1519 | +"il login con questo account per entrare nell'interfaccia di amministrazione. " |
1520 | +"Inserire qui la parte del nome utente (ad esempio ${user}), ma usare l'ID " |
1521 | +"Jabber completo (ad esempio ${user}@${hostname}) per fare il login " |
1522 | +"nell'interfaccia web, altrimenti non riuscirà." |
1523 | + |
1524 | +#. Type: string |
1525 | +#. Description |
1526 | +#: ../templates:2001 |
1527 | +msgid "Leave empty if you don't want to create an admin account automatically." |
1528 | +msgstr "" |
1529 | +"Lasciare vuoto se non si desidera creare automaticamente un account di " |
1530 | +"amministrazione." |
1531 | + |
1532 | +#. Type: password |
1533 | +#. Description |
1534 | +#: ../templates:3001 |
1535 | +msgid "The password for the admin account:" |
1536 | +msgstr "La password per l'account di amministrazione:" |
1537 | + |
1538 | +#. Type: password |
1539 | +#. Description |
1540 | +#: ../templates:3001 |
1541 | +msgid "Please enter the password for the administrative user." |
1542 | +msgstr "Inserire la password dell'utente amministratore." |
1543 | + |
1544 | +#. Type: password |
1545 | +#. Description |
1546 | +#: ../templates:4001 |
1547 | +msgid "The password for the admin account again for verification:" |
1548 | +msgstr "" |
1549 | +"Inserire nuovamente la password per l'account di amministrazione per " |
1550 | +"verifica:" |
1551 | + |
1552 | +#. Type: password |
1553 | +#. Description |
1554 | +#: ../templates:4001 |
1555 | +msgid "" |
1556 | +"Please reenter the password for the administrative user for verification." |
1557 | +msgstr "Reinserire la password per l'utente amministratore per verifica." |
1558 | + |
1559 | +#. Type: error |
1560 | +#. Description |
1561 | +#: ../templates:5001 |
1562 | +msgid "The passwords do not match!" |
1563 | +msgstr "Le password non corrispondono." |
1564 | + |
1565 | +#. Type: error |
1566 | +#. Description |
1567 | +#: ../templates:5001 |
1568 | +msgid "The passwords you have typed do not match. Please try again." |
1569 | +msgstr "Le password inserite non corrispondono. Riprovare." |
1570 | |
1571 | === added file 'debian/po/sk.po' |
1572 | --- debian/po/sk.po 1970-01-01 00:00:00 +0000 |
1573 | +++ debian/po/sk.po 2014-07-10 22:50:00 +0000 |
1574 | @@ -0,0 +1,104 @@ |
1575 | +# Slovak translations for ejabberd package |
1576 | +# Slovenské preklady pre balík ejabberd. |
1577 | +# Copyright (C) 2011 THE ejabberd'S COPYRIGHT HOLDER |
1578 | +# This file is distributed under the same license as the ejabberd package. |
1579 | +# Automatically generated, 2011. |
1580 | +# Slavko <linux@slavino.sk>, 2011. |
1581 | +# |
1582 | +msgid "" |
1583 | +msgstr "" |
1584 | +"Project-Id-Version: ejabberd 2.1.9-1\n" |
1585 | +"Report-Msgid-Bugs-To: twerner@debian.org\n" |
1586 | +"POT-Creation-Date: 2008-02-15 10:37+0300\n" |
1587 | +"PO-Revision-Date: 2011-10-30 15:15+0100\n" |
1588 | +"Last-Translator: Slavko <linux@slavino.sk>\n" |
1589 | +"Language-Team: slovenčina <debian-l10n-slovak@lists.debian.org>\n" |
1590 | +"Language: sk\n" |
1591 | +"MIME-Version: 1.0\n" |
1592 | +"Content-Type: text/plain; charset=UTF-8\n" |
1593 | +"Content-Transfer-Encoding: 8bit\n" |
1594 | +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" |
1595 | +"X-POFile-SpellExtra: admin hostname Jabber ejabberd administračného\n" |
1596 | + |
1597 | +#. Type: string |
1598 | +#. Description |
1599 | +#: ../templates:1001 |
1600 | +msgid "The name of the host ejabberd will serve:" |
1601 | +msgstr "Meno hostiteľa, ktoré bude ejabberd poskytovať:" |
1602 | + |
1603 | +#. Type: string |
1604 | +#. Description |
1605 | +#: ../templates:1001 |
1606 | +msgid "Please enter the hostname of your Jabber server (in lowercase)." |
1607 | +msgstr "Prosím, zadajte meno hostiteľa servera Jabber (malými písmenami)." |
1608 | + |
1609 | +#. Type: string |
1610 | +#. Description |
1611 | +#: ../templates:2001 |
1612 | +msgid "The username of an admin account for ejabberd:" |
1613 | +msgstr "Meno používateľa účtu administrátora pre ejabberd:" |
1614 | + |
1615 | +#. Type: string |
1616 | +#. Description |
1617 | +#: ../templates:2001 |
1618 | +msgid "" |
1619 | +"Please provide the name of an account to administrate the ejabberd server. " |
1620 | +"After the installation of ejabberd you can use this account to log in with " |
1621 | +"any Jabber client to do administrative tasks or go to http://" |
1622 | +"${hostname}:5280/admin/ and log in with this account to enter the admin " |
1623 | +"interface. Enter the username part here (e.g. ${user}), but use the full " |
1624 | +"Jabber ID (e.g. ${user}@${hostname}) to log into ejabberd web interface; " |
1625 | +"otherwise it will fail." |
1626 | +msgstr "" |
1627 | +"Prosím, zadajte meno účtu administrátora servera ejabberd. Po inštalácii " |
1628 | +"ejabberd môžete tento účet použiť na prihlásenie sa pomocou ktoréhokoľvek " |
1629 | +"klienta Jabber a vykonávanie administratívnych úloh alebo použiť http://" |
1630 | +"${hostname}:5280/admin/ a prihlásiť sa pomocou tohoto účtu do " |
1631 | +"administračného rozhrania. Tu zadajte len časť s používateľským menom (napr. " |
1632 | +"${user}), ale na prihlásenie do webového rozhrania ejabberd použite úplný " |
1633 | +"identifikátor Jabber (napr. ${user}@${hostname}); inak prihlásenie zlyhá." |
1634 | + |
1635 | +#. Type: string |
1636 | +#. Description |
1637 | +#: ../templates:2001 |
1638 | +msgid "Leave empty if you don't want to create an admin account automatically." |
1639 | +msgstr "" |
1640 | +"Nechajte prázdne, ak nechcete aby bol účet administrátora vytvorený " |
1641 | +"automaticky." |
1642 | + |
1643 | +#. Type: password |
1644 | +#. Description |
1645 | +#: ../templates:3001 |
1646 | +msgid "The password for the admin account:" |
1647 | +msgstr "Heslo účtu administrátora:" |
1648 | + |
1649 | +#. Type: password |
1650 | +#. Description |
1651 | +#: ../templates:3001 |
1652 | +msgid "Please enter the password for the administrative user." |
1653 | +msgstr "Prosím, zadajte heslo administračného používateľa." |
1654 | + |
1655 | +#. Type: password |
1656 | +#. Description |
1657 | +#: ../templates:4001 |
1658 | +msgid "The password for the admin account again for verification:" |
1659 | +msgstr "Heslo administrátora znova, kvôli overeniu:" |
1660 | + |
1661 | +#. Type: password |
1662 | +#. Description |
1663 | +#: ../templates:4001 |
1664 | +msgid "" |
1665 | +"Please reenter the password for the administrative user for verification." |
1666 | +msgstr "Prosím, zdajte znova heslo administrátora, kvôli overeniu." |
1667 | + |
1668 | +#. Type: error |
1669 | +#. Description |
1670 | +#: ../templates:5001 |
1671 | +msgid "The passwords do not match!" |
1672 | +msgstr "Heslá sa nezhodujú!" |
1673 | + |
1674 | +#. Type: error |
1675 | +#. Description |
1676 | +#: ../templates:5001 |
1677 | +msgid "The passwords you have typed do not match. Please try again." |
1678 | +msgstr "Heslá, ktoré ste zadali sa nezhodujú. Prosím, skúste znova." |
1679 | |
1680 | === modified file 'debian/prerm' |
1681 | --- debian/prerm 2007-05-18 13:44:53 +0000 |
1682 | +++ debian/prerm 2014-07-10 22:50:00 +0000 |
1683 | @@ -15,15 +15,23 @@ |
1684 | # <conflicting-package> <version> |
1685 | # for details, see /usr/doc/packaging-manual/ |
1686 | |
1687 | +ctl() { |
1688 | + local cmd='/usr/sbin/ejabberdctl' |
1689 | + for arg in "$@"; do |
1690 | + cmd="$cmd '$arg'" |
1691 | + done |
1692 | + su ejabberd -c "$cmd" |
1693 | +} |
1694 | + |
1695 | case "$1" in |
1696 | remove|upgrade) |
1697 | - if ejabberdctl status >/dev/null ; then |
1698 | + if ctl status >/dev/null ; then |
1699 | # Use timestamp to make database restoring easier |
1700 | TIME=$(date +%Y-%m-%dT%H:%M:%S) |
1701 | BACKUPDIR=$(mktemp -d -p /var/backups/ ejabberd-$TIME.XXXXXX) |
1702 | chown ejabberd:ejabberd $BACKUPDIR |
1703 | BACKUP=$BACKUPDIR/ejabberd-database |
1704 | - ejabberdctl backup $BACKUP |
1705 | + ctl backup $BACKUP |
1706 | # Change ownership to root:root because ejabberd user might be |
1707 | # removed on package removal. |
1708 | chown -R root:root $BACKUPDIR |
1709 | |
1710 | === modified file 'debian/rules' |
1711 | --- debian/rules 2012-02-01 01:50:40 +0000 |
1712 | +++ debian/rules 2014-07-10 22:50:00 +0000 |
1713 | @@ -24,7 +24,7 @@ |
1714 | configure: configure-stamp |
1715 | configure-stamp: $(QUILT_STAMPFN) |
1716 | dh_testdir |
1717 | - |
1718 | + dh_autotools-dev_updateconfig |
1719 | dh_auto_configure $(AUTO_OPTS) -- $(DEB_CONFIGURE_EXTRA_FLAGS) \ |
1720 | $(shell dpkg-buildflags --export=configure) |
1721 | |
1722 | @@ -35,7 +35,7 @@ |
1723 | build-arch: build-stamp |
1724 | build-indep: build-stamp |
1725 | |
1726 | -build-stamp: configure-stamp |
1727 | +build-stamp: configure-stamp |
1728 | dh_testdir |
1729 | |
1730 | dh_auto_build $(AUTO_OPTS) |
1731 | @@ -48,13 +48,13 @@ |
1732 | rm -f build-stamp configure-stamp |
1733 | |
1734 | dh_auto_clean $(AUTO_OPTS) |
1735 | - |
1736 | - dh_clean |
1737 | + dh_autotools-dev_restoreconfig |
1738 | + dh_clean |
1739 | |
1740 | install: build |
1741 | dh_testdir |
1742 | dh_testroot |
1743 | - dh_prep |
1744 | + dh_prep |
1745 | dh_installdirs |
1746 | |
1747 | dh_auto_install $(AUTO_OPTS) |
1748 | @@ -72,6 +72,8 @@ |
1749 | # Remove autogenerated init-script: |
1750 | rm $(CURDIR)/src/ejabberd.init |
1751 | |
1752 | + install -m644 debian/ejabberd.ufw.profile debian/ejabberd/etc/ufw/applications.d/ejabberd |
1753 | + |
1754 | |
1755 | # Build architecture-independent files here. |
1756 | binary-indep: install |
1757 | @@ -81,7 +83,7 @@ |
1758 | binary-arch: install |
1759 | dh_testdir |
1760 | dh_testroot |
1761 | - dh_installchangelogs |
1762 | + dh_installchangelogs |
1763 | dh_installdocs |
1764 | dh_installexamples |
1765 | dh_install |
1766 | |
1767 | === modified file 'doc/api/overview.edoc' |
1768 | --- doc/api/overview.edoc 2009-01-15 19:44:58 +0000 |
1769 | +++ doc/api/overview.edoc 2014-07-10 22:50:00 +0000 |
1770 | @@ -1,6 +1,6 @@ |
1771 | @author Mickael Remond <mickael.remond@process-one.net> |
1772 | [http://www.process-one.net/] |
1773 | -@copyright 2007 ProcessOne |
1774 | +@copyright 2013 ProcessOne |
1775 | @version {@vsn}, {@date} {@time} |
1776 | @title ejabberd Development API Documentation |
1777 | |
1778 | |
1779 | === modified file 'doc/dev.html' |
1780 | --- doc/dev.html 2012-01-08 11:45:38 +0000 |
1781 | +++ doc/dev.html 2014-07-10 22:50:00 +0000 |
1782 | @@ -2,7 +2,7 @@ |
1783 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
1784 | <HTML> |
1785 | <HEAD> |
1786 | -<TITLE>Ejabberd 2.1.10 Developers Guide |
1787 | +<TITLE>Ejabberd 2.1.13 Developers Guide |
1788 | </TITLE> |
1789 | |
1790 | <META http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
1791 | @@ -49,7 +49,7 @@ |
1792 | <!--HEVEA command line is: /usr/bin/hevea -fix -pedantic dev.tex --> |
1793 | <!--CUT DEF section 1 --><P><A NAME="titlepage"></A> |
1794 | |
1795 | -</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.10 Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR> |
1796 | +</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.13 Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR> |
1797 | <A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR> |
1798 | <A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3></TD></TR> |
1799 | </TABLE><DIV CLASS="center"> |
1800 | |
1801 | === modified file 'doc/features.html' |
1802 | --- doc/features.html 2012-01-08 11:45:38 +0000 |
1803 | +++ doc/features.html 2014-07-10 22:50:00 +0000 |
1804 | @@ -2,7 +2,7 @@ |
1805 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
1806 | <HTML> |
1807 | <HEAD> |
1808 | -<TITLE>Ejabberd 2.1.10 Feature Sheet |
1809 | +<TITLE>Ejabberd 2.1.13 Feature Sheet |
1810 | </TITLE> |
1811 | |
1812 | <META http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
1813 | @@ -50,7 +50,7 @@ |
1814 | <!--HEVEA command line is: /usr/bin/hevea -fix -pedantic features.tex --> |
1815 | <!--CUT DEF section 1 --><P><A NAME="titlepage"></A> |
1816 | |
1817 | -</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.10 Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR> |
1818 | +</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.13 Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR> |
1819 | <A HREF="mailto:s.devrieze@pandora.be"><TT>mailto:s.devrieze@pandora.be</TT></A><BR> |
1820 | <A HREF="xmpp:sander@devrieze.dyndns.org"><TT>xmpp:sander@devrieze.dyndns.org</TT></A></H3></TD></TR> |
1821 | </TABLE><DIV CLASS="center"> |
1822 | |
1823 | === modified file 'doc/guide.html' |
1824 | --- doc/guide.html 2012-01-08 11:45:38 +0000 |
1825 | +++ doc/guide.html 2014-07-10 22:50:00 +0000 |
1826 | @@ -6,7 +6,7 @@ |
1827 | |
1828 | |
1829 | |
1830 | - ejabberd 2.1.10 |
1831 | + ejabberd 2.1.13 |
1832 | |
1833 | Installation and Operation Guide |
1834 | |
1835 | @@ -76,7 +76,7 @@ |
1836 | <HR SIZE=2><BR> |
1837 | <BR> |
1838 | |
1839 | -<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=right NOWRAP> <FONT SIZE=6><B>ejabberd 2.1.10 </B></FONT></TD></TR> |
1840 | +<TABLE CELLSPACING=6 CELLPADDING=0><TR><TD ALIGN=right NOWRAP> <FONT SIZE=6><B>ejabberd 2.1.13 </B></FONT></TD></TR> |
1841 | <TR><TD ALIGN=right NOWRAP> </TD></TR> |
1842 | <TR><TD ALIGN=right NOWRAP> <FONT SIZE=6>Installation and Operation Guide</FONT></TD></TR> |
1843 | </TABLE><BR> |
1844 | @@ -109,7 +109,7 @@ |
1845 | </LI><LI CLASS="li-toc"><A HREF="#htoc15">2.4.7  Specific Notes for Sun Solaris</A> |
1846 | </LI><LI CLASS="li-toc"><A HREF="#htoc16">2.4.8  Specific Notes for Microsoft Windows</A> |
1847 | </LI></UL> |
1848 | -</LI><LI CLASS="li-toc"><A HREF="#htoc17">2.5  Create a XMPP Account for Administration</A> |
1849 | +</LI><LI CLASS="li-toc"><A HREF="#htoc17">2.5  Create an XMPP Account for Administration</A> |
1850 | </LI><LI CLASS="li-toc"><A HREF="#htoc18">2.6  Upgrading <TT>ejabberd</TT></A> |
1851 | </LI></UL> |
1852 | </LI><LI CLASS="li-toc"><A HREF="#htoc19">Chapter 3  Configuring <TT>ejabberd</TT></A> |
1853 | @@ -348,7 +348,7 @@ |
1854 | GNU Make |
1855 | </LI><LI CLASS="li-itemize">GCC |
1856 | </LI><LI CLASS="li-itemize">Libexpat 1.95 or higher |
1857 | -</LI><LI CLASS="li-itemize">Erlang/OTP R10B-9 or higher. The recommended versions are R12B-5 and R13B04. |
1858 | +</LI><LI CLASS="li-itemize">Erlang/OTP R10B-9 or higher. The recommended versions are R13B04 and R14B04. |
1859 | Don’t use R14A or R14B because <A HREF="http://www.erlang.org/cgi-bin/ezmlm-cgi/4/54598">they have a bug</A>. |
1860 | </LI><LI CLASS="li-itemize">OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption. |
1861 | </LI><LI CLASS="li-itemize">Zlib 1.2.3 or higher, for Stream Compression support (<A HREF="http://xmpp.org/extensions/xep-0138.html">XEP-0138</A>). Optional. |
1862 | @@ -513,16 +513,16 @@ |
1863 | nmake -f Makefile.win32 |
1864 | </PRE></LI><LI CLASS="li-enumerate">Edit the file <CODE>ejabberd\src\ejabberd.cfg</CODE> and run |
1865 | <PRE CLASS="verbatim">werl -s ejabberd -name ejabberd |
1866 | -</PRE></LI></OL><P> <A NAME="initialadmin"></A> </P><!--TOC section Create a XMPP Account for Administration--> |
1867 | -<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc17">2.5</A>  <A HREF="#initialadmin">Create a XMPP Account for Administration</A></H2><!--SEC END --><P> <A NAME="initialadmin"></A> </P><P>You need a XMPP account and grant him administrative privileges |
1868 | +</PRE></LI></OL><P> <A NAME="initialadmin"></A> </P><!--TOC section Create an XMPP Account for Administration--> |
1869 | +<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc17">2.5</A>  <A HREF="#initialadmin">Create an XMPP Account for Administration</A></H2><!--SEC END --><P> <A NAME="initialadmin"></A> </P><P>You need an XMPP account and grant him administrative privileges |
1870 | to enter the <TT>ejabberd</TT> Web Admin: |
1871 | </P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate"> |
1872 | -Register a XMPP account on your <TT>ejabberd</TT> server, for example <TT>admin1@example.org</TT>. |
1873 | -There are two ways to register a XMPP account: |
1874 | +Register an XMPP account on your <TT>ejabberd</TT> server, for example <TT>admin1@example.org</TT>. |
1875 | +There are two ways to register an XMPP account: |
1876 | <OL CLASS="enumerate" type=a><LI CLASS="li-enumerate"> |
1877 | Using <TT>ejabberdctl</TT> (see section <A HREF="#ejabberdctl">4.1</A>): |
1878 | <PRE CLASS="verbatim">ejabberdctl register admin1 example.org FgT5bk3 |
1879 | -</PRE></LI><LI CLASS="li-enumerate">Using a XMPP client and In-Band Registration (see section <A HREF="#modregister">3.3.19</A>). |
1880 | +</PRE></LI><LI CLASS="li-enumerate">Using an XMPP client and In-Band Registration (see section <A HREF="#modregister">3.3.19</A>). |
1881 | </LI></OL> |
1882 | </LI><LI CLASS="li-enumerate">Edit the <TT>ejabberd</TT> configuration file to give administration rights to the XMPP account you created: |
1883 | <PRE CLASS="verbatim">{acl, admin, {user, "admin1", "example.org"}}. |
1884 | @@ -688,14 +688,14 @@ |
1885 | Interacts with an <A HREF="http://www.ejabberd.im/tutorials-transports">external component</A> |
1886 | (as defined in the Jabber Component Protocol (<A HREF="http://xmpp.org/extensions/xep-0114.html">XEP-0114</A>).<BR> |
1887 | Options: <TT>access</TT>, <TT>hosts</TT>, <TT>max_fsm_queue</TT>, |
1888 | -<TT>service_check_from</TT>, <TT>shaper</TT> |
1889 | +<TT>service_check_from</TT>, <TT>shaper_rule</TT> |
1890 | </DD><DT CLASS="dt-description"><B><TT>ejabberd_stun</TT></B></DT><DD CLASS="dd-description"> |
1891 | Handles STUN Binding requests as defined in |
1892 | <A HREF="http://tools.ietf.org/html/rfc5389">RFC 5389</A>.<BR> |
1893 | Options: <TT>certfile</TT> |
1894 | </DD><DT CLASS="dt-description"><B><TT>ejabberd_http</TT></B></DT><DD CLASS="dd-description"> |
1895 | Handles incoming HTTP connections.<BR> |
1896 | - Options: <TT>captcha</TT>, <TT>certfile</TT>, <TT>http_bind</TT>, <TT>http_poll</TT>, |
1897 | + Options: <TT>captcha</TT>, <TT>certfile</TT>, <TT>default_host</TT>, <TT>http_bind</TT>, <TT>http_poll</TT>, |
1898 | <TT>request_handlers</TT>, <TT>tls</TT>, <TT>trusted_proxies</TT>, <TT>web_admin</TT><BR> |
1899 | </DD></DL><P> <A NAME="listened-options"></A> </P><!--TOC subsubsection Options--> |
1900 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#listened-options">Options</A></H4><!--SEC END --><P> <A NAME="listened-options"></A> </P><P>This is a detailed description of each option allowed by the listening modules: |
1901 | @@ -712,6 +712,11 @@ |
1902 | Simple web page that allows a user to fill a CAPTCHA challenge (see section <A HREF="#captcha">3.1.8</A>). |
1903 | </DD><DT CLASS="dt-description"><B><TT>{certfile, Path}</TT></B></DT><DD CLASS="dd-description"> Full path to a file containing the default SSL certificate. |
1904 | To define a certificate file specific for a given domain, use the global option <TT>domain_certfile</TT>. |
1905 | +</DD><DT CLASS="dt-description"><B><TT>{default_host, undefined|HostName}</TT></B></DT><DD CLASS="dd-description"> |
1906 | +If the HTTP request received by ejabberd contains the HTTP header <TT>Host</TT> |
1907 | +with an ambiguous virtual host that doesn’t match any one defined in ejabberd (see <A HREF="#hostnames">3.1.1</A>), |
1908 | +then this configured HostName is set as the request Host. |
1909 | +The default value of this option is: <TT>undefined</TT>. |
1910 | </DD><DT CLASS="dt-description"><B><TT>{hosts, [Hostname, ...], [HostOption, ...]}</TT></B></DT><DD CLASS="dd-description"> |
1911 | The external Jabber component that connects to this <TT>ejabberd_service</TT> |
1912 | can serve one or more hostnames. |
1913 | @@ -787,6 +792,9 @@ |
1914 | </DD><DT CLASS="dt-description"><B><TT>{shaper, none|ShaperName}</TT></B></DT><DD CLASS="dd-description"> This option defines a |
1915 | shaper for the port (see section <A HREF="#shapers">3.1.6</A>). The default value |
1916 | is <TT>none</TT>. |
1917 | +</DD><DT CLASS="dt-description"><B><TT>{shaper_rule, none|ShaperRule}</TT></B></DT><DD CLASS="dd-description"> This option defines a |
1918 | +shaper rule for the <TT>ejabberd_service</TT> (see section <A HREF="#shapers">3.1.6</A>). The recommended value |
1919 | +is <TT>fast</TT>. |
1920 | </DD><DT CLASS="dt-description"><B><TT>starttls</TT></B></DT><DD CLASS="dd-description"> This option |
1921 | specifies that STARTTLS encryption is available on connections to the port. |
1922 | You should also set the <TT>certfile</TT> option. |
1923 | @@ -1059,7 +1067,11 @@ |
1924 | <A HREF="http://tools.ietf.org/html/rfc6120#section-7.7.2.2">XMPP Core: section 7.7.2.2</A>. |
1925 | The default value is <TT>closeold</TT>. |
1926 | If the client uses old Jabber Non-SASL authentication (<A HREF="http://xmpp.org/extensions/xep-0078.html">XEP-0078</A>), |
1927 | -then this option is not respected, and the action performed is <TT>closeold</TT>.</P><P> <A NAME="internalauth"></A> </P><!--TOC subsubsection Internal--> |
1928 | +then this option is not respected, and the action performed is <TT>closeold</TT>.</P><P>The option <TT>fqdn</TT> allows you to define the Fully Qualified Domain Name |
1929 | +of the machine, in case it isn’t detected automatically. |
1930 | +The FQDN is used to authenticate some clients that use the DIGEST-MD5 SASL mechanism. |
1931 | +The option syntax is: |
1932 | +</P><DL CLASS="description"><DT CLASS="dt-description"><B><TT>{fqdn, undefined|FqdnString|[FqdnString]}.</TT></B></DT></DL><P> <A NAME="internalauth"></A> </P><!--TOC subsubsection Internal--> |
1933 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#internalauth">Internal</A></H4><!--SEC END --><P> <A NAME="internalauth"></A> |
1934 | </P><P><TT>ejabberd</TT> uses its internal Mnesia database as the default authentication method. |
1935 | The value <TT>internal</TT> will enable the internal authentication method.</P><P>The option <TT>{auth_password_format, plain|scram}</TT> |
1936 | @@ -1106,7 +1118,7 @@ |
1937 | the authentication information since the user last disconnected, |
1938 | to verify again the user authentication without querying again the extauth script. |
1939 | Note: caching should not be enabled in a host if internal auth is also enabled. |
1940 | -If caching is enabled, <TT>mod_last</TT> or <TT>mod_last_odbc</TT> must be enabled also in that vhost. |
1941 | +If caching is enabled, <TT>mod_last</TT> must be enabled also in that vhost. |
1942 | </DD></DL><P>This example sets external authentication, the extauth script, enables caching for 10 minutes, |
1943 | and starts three instances of the script for each virtual host defined in ejabberd: |
1944 | </P><PRE CLASS="verbatim">{auth_method, [external]}. |
1945 | @@ -1201,7 +1213,7 @@ |
1946 | </LI><LI CLASS="li-itemize">You may want to allow login access only for certain users. <TT>pam_listfile.so</TT> |
1947 | module provides such functionality. |
1948 | </LI><LI CLASS="li-itemize">If you use <TT>pam_winbind</TT> to authorise against a Windows Active Directory, |
1949 | -then <TT>/etc/nssswitch.conf</TT> must be configured to use <TT>winbind</TT> as well. |
1950 | +then <TT>/etc/nsswitch.conf</TT> must be configured to use <TT>winbind</TT> as well. |
1951 | </LI></UL><P> <A NAME="accessrules"></A> </P><!--TOC subsection Access Rules--> |
1952 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc25">3.1.5</A>  <A HREF="#accessrules">Access Rules</A></H3><!--SEC END --><P> <A NAME="accessrules"></A> |
1953 | </P><P> <A NAME="ACLDefinition"></A> </P><!--TOC subsubsection ACL Definition--> |
1954 | @@ -1340,7 +1352,7 @@ |
1955 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
1956 | <B><TT>{captcha_cmd, Path}</TT></B></DT><DD CLASS="dd-description"> |
1957 | Full path to a script that generates the image. |
1958 | -The default value is an empty string: <TT>""</TT> |
1959 | +The default value disables the feature: <TT>undefined</TT> |
1960 | </DD><DT CLASS="dt-description"><B><TT>{captcha_host, ProtocolHostPort}</TT></B></DT><DD CLASS="dd-description"> |
1961 | ProtocolHostPort is a string with the host, and optionally the Protocol and Port number. |
1962 | It must identify where ejabberd listens for CAPTCHA requests. |
1963 | @@ -1560,12 +1572,10 @@ |
1964 | </PRE><P> <A NAME="mysqlstorage"></A> </P><!--TOC subsubsection Storage--> |
1965 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#mysqlstorage">Storage</A></H4><!--SEC END --><P> <A NAME="mysqlstorage"></A> |
1966 | </P><P>MySQL also can be used to store information into from several <TT>ejabberd</TT> |
1967 | -modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules have a version |
1968 | -with the ‘_odbc’. This suffix indicates that the module can be used with |
1969 | +modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules can be used with |
1970 | relational databases like MySQL. To enable storage to your database, just make |
1971 | -sure that your database is running well (see previous sections), and replace the |
1972 | -suffix-less or ldap module variant with the odbc module variant. Keep in mind |
1973 | -that you cannot have several variants of the same module loaded!</P><P> <A NAME="mssql"></A> </P><!--TOC subsection Microsoft SQL Server--> |
1974 | +sure that your database is running well (see previous sections), and add the |
1975 | +module option <TT>{db_type, odbc}</TT>.</P><P> <A NAME="mssql"></A> </P><!--TOC subsection Microsoft SQL Server--> |
1976 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc34">3.2.2</A>  <A HREF="#mssql">Microsoft SQL Server</A></H3><!--SEC END --><P> <A NAME="mssql"></A> |
1977 | </P><P>Although this section will describe <TT>ejabberd</TT>’s configuration when you want to |
1978 | use Microsoft SQL Server, it does not describe Microsoft SQL Server’s |
1979 | @@ -1592,13 +1602,10 @@ |
1980 | ODBC compatible servers (see section <A HREF="#odbcauth">3.2.4</A>).</P><P> <A NAME="mssqlstorage"></A> </P><!--TOC subsubsection Storage--> |
1981 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#mssqlstorage">Storage</A></H4><!--SEC END --><P> <A NAME="mssqlstorage"></A> |
1982 | </P><P>Microsoft SQL Server also can be used to store information into from several |
1983 | -<TT>ejabberd</TT> modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules have |
1984 | -a version with the ‘_odbc’. This suffix indicates that the module can be used |
1985 | -with relational databases like Microsoft SQL Server. To enable storage to your |
1986 | -database, just make sure that your database is running well (see previous |
1987 | -sections), and replace the suffix-less or ldap module variant with the odbc |
1988 | -module variant. Keep in mind that you cannot have several variants of the same |
1989 | -module loaded!</P><P> <A NAME="pgsql"></A> </P><!--TOC subsection PostgreSQL--> |
1990 | +modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules can be used with |
1991 | +relational databases like MySQL. To enable storage to your database, just make |
1992 | +sure that your database is running well (see previous sections), and add the |
1993 | +module option <TT>{db_type, odbc}</TT>.</P><P> <A NAME="pgsql"></A> </P><!--TOC subsection PostgreSQL--> |
1994 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc35">3.2.3</A>  <A HREF="#pgsql">PostgreSQL</A></H3><!--SEC END --><P> <A NAME="pgsql"></A> |
1995 | </P><P>Although this section will describe <TT>ejabberd</TT>’s configuration when you want to |
1996 | use the native PostgreSQL driver, it does not describe PostgreSQL’s installation |
1997 | @@ -1650,12 +1657,10 @@ |
1998 | </PRE><P> <A NAME="pgsqlstorage"></A> </P><!--TOC subsubsection Storage--> |
1999 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#pgsqlstorage">Storage</A></H4><!--SEC END --><P> <A NAME="pgsqlstorage"></A> |
2000 | </P><P>PostgreSQL also can be used to store information into from several <TT>ejabberd</TT> |
2001 | -modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules have a version |
2002 | -with the ‘_odbc’. This suffix indicates that the module can be used with |
2003 | -relational databases like PostgreSQL. To enable storage to your database, just |
2004 | -make sure that your database is running well (see previous sections), and |
2005 | -replace the suffix-less or ldap module variant with the odbc module variant. |
2006 | -Keep in mind that you cannot have several variants of the same module loaded!</P><P> <A NAME="odbc"></A> </P><!--TOC subsection ODBC Compatible--> |
2007 | +modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules can be used with |
2008 | +relational databases like MySQL. To enable storage to your database, just make |
2009 | +sure that your database is running well (see previous sections), and add the |
2010 | +module option <TT>{db_type, odbc}</TT>.</P><P> <A NAME="odbc"></A> </P><!--TOC subsection ODBC Compatible--> |
2011 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc36">3.2.4</A>  <A HREF="#odbc">ODBC Compatible</A></H3><!--SEC END --><P> <A NAME="odbc"></A> |
2012 | </P><P>Although this section will describe <TT>ejabberd</TT>’s configuration when you want to |
2013 | use the ODBC driver, it does not describe the installation and database creation |
2014 | @@ -1694,13 +1699,11 @@ |
2015 | </PRE><P> <A NAME="odbcstorage"></A> </P><!--TOC subsubsection Storage--> |
2016 | <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A HREF="#odbcstorage">Storage</A></H4><!--SEC END --><P> <A NAME="odbcstorage"></A> |
2017 | </P><P>An ODBC compatible database also can be used to store information into from |
2018 | -several <TT>ejabberd</TT> modules. See section <A HREF="#modoverview">3.3.1</A> to see which |
2019 | -modules have a version with the ‘_odbc’. This suffix indicates that the module |
2020 | -can be used with ODBC compatible relational databases. To enable storage to your |
2021 | -database, just make sure that your database is running well (see previous |
2022 | -sections), and replace the suffix-less or ldap module variant with the odbc |
2023 | -module variant. Keep in mind that you cannot have several variants of the same |
2024 | -module loaded!</P><P> <A NAME="ldap"></A> </P><!--TOC subsection LDAP--> |
2025 | +several <TT>ejabberd</TT> |
2026 | +modules. See section <A HREF="#modoverview">3.3.1</A> to see which modules can be used with |
2027 | +relational databases like MySQL. To enable storage to your database, just make |
2028 | +sure that your database is running well (see previous sections), and add the |
2029 | +module option <TT>{db_type, odbc}</TT>.</P><P> <A NAME="ldap"></A> </P><!--TOC subsection LDAP--> |
2030 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc37">3.2.5</A>  <A HREF="#ldap">LDAP</A></H3><!--SEC END --><P> <A NAME="ldap"></A> |
2031 | </P><P><TT>ejabberd</TT> has built-in LDAP support. You can authenticate users against LDAP |
2032 | server and use LDAP directory as vCard storage.</P><P>Usually <TT>ejabberd</TT> treats LDAP as a read-only storage: |
2033 | @@ -1959,61 +1962,37 @@ |
2034 | <TR><TD ALIGN=left NOWRAP><A HREF="#modhttpfileserver"><TT>mod_http_fileserver</TT></A></TD><TD ALIGN=left NOWRAP>Small HTTP file server</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2035 | <TR><TD ALIGN=left NOWRAP><A HREF="#modirc"><TT>mod_irc</TT></A></TD><TD ALIGN=left NOWRAP>IRC transport</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2036 | <TR><TD ALIGN=left NOWRAP><A HREF="#modlast"><TT>mod_last</TT></A></TD><TD ALIGN=left NOWRAP>Last Activity (<A HREF="http://xmpp.org/extensions/xep-0012.html">XEP-0012</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2037 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modlast"><TT>mod_last_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Last Activity (<A HREF="http://xmpp.org/extensions/xep-0012.html">XEP-0012</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2038 | <TR><TD ALIGN=left NOWRAP><A HREF="#modmuc"><TT>mod_muc</TT></A></TD><TD ALIGN=left NOWRAP>Multi-User Chat (<A HREF="http://xmpp.org/extensions/xep-0045.html">XEP-0045</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2039 | <TR><TD ALIGN=left NOWRAP><A HREF="#modmuclog"><TT>mod_muc_log</TT></A></TD><TD ALIGN=left NOWRAP>Multi-User Chat room logging</TD><TD ALIGN=left NOWRAP><TT>mod_muc</TT></TD></TR> |
2040 | <TR><TD ALIGN=left NOWRAP><A HREF="#modoffline"><TT>mod_offline</TT></A></TD><TD ALIGN=left NOWRAP>Offline message storage (<A HREF="http://xmpp.org/extensions/xep-0160.html">XEP-0160</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2041 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modoffline"><TT>mod_offline_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Offline message storage (<A HREF="http://xmpp.org/extensions/xep-0160.html">XEP-0160</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2042 | <TR><TD ALIGN=left NOWRAP><A HREF="#modping"><TT>mod_ping</TT></A></TD><TD ALIGN=left NOWRAP>XMPP Ping and periodic keepalives (<A HREF="http://xmpp.org/extensions/xep-0199.html">XEP-0199</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2043 | <TR><TD ALIGN=left NOWRAP><A HREF="#modprescounter"><TT>mod_pres_counter</TT></A></TD><TD ALIGN=left NOWRAP>Detect presence subscription flood</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2044 | <TR><TD ALIGN=left NOWRAP><A HREF="#modprivacy"><TT>mod_privacy</TT></A></TD><TD ALIGN=left NOWRAP>Blocking Communication (<A HREF="http://xmpp.org/extensions/xep-0016.html">XEP-0016</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2045 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modprivacy"><TT>mod_privacy_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Blocking Communication (<A HREF="http://xmpp.org/extensions/xep-0016.html">XEP-0016</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2046 | <TR><TD ALIGN=left NOWRAP><A HREF="#modprivate"><TT>mod_private</TT></A></TD><TD ALIGN=left NOWRAP>Private XML Storage (<A HREF="http://xmpp.org/extensions/xep-0049.html">XEP-0049</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2047 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modprivate"><TT>mod_private_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Private XML Storage (<A HREF="http://xmpp.org/extensions/xep-0049.html">XEP-0049</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2048 | <TR><TD ALIGN=left NOWRAP><A HREF="#modproxy"><TT>mod_proxy65</TT></A></TD><TD ALIGN=left NOWRAP>SOCKS5 Bytestreams (<A HREF="http://xmpp.org/extensions/xep-0065.html">XEP-0065</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2049 | <TR><TD ALIGN=left NOWRAP><A HREF="#modpubsub"><TT>mod_pubsub</TT></A></TD><TD ALIGN=left NOWRAP>Pub-Sub (<A HREF="http://xmpp.org/extensions/xep-0060.html">XEP-0060</A>), PEP (<A HREF="http://xmpp.org/extensions/xep-0163.html">XEP-0163</A>)</TD><TD ALIGN=left NOWRAP><TT>mod_caps</TT></TD></TR> |
2050 | <TR><TD ALIGN=left NOWRAP><A HREF="#modpubsub"><TT>mod_pubsub_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Pub-Sub (<A HREF="http://xmpp.org/extensions/xep-0060.html">XEP-0060</A>), PEP (<A HREF="http://xmpp.org/extensions/xep-0163.html">XEP-0163</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*) and <TT>mod_caps</TT></TD></TR> |
2051 | <TR><TD ALIGN=left NOWRAP><A HREF="#modregister"><TT>mod_register</TT></A></TD><TD ALIGN=left NOWRAP>In-Band Registration (<A HREF="http://xmpp.org/extensions/xep-0077.html">XEP-0077</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2052 | <TR><TD ALIGN=left NOWRAP><A HREF="#modregisterweb"><TT>mod_register_web</TT></A></TD><TD ALIGN=left NOWRAP>Web for Account Registrations</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2053 | <TR><TD ALIGN=left NOWRAP><A HREF="#modroster"><TT>mod_roster</TT></A></TD><TD ALIGN=left NOWRAP>Roster management (XMPP IM)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2054 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modroster"><TT>mod_roster_odbc</TT></A></TD><TD ALIGN=left NOWRAP>Roster management (XMPP IM)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2055 | <TR><TD ALIGN=left NOWRAP><A HREF="#modservicelog"><TT>mod_service_log</TT></A></TD><TD ALIGN=left NOWRAP>Copy user messages to logger service</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2056 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modsharedroster"><TT>mod_shared_roster</TT></A></TD><TD ALIGN=left NOWRAP>Shared roster management</TD><TD ALIGN=left NOWRAP><TT>mod_roster</TT> or</TD></TR> |
2057 | -<TR><TD ALIGN=left NOWRAP> </TD><TD ALIGN=left NOWRAP> </TD><TD ALIGN=left NOWRAP><TT>mod_roster_odbc</TT></TD></TR> |
2058 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modsharedrosterldap"><TT>mod_shared_roster_ldap</TT></A></TD><TD ALIGN=left NOWRAP>LDAP Shared roster management</TD><TD ALIGN=left NOWRAP><TT>mod_roster</TT> or</TD></TR> |
2059 | -<TR><TD ALIGN=left NOWRAP> </TD><TD ALIGN=left NOWRAP> </TD><TD ALIGN=left NOWRAP><TT>mod_roster_odbc</TT></TD></TR> |
2060 | +<TR><TD ALIGN=left NOWRAP><A HREF="#modsharedroster"><TT>mod_shared_roster</TT></A></TD><TD ALIGN=left NOWRAP>Shared roster management</TD><TD ALIGN=left NOWRAP><TT>mod_roster</TT></TD></TR> |
2061 | +<TR><TD ALIGN=left NOWRAP><A HREF="#modsharedrosterldap"><TT>mod_shared_roster_ldap</TT></A></TD><TD ALIGN=left NOWRAP>LDAP Shared roster management</TD><TD ALIGN=left NOWRAP><TT>mod_roster</TT></TD></TR> |
2062 | <TR><TD ALIGN=left NOWRAP><A HREF="#modsic"><TT>mod_sic</TT></A></TD><TD ALIGN=left NOWRAP>Server IP Check (<A HREF="http://xmpp.org/extensions/xep-0279.html">XEP-0279</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2063 | <TR><TD ALIGN=left NOWRAP><A HREF="#modstats"><TT>mod_stats</TT></A></TD><TD ALIGN=left NOWRAP>Statistics Gathering (<A HREF="http://xmpp.org/extensions/xep-0039.html">XEP-0039</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2064 | <TR><TD ALIGN=left NOWRAP><A HREF="#modtime"><TT>mod_time</TT></A></TD><TD ALIGN=left NOWRAP>Entity Time (<A HREF="http://xmpp.org/extensions/xep-0202.html">XEP-0202</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2065 | <TR><TD ALIGN=left NOWRAP><A HREF="#modvcard"><TT>mod_vcard</TT></A></TD><TD ALIGN=left NOWRAP>vcard-temp (<A HREF="http://xmpp.org/extensions/xep-0054.html">XEP-0054</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2066 | <TR><TD ALIGN=left NOWRAP><A HREF="#modvcardldap"><TT>mod_vcard_ldap</TT></A></TD><TD ALIGN=left NOWRAP>vcard-temp (<A HREF="http://xmpp.org/extensions/xep-0054.html">XEP-0054</A>)</TD><TD ALIGN=left NOWRAP>LDAP server</TD></TR> |
2067 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modvcard"><TT>mod_vcard_odbc</TT></A></TD><TD ALIGN=left NOWRAP>vcard-temp (<A HREF="http://xmpp.org/extensions/xep-0054.html">XEP-0054</A>)</TD><TD ALIGN=left NOWRAP>supported DB (*)</TD></TR> |
2068 | -<TR><TD ALIGN=left NOWRAP><A HREF="#modvcardxupdate"><TT>mod_vcard_xupdate</TT></A></TD><TD ALIGN=left NOWRAP>vCard-Based Avatars (<A HREF="http://xmpp.org/extensions/xep-0153.html">XEP-0153</A>)</TD><TD ALIGN=left NOWRAP><TT>mod_vcard</TT> or <TT>mod_vcard_odbc</TT></TD></TR> |
2069 | +<TR><TD ALIGN=left NOWRAP><A HREF="#modvcardxupdate"><TT>mod_vcard_xupdate</TT></A></TD><TD ALIGN=left NOWRAP>vCard-Based Avatars (<A HREF="http://xmpp.org/extensions/xep-0153.html">XEP-0153</A>)</TD><TD ALIGN=left NOWRAP><TT>mod_vcard</TT></TD></TR> |
2070 | <TR><TD ALIGN=left NOWRAP><A HREF="#modversion"><TT>mod_version</TT></A></TD><TD ALIGN=left NOWRAP>Software Version (<A HREF="http://xmpp.org/extensions/xep-0092.html">XEP-0092</A>)</TD><TD ALIGN=left NOWRAP> </TD></TR> |
2071 | </TABLE> |
2072 | <DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></DIV></BLOCKQUOTE><UL CLASS="itemize"><LI CLASS="li-itemize"> |
2073 | (*) This module requires a supported database. For a list of supported databases, see section <A HREF="#database">3.2</A>. |
2074 | </LI></UL><P>You can see which database backend each module needs by looking at the suffix: |
2075 | </P><UL CLASS="itemize"><LI CLASS="li-itemize"> |
2076 | -No suffix, this means that the modules uses Erlang’s built-in database |
2077 | -Mnesia as backend. |
2078 | -</LI><LI CLASS="li-itemize">‘_odbc’, this means that the module needs a supported database |
2079 | -(see <A HREF="#database">3.2</A>) as backend. |
2080 | +No suffix, this means that the module uses Erlang’s built-in database |
2081 | +Mnesia as backend, or a ODBC database in some cases (see <A HREF="#database">3.2</A>). |
2082 | </LI><LI CLASS="li-itemize">‘_ldap’, this means that the module needs an LDAP server as backend. |
2083 | -</LI></UL><P>If you want to, |
2084 | -it is possible to use a relational database to store the tables created by some ejabberd modules. |
2085 | -You can do this by changing the module name to a name with an |
2086 | -<TT>_odbc</TT> suffix in <TT>ejabberd</TT> config file. You can use a relational |
2087 | -database for the following data:</P><UL CLASS="itemize"><LI CLASS="li-itemize"> |
2088 | -Last connection date and time: Use <TT>mod_last_odbc</TT> instead of |
2089 | -<TT>mod_last</TT>. |
2090 | -</LI><LI CLASS="li-itemize">Offline messages: Use <TT>mod_offline_odbc</TT> instead of |
2091 | -<TT>mod_offline</TT>. |
2092 | -</LI><LI CLASS="li-itemize">Rosters: Use <TT>mod_roster_odbc</TT> instead of <TT>mod_roster</TT>. |
2093 | -</LI><LI CLASS="li-itemize">Users’ VCARD: Use <TT>mod_vcard_odbc</TT> instead of <TT>mod_vcard</TT>. |
2094 | -</LI><LI CLASS="li-itemize">Private XML storage: Use <TT>mod_private_odbc</TT> instead of <TT>mod_private</TT>. |
2095 | -</LI><LI CLASS="li-itemize">User rules for blocking communications: Use <TT>mod_privacy_odbc</TT> instead of <TT>mod_privacy</TT>. |
2096 | -</LI><LI CLASS="li-itemize">Pub-Sub nodes, items and subscriptions: Use <TT>mod_pubsub_odbc</TT> instead of <TT>mod_pubsub</TT>. |
2097 | </LI></UL><P>You can find more |
2098 | <A HREF="http://www.ejabberd.im/contributions">contributed modules</A> on the |
2099 | <TT>ejabberd</TT> website. Please remember that these contributions might not work or |
2100 | @@ -2105,7 +2084,11 @@ |
2101 | Any message sent to this JID removes the existing message of the day (MOTD). |
2102 | </DD></DL><P>Options: |
2103 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2104 | -<B><TT>{access, AccessName}</TT></B></DT><DD CLASS="dd-description"> This option specifies who is allowed to |
2105 | +<B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2106 | +Define the type of storage where the module will create the tables and store user information. |
2107 | +The default is to store in the internal Mnesia database. |
2108 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2109 | +</DD><DT CLASS="dt-description"><B><TT>{access, AccessName}</TT></B></DT><DD CLASS="dd-description"> This option specifies who is allowed to |
2110 | send announcements and to set the message of the day (by default, nobody is |
2111 | able to send such messages). |
2112 | </DD></DL><P>Examples: |
2113 | @@ -2381,6 +2364,10 @@ |
2114 | hostname of the virtual host with the prefix ‘<TT>irc.</TT>’. The keyword "@HOST@" |
2115 | is replaced at start time with the real virtual host name. |
2116 | |
2117 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2118 | +Define the type of storage where the module will create the tables and store user information. |
2119 | +The default is to store in the internal Mnesia database. |
2120 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2121 | </DD><DT CLASS="dt-description"><B><TT>{access, AccessName}</TT></B></DT><DD CLASS="dd-description"> This option can be used to specify who |
2122 | may use the IRC transport (default value: <TT>all</TT>). |
2123 | </DD><DT CLASS="dt-description"><B><TT>{default_encoding, Encoding}</TT></B></DT><DD CLASS="dd-description"> Set the default IRC encoding. |
2124 | @@ -2421,6 +2408,10 @@ |
2125 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2126 | <B><TT>{iqdisc, Discipline}</TT></B></DT><DD CLASS="dd-description"> This specifies |
2127 | the processing discipline for Last activity (<TT>jabber:iq:last</TT>) IQ queries (see section <A HREF="#modiqdiscoption">3.3.2</A>). |
2128 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2129 | +Define the type of storage where the module will create the tables and store user information. |
2130 | +The default is to store in the internal Mnesia database. |
2131 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2132 | </DD></DL><P> <A NAME="modmuc"></A> </P><!--TOC subsection <TT>mod_muc</TT>--> |
2133 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc48">3.3.10</A>  <A HREF="#modmuc"><TT>mod_muc</TT></A></H3><!--SEC END --><P> <A NAME="modmuc"></A> |
2134 | </P><P>This module provides a Multi-User Chat (<A HREF="http://xmpp.org/extensions/xep-0045.html">XEP-0045</A>) service. |
2135 | @@ -2449,6 +2440,10 @@ |
2136 | hostname of the virtual host with the prefix ‘<TT>conference.</TT>’. The keyword "@HOST@" |
2137 | is replaced at start time with the real virtual host name. |
2138 | |
2139 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2140 | +Define the type of storage where the module will create the tables and store user information. |
2141 | +The default is to store in the internal Mnesia database. |
2142 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2143 | </DD><DT CLASS="dt-description"><B><TT>{access, AccessName}</TT></B></DT><DD CLASS="dd-description"> You can specify who is allowed to use |
2144 | the Multi-User Chat service. By default everyone is allowed to use it. |
2145 | </DD><DT CLASS="dt-description"><B><TT>{access_create, AccessName}</TT></B></DT><DD CLASS="dd-description"> To configure who is |
2146 | @@ -2526,7 +2521,7 @@ |
2147 | </DD><DT CLASS="dt-description"><B><TT>{default_room_options, [ {OptionName, OptionValue}, ...]}</TT></B></DT><DD CLASS="dd-description"> |
2148 | This module option allows to define the desired default room options. |
2149 | Note that the creator of a room can modify the options of his room |
2150 | -at any time using a XMPP client with MUC capability. |
2151 | +at any time using an XMPP client with MUC capability. |
2152 | The available room options and the default values are: |
2153 | <DL CLASS="description"><DT CLASS="dt-description"> |
2154 | <B><TT>{allow_change_subj, true|false}</TT></B></DT><DD CLASS="dd-description"> Allow occupants to change the subject. |
2155 | @@ -2702,6 +2697,10 @@ |
2156 | <TT>html</TT> stores in HTML format, |
2157 | <TT>plaintext</TT> stores in plain text. |
2158 | The default value is <TT>html</TT>. |
2159 | +</DD><DT CLASS="dt-description"><B><TT>{file_permissions, {Mode, Group}}</TT></B></DT><DD CLASS="dd-description"> |
2160 | +Define the permissions that must be used when creating the log files: |
2161 | +the number of the mode, and the numeric id of the group that will own the files. |
2162 | +The default value is <TT>{644, 33}</TT>. |
2163 | </DD><DT CLASS="dt-description"><B><TT>{outdir, Path}</TT></B></DT><DD CLASS="dd-description"> |
2164 | This option sets the full path to the directory in which the HTML files should |
2165 | be stored. Make sure the <TT>ejabberd</TT> daemon user has write access on that |
2166 | @@ -2763,6 +2762,8 @@ |
2167 | {access_log, muc_log}, |
2168 | {cssfile, false}, |
2169 | {dirtype, subdirs}, |
2170 | + {dirtype, subdirs}, |
2171 | + {file_permissions, {644, 33}}, |
2172 | {outdir, "/var/www/muclogs"}, |
2173 | {timezone, local} |
2174 | ]}, |
2175 | @@ -2776,7 +2777,11 @@ |
2176 | online again. Thus it is very similar to how email works. Note that |
2177 | <TT>ejabberdctl</TT> has a command to delete expired messages |
2178 | (see section <A HREF="#ejabberdctl">4.1</A>).</P><DL CLASS="description"><DT CLASS="dt-description"> |
2179 | -<B><TT>{access_max_user_messages, AccessName}</TT></B></DT><DD CLASS="dd-description"> |
2180 | +<B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2181 | +Define the type of storage where the module will create the tables and store user information. |
2182 | +The default is to store in the internal Mnesia database. |
2183 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2184 | +</DD><DT CLASS="dt-description"><B><TT>{access_max_user_messages, AccessName}</TT></B></DT><DD CLASS="dd-description"> |
2185 | This option defines which access rule will be enforced to limit |
2186 | the maximum number of offline messages that a user can have (quota). |
2187 | When a user has too many offline messages, any new messages that he receive are discarded, |
2188 | @@ -2881,6 +2886,10 @@ |
2189 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2190 | <B><TT>{iqdisc, Discipline}</TT></B></DT><DD CLASS="dd-description"> This specifies |
2191 | the processing discipline for Blocking Communication (<TT>jabber:iq:privacy</TT>) IQ queries (see section <A HREF="#modiqdiscoption">3.3.2</A>). |
2192 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2193 | +Define the type of storage where the module will create the tables and store user information. |
2194 | +The default is to store in the internal Mnesia database. |
2195 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2196 | </DD></DL><P> <A NAME="modprivate"></A> </P><!--TOC subsection <TT>mod_private</TT>--> |
2197 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc54">3.3.16</A>  <A HREF="#modprivate"><TT>mod_private</TT></A></H3><!--SEC END --><P> <A NAME="modprivate"></A> |
2198 | </P><P>This module adds support for Private XML Storage (<A HREF="http://xmpp.org/extensions/xep-0049.html">XEP-0049</A>): |
2199 | @@ -2893,6 +2902,10 @@ |
2200 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2201 | <B><TT>{iqdisc, Discipline}</TT></B></DT><DD CLASS="dd-description"> This specifies |
2202 | the processing discipline for Private XML Storage (<TT>jabber:iq:private</TT>) IQ queries (see section <A HREF="#modiqdiscoption">3.3.2</A>). |
2203 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2204 | +Define the type of storage where the module will create the tables and store user information. |
2205 | +The default is to store in the internal Mnesia database. |
2206 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2207 | </DD></DL><P> <A NAME="modproxy"></A> </P><!--TOC subsection <TT>mod_proxy65</TT>--> |
2208 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc55">3.3.17</A>  <A HREF="#modproxy"><TT>mod_proxy65</TT></A></H3><!--SEC END --><P> <A NAME="modproxy"></A> |
2209 | </P><P>This module implements SOCKS5 Bytestreams (<A HREF="http://xmpp.org/extensions/xep-0065.html">XEP-0065</A>). |
2210 | @@ -3179,6 +3192,10 @@ |
2211 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2212 | <B><TT>{iqdisc, Discipline}</TT></B></DT><DD CLASS="dd-description"> This specifies |
2213 | the processing discipline for Roster Management (<TT>jabber:iq:roster</TT>) IQ queries (see section <A HREF="#modiqdiscoption">3.3.2</A>). |
2214 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2215 | +Define the type of storage where the module will create the tables and store user information. |
2216 | +The default is to store in the internal Mnesia database. |
2217 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2218 | </DD><DT CLASS="dt-description"><B><TT>{versioning, false|true}</TT></B></DT><DD CLASS="dd-description"> Enables |
2219 | Roster Versioning. |
2220 | This option is disabled by default. |
2221 | @@ -3237,7 +3254,13 @@ |
2222 | users from the shared roster groups. |
2223 | A shared roster group can have members from any XMPP server, |
2224 | but the presence will only be available from and to members |
2225 | -of the same virtual host where the group is created.</P><P>Shared roster groups can be edited <EM>only</EM> via the Web Admin. Each group |
2226 | +of the same virtual host where the group is created.</P><P>Options: |
2227 | +</P><DL CLASS="description"><DT CLASS="dt-description"> |
2228 | +<B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2229 | +Define the type of storage where the module will create the tables and store user information. |
2230 | +The default is to store in the internal Mnesia database. |
2231 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2232 | +</DD></DL><P>Shared roster groups can be edited <EM>only</EM> via the Web Admin. Each group |
2233 | has a unique identification and the following parameters: |
2234 | </P><DL CLASS="description"><DT CLASS="dt-description"> |
2235 | <B>Name</B></DT><DD CLASS="dd-description"> The name of the group, which will be displayed in the roster. |
2236 | @@ -3584,6 +3607,10 @@ |
2237 | |
2238 | </DD><DT CLASS="dt-description"><B><TT>{iqdisc, Discipline}</TT></B></DT><DD CLASS="dd-description"> This specifies |
2239 | the processing discipline for <TT>vcard-temp</TT> IQ queries (see section <A HREF="#modiqdiscoption">3.3.2</A>). |
2240 | +</DD><DT CLASS="dt-description"><B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2241 | +Define the type of storage where the module will create the tables and store user information. |
2242 | +The default is to store in the internal Mnesia database. |
2243 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2244 | </DD><DT CLASS="dt-description"><B><TT>{search, true|false}</TT></B></DT><DD CLASS="dd-description">This option specifies whether the search |
2245 | functionality is enabled or not |
2246 | If disabled, the option <TT>host</TT> will be ignored and the |
2247 | @@ -3599,7 +3626,7 @@ |
2248 | </DD><DT CLASS="dt-description"><B><TT>{search_all_hosts, true|false}</TT></B></DT><DD CLASS="dd-description">If this option is set |
2249 | to <TT>true</TT>, search operations will apply to all virtual hosts. Otherwise |
2250 | only the current host will be searched. The default value is <TT>true</TT>. |
2251 | -This option is available in <TT>mod_vcard</TT>, but not available in <TT>mod_vcard_odbc</TT>. |
2252 | +This option is available in <TT>mod_vcard</TT>when using Mnesia, but not when using ODBC storage. |
2253 | </DD></DL><P>Examples: |
2254 | </P><UL CLASS="itemize"><LI CLASS="li-itemize"> |
2255 | In this first situation, search results are limited to twenty items, |
2256 | @@ -3821,7 +3848,13 @@ |
2257 | and each presence sent by a client produces hash retrieval and a |
2258 | presence stanza rewrite. |
2259 | For this reason, enabling this module will introduce a computational overhead |
2260 | -in servers with clients that change frequently their presence.</P><P> <A NAME="modversion"></A> </P><!--TOC subsection <TT>mod_version</TT>--> |
2261 | +in servers with clients that change frequently their presence.</P><P>Options: |
2262 | +</P><DL CLASS="description"><DT CLASS="dt-description"> |
2263 | +<B><TT>{db_type, mnesia|odbc}</TT></B></DT><DD CLASS="dd-description"> |
2264 | +Define the type of storage where the module will create the tables and store user information. |
2265 | +The default is to store in the internal Mnesia database. |
2266 | +If <TT>odbc</TT> value is defined, make sure you have defined the database, see <A HREF="#database">3.2</A>. |
2267 | +</DD></DL><P> <A NAME="modversion"></A> </P><!--TOC subsection <TT>mod_version</TT>--> |
2268 | <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc69">3.3.31</A>  <A HREF="#modversion"><TT>mod_version</TT></A></H3><!--SEC END --><P> <A NAME="modversion"></A> |
2269 | </P><P>This module implements Software Version (<A HREF="http://xmpp.org/extensions/xep-0092.html">XEP-0092</A>). Consequently, it |
2270 | answers <TT>ejabberd</TT>’s version when queried.</P><P>Options: |
2271 | @@ -3866,7 +3899,6 @@ |
2272 | In this example there is no restriction: |
2273 | </P><PRE CLASS="verbatim">{ejabberdctl_access_commands, []}. |
2274 | </PRE><P>If account <TT>robot1@example.org</TT> is registered in <TT>ejabberd</TT> with password <TT>abcdef</TT> |
2275 | -(which MD5 is E8B501798950FC58AAD83C8C14978E), |
2276 | and <TT>ejabberd.cfg</TT> contains this setting: |
2277 | </P><PRE CLASS="verbatim">{hosts, ["example.org"]}. |
2278 | {acl, bots, {user, "robot1", "example.org"}}. |
2279 | @@ -3875,7 +3907,7 @@ |
2280 | </PRE><P>then you can do this in the shell: |
2281 | </P><PRE CLASS="verbatim">$ ejabberdctl registered_users example.org |
2282 | Error: no_auth_provided |
2283 | -$ ejabberdctl --auth robot1 example.org E8B501798950FC58AAD83C8C14978E registered_users example.org |
2284 | +$ ejabberdctl --auth robot1 example.org abcdef registered_users example.org |
2285 | robot1 |
2286 | testuser1 |
2287 | testuser2 |
2288 | @@ -4015,6 +4047,8 @@ |
2289 | from other Jabber/XMPP servers |
2290 | There exist tutorials to |
2291 | <A HREF="http://www.ejabberd.im/migrate-to-ejabberd">migrate from other software to ejabberd</A>. |
2292 | +</DD><DT CLASS="dt-description"><B><TT>export2odbc virtualhost directory</TT></B></DT><DD CLASS="dd-description"> |
2293 | +Export virtual host information from Mnesia tables to SQL files. |
2294 | </DD><DT CLASS="dt-description"><B><TT>delete_expired_messages</TT></B></DT><DD CLASS="dd-description"> This option can be used to delete old messages |
2295 | in offline storage. This might be useful when the number of offline messages |
2296 | is very high. |
2297 | @@ -4038,8 +4072,7 @@ |
2298 | and is Username, Hostname and Password of a local XMPP account |
2299 | that has permission to execute the corresponding command. |
2300 | This means that the account must be registered in the local ejabberd, |
2301 | -because the information will be verified. |
2302 | -It is possible to provide the plaintext password or its MD5 sum.</P><P>When one or several access restrictions are defined and the |
2303 | +because the information will be verified.</P><P>When one or several access restrictions are defined and the |
2304 | authentication information is provided, |
2305 | each restriction is verified until one matches completely: |
2306 | the account matches the Access rule, |
2307 | @@ -4146,7 +4179,7 @@ |
2308 | See section <A HREF="#erlangconfiguration">4.1.2</A>.</P><P> <A NAME="adhoccommands"></A> </P><!--TOC section Ad-hoc Commands--> |
2309 | <H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc78">4.4</A>  <A HREF="#adhoccommands">Ad-hoc Commands</A></H2><!--SEC END --><P> <A NAME="adhoccommands"></A> </P><P>If you enable <TT>mod_configure</TT> and <TT>mod_adhoc</TT>, |
2310 | you can perform several administrative tasks in <TT>ejabberd</TT> |
2311 | -with a XMPP client. |
2312 | +with an XMPP client. |
2313 | The client must support Ad-Hoc Commands (<A HREF="http://xmpp.org/extensions/xep-0050.html">XEP-0050</A>), |
2314 | and you must login in the XMPP server with |
2315 | an account with proper privileges.</P><P> <A NAME="changeerlangnodename"></A> </P><!--TOC section Change Computer Hostname--> |
2316 | @@ -4467,6 +4500,7 @@ |
2317 | </LI><LI CLASS="li-itemize">Badlop (<A HREF="xmpp:badlop@jabberes.org"><TT>xmpp:badlop@jabberes.org</TT></A>) |
2318 | </LI><LI CLASS="li-itemize">Evgeniy Khramtsov (<A HREF="xmpp:xram@jabber.ru"><TT>xmpp:xram@jabber.ru</TT></A>) |
2319 | </LI><LI CLASS="li-itemize">Florian Zumbiehl (<A HREF="xmpp:florz@florz.de"><TT>xmpp:florz@florz.de</TT></A>) |
2320 | +</LI><LI CLASS="li-itemize">Ludovic Bocquet (<A HREF="xmpp:lbocquet@jabber.org"><TT>xmpp:lbocquet@jabber.org</TT></A>) |
2321 | </LI><LI CLASS="li-itemize">Marcin Owsiany (<A HREF="xmpp:marcin.owsiany@gmail.com"><TT>xmpp:marcin.owsiany@gmail.com</TT></A>) |
2322 | </LI><LI CLASS="li-itemize">Michael Grigutsch (<A HREF="xmpp:migri@jabber.i-pobox.net"><TT>xmpp:migri@jabber.i-pobox.net</TT></A>) |
2323 | </LI><LI CLASS="li-itemize">Mickael Remond (<A HREF="xmpp:mremond@process-one.net"><TT>xmpp:mremond@process-one.net</TT></A>) |
2324 | @@ -4475,7 +4509,7 @@ |
2325 | </LI><LI CLASS="li-itemize">Vsevolod Pelipas (<A HREF="xmpp:vsevoload@jabber.ru"><TT>xmpp:vsevoload@jabber.ru</TT></A>) |
2326 | </LI></UL><P> <A NAME="copyright"></A> </P><!--TOC chapter Copyright Information--> |
2327 | <H1 CLASS="chapter"><!--SEC ANCHOR --><A NAME="htoc103">Appendix D</A>  <A HREF="#copyright">Copyright Information</A></H1><!--SEC END --><P> <A NAME="copyright"></A> </P><P>Ejabberd Installation and Operation Guide.<BR> |
2328 | -Copyright © 2003 — 2010 ProcessOne</P><P>This document is free software; you can redistribute it and/or |
2329 | +Copyright © 2003 — 2013 ProcessOne</P><P>This document is free software; you can redistribute it and/or |
2330 | modify it under the terms of the GNU General Public License |
2331 | as published by the Free Software Foundation; either version 2 |
2332 | of the License, or (at your option) any later version.</P><P>This document is distributed in the hope that it will be useful, |
2333 | |
2334 | === modified file 'doc/guide.tex' |
2335 | --- doc/guide.tex 2012-01-08 11:45:38 +0000 |
2336 | +++ doc/guide.tex 2014-07-10 22:50:00 +0000 |
2337 | @@ -75,24 +75,19 @@ |
2338 | \newcommand{\modhttpfileserver}{\module{mod\_http\_fileserver}} |
2339 | \newcommand{\modirc}{\module{mod\_irc}} |
2340 | \newcommand{\modlast}{\module{mod\_last}} |
2341 | -\newcommand{\modlastodbc}{\module{mod\_last\_odbc}} |
2342 | \newcommand{\modmuc}{\module{mod\_muc}} |
2343 | \newcommand{\modmuclog}{\module{mod\_muc\_log}} |
2344 | \newcommand{\modoffline}{\module{mod\_offline}} |
2345 | -\newcommand{\modofflineodbc}{\module{mod\_offline\_odbc}} |
2346 | \newcommand{\modping}{\module{mod\_ping}} |
2347 | \newcommand{\modprescounter}{\module{mod\_pres\_counter}} |
2348 | \newcommand{\modprivacy}{\module{mod\_privacy}} |
2349 | -\newcommand{\modprivacyodbc}{\module{mod\_privacy\_odbc}} |
2350 | \newcommand{\modprivate}{\module{mod\_private}} |
2351 | -\newcommand{\modprivateodbc}{\module{mod\_private\_odbc}} |
2352 | \newcommand{\modproxy}{\module{mod\_proxy65}} |
2353 | \newcommand{\modpubsub}{\module{mod\_pubsub}} |
2354 | \newcommand{\modpubsubodbc}{\module{mod\_pubsub\_odbc}} |
2355 | \newcommand{\modregister}{\module{mod\_register}} |
2356 | \newcommand{\modregisterweb}{\module{mod\_register\_web}} |
2357 | \newcommand{\modroster}{\module{mod\_roster}} |
2358 | -\newcommand{\modrosterodbc}{\module{mod\_roster\_odbc}} |
2359 | \newcommand{\modservicelog}{\module{mod\_service\_log}} |
2360 | \newcommand{\modsharedroster}{\module{mod\_shared\_roster}} |
2361 | \newcommand{\modsharedrosterldap}{\module{mod\_shared\_roster\_ldap}} |
2362 | @@ -101,7 +96,6 @@ |
2363 | \newcommand{\modtime}{\module{mod\_time}} |
2364 | \newcommand{\modvcard}{\module{mod\_vcard}} |
2365 | \newcommand{\modvcardldap}{\module{mod\_vcard\_ldap}} |
2366 | -\newcommand{\modvcardodbc}{\module{mod\_vcard\_odbc}} |
2367 | \newcommand{\modvcardxupdate}{\module{mod\_vcard\_xupdate}} |
2368 | \newcommand{\modversion}{\module{mod\_version}} |
2369 | |
2370 | @@ -123,6 +117,11 @@ |
2371 | hostname of the virtual host with the prefix `\jid{#1.}'. The keyword "@HOST@" |
2372 | is replaced at start time with the real virtual host name. |
2373 | } |
2374 | +\newcommand{\dbtype}{\titem{\{db\_type, mnesia|odbc\}} \ind{options!dbtype} |
2375 | + Define the type of storage where the module will create the tables and store user information. |
2376 | + The default is to store in the internal Mnesia database. |
2377 | + If \term{odbc} value is defined, make sure you have defined the database, see~\ref{database}. |
2378 | +} |
2379 | |
2380 | %% Title page |
2381 | \include{version} |
2382 | @@ -315,7 +314,7 @@ |
2383 | \item GNU Make |
2384 | \item GCC |
2385 | \item Libexpat 1.95 or higher |
2386 | -\item Erlang/OTP R10B-9 or higher. The recommended versions are R12B-5 and R13B04. |
2387 | +\item Erlang/OTP R10B-9 or higher. The recommended versions are R13B04 and R14B04. |
2388 | Don't use R14A or R14B because \footahref{http://www.erlang.org/cgi-bin/ezmlm-cgi/4/54598}{they have a bug}. |
2389 | \item OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption. |
2390 | \item Zlib 1.2.3 or higher, for Stream Compression support (\xepref{0138}). Optional. |
2391 | @@ -569,19 +568,19 @@ |
2392 | %TODO: how to compile database support on windows? |
2393 | |
2394 | |
2395 | -\makesection{initialadmin}{Create a XMPP Account for Administration} |
2396 | +\makesection{initialadmin}{Create an XMPP Account for Administration} |
2397 | |
2398 | -You need a XMPP account and grant him administrative privileges |
2399 | +You need an XMPP account and grant him administrative privileges |
2400 | to enter the \ejabberd{} Web Admin: |
2401 | \begin{enumerate} |
2402 | -\item Register a XMPP account on your \ejabberd{} server, for example \term{admin1@example.org}. |
2403 | - There are two ways to register a XMPP account: |
2404 | +\item Register an XMPP account on your \ejabberd{} server, for example \term{admin1@example.org}. |
2405 | + There are two ways to register an XMPP account: |
2406 | \begin{enumerate} |
2407 | \item Using \term{ejabberdctl}\ind{ejabberdctl} (see section~\ref{ejabberdctl}): |
2408 | \begin{verbatim} |
2409 | ejabberdctl register admin1 example.org FgT5bk3 |
2410 | \end{verbatim} |
2411 | - \item Using a XMPP client and In-Band Registration (see section~\ref{modregister}). |
2412 | + \item Using an XMPP client and In-Band Registration (see section~\ref{modregister}). |
2413 | \end{enumerate} |
2414 | \item Edit the \ejabberd{} configuration file to give administration rights to the XMPP account you created: |
2415 | \begin{verbatim} |
2416 | @@ -819,14 +818,14 @@ |
2417 | Interacts with an \footahref{http://www.ejabberd.im/tutorials-transports}{external component} |
2418 | (as defined in the Jabber Component Protocol (\xepref{0114}).\\ |
2419 | Options: \texttt{access}, \texttt{hosts}, \texttt{max\_fsm\_queue}, |
2420 | - \texttt{service\_check\_from}, \texttt{shaper} |
2421 | + \texttt{service\_check\_from}, \texttt{shaper\_rule} |
2422 | \titem{\texttt{ejabberd\_stun}} |
2423 | Handles STUN Binding requests as defined in |
2424 | \footahref{http://tools.ietf.org/html/rfc5389}{RFC 5389}.\\ |
2425 | Options: \texttt{certfile} |
2426 | \titem{\texttt{ejabberd\_http}} |
2427 | Handles incoming HTTP connections.\\ |
2428 | - Options: \texttt{captcha}, \texttt{certfile}, \texttt{http\_bind}, \texttt{http\_poll}, |
2429 | + Options: \texttt{captcha}, \texttt{certfile}, \texttt{default\_host}, \texttt{http\_bind}, \texttt{http\_poll}, |
2430 | \texttt{request\_handlers}, \texttt{tls}, \texttt{trusted\_proxies}, \texttt{web\_admin}\\ |
2431 | \end{description} |
2432 | |
2433 | @@ -847,6 +846,11 @@ |
2434 | Simple web page that allows a user to fill a CAPTCHA challenge (see section \ref{captcha}). |
2435 | \titem{\{certfile, Path\}} Full path to a file containing the default SSL certificate. |
2436 | To define a certificate file specific for a given domain, use the global option \term{domain\_certfile}. |
2437 | + \titem{\{default\_host, undefined|HostName\}} |
2438 | + If the HTTP request received by ejabberd contains the HTTP header \term{Host} |
2439 | + with an ambiguous virtual host that doesn't match any one defined in ejabberd (see \ref{hostnames}), |
2440 | + then this configured HostName is set as the request Host. |
2441 | + The default value of this option is: \term{undefined}. |
2442 | \titem{\{hosts, [Hostname, ...], [HostOption, ...]\}} \ind{options!hosts} |
2443 | The external Jabber component that connects to this \term{ejabberd\_service} |
2444 | can serve one or more hostnames. |
2445 | @@ -930,6 +934,9 @@ |
2446 | \titem{\{shaper, none|ShaperName\}} \ind{options!shaper}This option defines a |
2447 | shaper for the port (see section~\ref{shapers}). The default value |
2448 | is \term{none}. |
2449 | + \titem{\{shaper\_rule, none|ShaperRule\}} \ind{options!shaperrule}This option defines a |
2450 | + shaper rule for the \term{ejabberd\_service} (see section~\ref{shapers}). The recommended value |
2451 | + is \term{fast}. |
2452 | \titem{starttls} \ind{options!starttls}\ind{STARTTLS}This option |
2453 | specifies that STARTTLS encryption is available on connections to the port. |
2454 | You should also set the \option{certfile} option. |
2455 | @@ -1226,6 +1233,12 @@ |
2456 | If the client uses old Jabber Non-SASL authentication (\xepref{0078}), |
2457 | then this option is not respected, and the action performed is \term{closeold}. |
2458 | |
2459 | +The option \option{fqdn} allows you to define the Fully Qualified Domain Name |
2460 | +of the machine, in case it isn't detected automatically. |
2461 | +The FQDN is used to authenticate some clients that use the DIGEST-MD5 SASL mechanism. |
2462 | +The option syntax is: |
2463 | +\esyntax{\{fqdn, undefined|FqdnString|[FqdnString]\}.} |
2464 | + |
2465 | \makesubsubsection{internalauth}{Internal} |
2466 | \ind{internal authentication}\ind{Mnesia} |
2467 | |
2468 | @@ -1295,7 +1308,7 @@ |
2469 | the authentication information since the user last disconnected, |
2470 | to verify again the user authentication without querying again the extauth script. |
2471 | Note: caching should not be enabled in a host if internal auth is also enabled. |
2472 | - If caching is enabled, \term{mod\_last} or \term{mod\_last\_odbc} must be enabled also in that vhost. |
2473 | + If caching is enabled, \term{mod\_last} must be enabled also in that vhost. |
2474 | \end{description} |
2475 | |
2476 | This example sets external authentication, the extauth script, enables caching for 10 minutes, |
2477 | @@ -1434,7 +1447,7 @@ |
2478 | \item You may want to allow login access only for certain users. \term{pam\_listfile.so} |
2479 | module provides such functionality. |
2480 | \item If you use \term{pam\_winbind} to authorise against a Windows Active Directory, |
2481 | -then \term{/etc/nssswitch.conf} must be configured to use \term{winbind} as well. |
2482 | +then \term{/etc/nsswitch.conf} must be configured to use \term{winbind} as well. |
2483 | \end{itemize} |
2484 | |
2485 | \makesubsection{accessrules}{Access Rules} |
2486 | @@ -1664,7 +1677,7 @@ |
2487 | \begin{description} |
2488 | \titem{\{captcha\_cmd, Path\}} |
2489 | Full path to a script that generates the image. |
2490 | - The default value is an empty string: \term{""} |
2491 | + The default value disables the feature: \term{undefined} |
2492 | \titem{\{captcha\_host, ProtocolHostPort\}} |
2493 | ProtocolHostPort is a string with the host, and optionally the Protocol and Port number. |
2494 | It must identify where ejabberd listens for CAPTCHA requests. |
2495 | @@ -2011,12 +2024,10 @@ |
2496 | \ind{MySQL!storage} |
2497 | |
2498 | MySQL also can be used to store information into from several \ejabberd{} |
2499 | -modules. See section~\ref{modoverview} to see which modules have a version |
2500 | -with the `\_odbc'. This suffix indicates that the module can be used with |
2501 | +modules. See section~\ref{modoverview} to see which modules can be used with |
2502 | relational databases like MySQL. To enable storage to your database, just make |
2503 | -sure that your database is running well (see previous sections), and replace the |
2504 | -suffix-less or ldap module variant with the odbc module variant. Keep in mind |
2505 | -that you cannot have several variants of the same module loaded! |
2506 | +sure that your database is running well (see previous sections), and add the |
2507 | +module option \term{\{db\_type, odbc\}}. |
2508 | |
2509 | \makesubsection{mssql}{Microsoft SQL Server} |
2510 | \ind{Microsoft SQL Server}\ind{Microsoft SQL Server!schema} |
2511 | @@ -2068,13 +2079,10 @@ |
2512 | \ind{Microsoft SQL Server!storage} |
2513 | |
2514 | Microsoft SQL Server also can be used to store information into from several |
2515 | -\ejabberd{} modules. See section~\ref{modoverview} to see which modules have |
2516 | -a version with the `\_odbc'. This suffix indicates that the module can be used |
2517 | -with relational databases like Microsoft SQL Server. To enable storage to your |
2518 | -database, just make sure that your database is running well (see previous |
2519 | -sections), and replace the suffix-less or ldap module variant with the odbc |
2520 | -module variant. Keep in mind that you cannot have several variants of the same |
2521 | -module loaded! |
2522 | +modules. See section~\ref{modoverview} to see which modules can be used with |
2523 | +relational databases like MySQL. To enable storage to your database, just make |
2524 | +sure that your database is running well (see previous sections), and add the |
2525 | +module option \term{\{db\_type, odbc\}}. |
2526 | |
2527 | \makesubsection{pgsql}{PostgreSQL} |
2528 | \ind{PostgreSQL}\ind{PostgreSQL!schema} |
2529 | @@ -2166,12 +2174,10 @@ |
2530 | \ind{PostgreSQL!storage} |
2531 | |
2532 | PostgreSQL also can be used to store information into from several \ejabberd{} |
2533 | -modules. See section~\ref{modoverview} to see which modules have a version |
2534 | -with the `\_odbc'. This suffix indicates that the module can be used with |
2535 | -relational databases like PostgreSQL. To enable storage to your database, just |
2536 | -make sure that your database is running well (see previous sections), and |
2537 | -replace the suffix-less or ldap module variant with the odbc module variant. |
2538 | -Keep in mind that you cannot have several variants of the same module loaded! |
2539 | +modules. See section~\ref{modoverview} to see which modules can be used with |
2540 | +relational databases like MySQL. To enable storage to your database, just make |
2541 | +sure that your database is running well (see previous sections), and add the |
2542 | +module option \term{\{db\_type, odbc\}}. |
2543 | |
2544 | \makesubsection{odbc}{ODBC Compatible} |
2545 | \ind{databases!ODBC} |
2546 | @@ -2243,13 +2249,11 @@ |
2547 | \ind{ODBC!storage} |
2548 | |
2549 | An ODBC compatible database also can be used to store information into from |
2550 | -several \ejabberd{} modules. See section~\ref{modoverview} to see which |
2551 | -modules have a version with the `\_odbc'. This suffix indicates that the module |
2552 | -can be used with ODBC compatible relational databases. To enable storage to your |
2553 | -database, just make sure that your database is running well (see previous |
2554 | -sections), and replace the suffix-less or ldap module variant with the odbc |
2555 | -module variant. Keep in mind that you cannot have several variants of the same |
2556 | -module loaded! |
2557 | +several \ejabberd{} |
2558 | +modules. See section~\ref{modoverview} to see which modules can be used with |
2559 | +relational databases like MySQL. To enable storage to your database, just make |
2560 | +sure that your database is running well (see previous sections), and add the |
2561 | +module option \term{\{db\_type, odbc\}}. |
2562 | |
2563 | \makesubsection{ldap}{LDAP} |
2564 | \ind{databases!LDAP} |
2565 | @@ -2576,36 +2580,28 @@ |
2566 | \hline \ahrefloc{modhttpfileserver}{\modhttpfileserver{}} & Small HTTP file server & \\ |
2567 | \hline \ahrefloc{modirc}{\modirc{}} & IRC transport & \\ |
2568 | \hline \ahrefloc{modlast}{\modlast{}} & Last Activity (\xepref{0012}) & \\ |
2569 | - \hline \ahrefloc{modlast}{\modlastodbc{}} & Last Activity (\xepref{0012}) & supported DB (*) \\ |
2570 | \hline \ahrefloc{modmuc}{\modmuc{}} & Multi-User Chat (\xepref{0045}) & \\ |
2571 | \hline \ahrefloc{modmuclog}{\modmuclog{}} & Multi-User Chat room logging & \modmuc{} \\ |
2572 | \hline \ahrefloc{modoffline}{\modoffline{}} & Offline message storage (\xepref{0160}) & \\ |
2573 | - \hline \ahrefloc{modoffline}{\modofflineodbc{}} & Offline message storage (\xepref{0160}) & supported DB (*) \\ |
2574 | \hline \ahrefloc{modping}{\modping{}} & XMPP Ping and periodic keepalives (\xepref{0199}) & \\ |
2575 | \hline \ahrefloc{modprescounter}{\modprescounter{}} & Detect presence subscription flood & \\ |
2576 | \hline \ahrefloc{modprivacy}{\modprivacy{}} & Blocking Communication (\xepref{0016}) & \\ |
2577 | - \hline \ahrefloc{modprivacy}{\modprivacyodbc{}} & Blocking Communication (\xepref{0016}) & supported DB (*) \\ |
2578 | \hline \ahrefloc{modprivate}{\modprivate{}} & Private XML Storage (\xepref{0049}) & \\ |
2579 | - \hline \ahrefloc{modprivate}{\modprivateodbc{}} & Private XML Storage (\xepref{0049}) & supported DB (*) \\ |
2580 | \hline \ahrefloc{modproxy}{\modproxy{}} & SOCKS5 Bytestreams (\xepref{0065}) & \\ |
2581 | \hline \ahrefloc{modpubsub}{\modpubsub{}} & Pub-Sub (\xepref{0060}), PEP (\xepref{0163}) & \modcaps{} \\ |
2582 | \hline \ahrefloc{modpubsub}{\modpubsubodbc{}} & Pub-Sub (\xepref{0060}), PEP (\xepref{0163}) & supported DB (*) and \modcaps{} \\ |
2583 | \hline \ahrefloc{modregister}{\modregister{}} & In-Band Registration (\xepref{0077}) & \\ |
2584 | \hline \ahrefloc{modregisterweb}{\modregisterweb{}} & Web for Account Registrations & \\ |
2585 | \hline \ahrefloc{modroster}{\modroster{}} & Roster management (XMPP IM) & \\ |
2586 | - \hline \ahrefloc{modroster}{\modrosterodbc{}} & Roster management (XMPP IM) & supported DB (*) \\ |
2587 | \hline \ahrefloc{modservicelog}{\modservicelog{}} & Copy user messages to logger service & \\ |
2588 | - \hline \ahrefloc{modsharedroster}{\modsharedroster{}} & Shared roster management & \modroster{} or \\ |
2589 | - & & \modrosterodbc\\ |
2590 | - \hline \ahrefloc{modsharedrosterldap}{\modsharedrosterldap{}} & LDAP Shared roster management & \modroster{} or \\ |
2591 | - & & \modrosterodbc\\ |
2592 | + \hline \ahrefloc{modsharedroster}{\modsharedroster{}} & Shared roster management & \modroster{} \\ |
2593 | + \hline \ahrefloc{modsharedrosterldap}{\modsharedrosterldap{}} & LDAP Shared roster management & \modroster{} \\ |
2594 | \hline \ahrefloc{modsic}{\modsic{}} & Server IP Check (\xepref{0279}) & \\ |
2595 | \hline \ahrefloc{modstats}{\modstats{}} & Statistics Gathering (\xepref{0039}) & \\ |
2596 | \hline \ahrefloc{modtime}{\modtime{}} & Entity Time (\xepref{0202}) & \\ |
2597 | \hline \ahrefloc{modvcard}{\modvcard{}} & vcard-temp (\xepref{0054}) & \\ |
2598 | \hline \ahrefloc{modvcardldap}{\modvcardldap{}} & vcard-temp (\xepref{0054}) & LDAP server \\ |
2599 | - \hline \ahrefloc{modvcard}{\modvcardodbc{}} & vcard-temp (\xepref{0054}) & supported DB (*) \\ |
2600 | - \hline \ahrefloc{modvcardxupdate}{\modvcardxupdate{}} & vCard-Based Avatars (\xepref{0153}) & \modvcard{} or \modvcardodbc{} \\ |
2601 | + \hline \ahrefloc{modvcardxupdate}{\modvcardxupdate{}} & vCard-Based Avatars (\xepref{0153}) & \modvcard{} \\ |
2602 | \hline \ahrefloc{modversion}{\modversion{}} & Software Version (\xepref{0092}) & \\ |
2603 | \hline |
2604 | \end{tabular} |
2605 | @@ -2617,31 +2613,11 @@ |
2606 | |
2607 | You can see which database backend each module needs by looking at the suffix: |
2608 | \begin{itemize} |
2609 | -\item No suffix, this means that the modules uses Erlang's built-in database |
2610 | - Mnesia as backend. |
2611 | -\item `\_odbc', this means that the module needs a supported database |
2612 | - (see~\ref{database}) as backend. |
2613 | +\item No suffix, this means that the module uses Erlang's built-in database |
2614 | + Mnesia as backend, or a ODBC database in some cases (see~\ref{database}). |
2615 | \item `\_ldap', this means that the module needs an LDAP server as backend. |
2616 | \end{itemize} |
2617 | |
2618 | -If you want to, |
2619 | -it is possible to use a relational database to store the tables created by some ejabberd modules. |
2620 | -You can do this by changing the module name to a name with an |
2621 | -\term{\_odbc} suffix in \ejabberd{} config file. You can use a relational |
2622 | -database for the following data: |
2623 | - |
2624 | -\begin{itemize} |
2625 | -\item Last connection date and time: Use \term{mod\_last\_odbc} instead of |
2626 | - \term{mod\_last}. |
2627 | -\item Offline messages: Use \term{mod\_offline\_odbc} instead of |
2628 | - \term{mod\_offline}. |
2629 | -\item Rosters: Use \term{mod\_roster\_odbc} instead of \term{mod\_roster}. |
2630 | -\item Users' VCARD: Use \term{mod\_vcard\_odbc} instead of \term{mod\_vcard}. |
2631 | -\item Private XML storage: Use \term{mod\_private\_odbc} instead of \term{mod\_private}. |
2632 | -\item User rules for blocking communications: Use \term{mod\_privacy\_odbc} instead of \term{mod\_privacy}. |
2633 | -\item Pub-Sub nodes, items and subscriptions: Use \term{mod\_pubsub\_odbc} instead of \term{mod\_pubsub}. |
2634 | -\end{itemize} |
2635 | - |
2636 | You can find more |
2637 | \footahref{http://www.ejabberd.im/contributions}{contributed modules} on the |
2638 | \ejabberd{} website. Please remember that these contributions might not work or |
2639 | @@ -2769,6 +2745,7 @@ |
2640 | |
2641 | Options: |
2642 | \begin{description} |
2643 | +\dbtype |
2644 | \titem{\{access, AccessName\}} \ind{options!access}This option specifies who is allowed to |
2645 | send announcements and to set the message of the day (by default, nobody is |
2646 | able to send such messages). |
2647 | @@ -3099,6 +3076,7 @@ |
2648 | Options: |
2649 | \begin{description} |
2650 | \hostitem{irc} |
2651 | +\dbtype |
2652 | \titem{\{access, AccessName\}} \ind{options!access}This option can be used to specify who |
2653 | may use the IRC transport (default value: \term{all}). |
2654 | \titem{\{default\_encoding, Encoding\}} \ind{options!defaultencoding}Set the default IRC encoding. |
2655 | @@ -3149,6 +3127,7 @@ |
2656 | Options: |
2657 | \begin{description} |
2658 | \iqdiscitem{Last activity (\ns{jabber:iq:last})} |
2659 | +\dbtype |
2660 | \end{description} |
2661 | |
2662 | \makesubsection{modmuc}{\modmuc{}} |
2663 | @@ -3183,6 +3162,7 @@ |
2664 | Module options: |
2665 | \begin{description} |
2666 | \hostitem{conference} |
2667 | +\dbtype |
2668 | \titem{\{access, AccessName\}} \ind{options!access}You can specify who is allowed to use |
2669 | the Multi-User Chat service. By default everyone is allowed to use it. |
2670 | \titem{\{access\_create, AccessName\}} \ind{options!access\_create}To configure who is |
2671 | @@ -3260,7 +3240,7 @@ |
2672 | \titem{\{default\_room\_options, [ \{OptionName, OptionValue\}, ...]\}} \ind{options!default\_room\_options} |
2673 | This module option allows to define the desired default room options. |
2674 | Note that the creator of a room can modify the options of his room |
2675 | - at any time using a XMPP client with MUC capability. |
2676 | + at any time using an XMPP client with MUC capability. |
2677 | The available room options and the default values are: |
2678 | \begin{description} |
2679 | \titem{\{allow\_change\_subj, true|false\}} Allow occupants to change the subject. |
2680 | @@ -3457,6 +3437,10 @@ |
2681 | \term{html} stores in HTML format, |
2682 | \term{plaintext} stores in plain text. |
2683 | The default value is \term{html}. |
2684 | +\titem{\{file\_permissions, \{Mode, Group\}\}}\ind{options!file\_permissions} |
2685 | + Define the permissions that must be used when creating the log files: |
2686 | + the number of the mode, and the numeric id of the group that will own the files. |
2687 | + The default value is \term{\{644, 33\}}. |
2688 | \titem{\{outdir, Path\}}\ind{options!outdir} |
2689 | This option sets the full path to the directory in which the HTML files should |
2690 | be stored. Make sure the \ejabberd{} daemon user has write access on that |
2691 | @@ -3523,6 +3507,8 @@ |
2692 | {access_log, muc_log}, |
2693 | {cssfile, false}, |
2694 | {dirtype, subdirs}, |
2695 | + {dirtype, subdirs}, |
2696 | + {file_permissions, {644, 33}}, |
2697 | {outdir, "/var/www/muclogs"}, |
2698 | {timezone, local} |
2699 | ]}, |
2700 | @@ -3542,6 +3528,7 @@ |
2701 | (see section~\ref{ejabberdctl}). |
2702 | |
2703 | \begin{description} |
2704 | + \dbtype |
2705 | \titem{\{access\_max\_user\_messages, AccessName\}}\ind{options!access\_max\_user\_messages} |
2706 | This option defines which access rule will be enforced to limit |
2707 | the maximum number of offline messages that a user can have (quota). |
2708 | @@ -3672,6 +3659,7 @@ |
2709 | Options: |
2710 | \begin{description} |
2711 | \iqdiscitem{Blocking Communication (\ns{jabber:iq:privacy})} |
2712 | +\dbtype |
2713 | \end{description} |
2714 | |
2715 | \makesubsection{modprivate}{\modprivate{}} |
2716 | @@ -3688,6 +3676,7 @@ |
2717 | Options: |
2718 | \begin{description} |
2719 | \iqdiscitem{Private XML Storage (\ns{jabber:iq:private})} |
2720 | +\dbtype |
2721 | \end{description} |
2722 | |
2723 | \makesubsection{modproxy}{\modproxy{}} |
2724 | @@ -4028,6 +4017,7 @@ |
2725 | Options: |
2726 | \begin{description} |
2727 | \iqdiscitem{Roster Management (\ns{jabber:iq:roster})} |
2728 | +\dbtype |
2729 | \titem{\{versioning, false|true\}} \ind{options!versioning}Enables |
2730 | Roster Versioning. |
2731 | This option is disabled by default. |
2732 | @@ -4105,6 +4095,11 @@ |
2733 | but the presence will only be available from and to members |
2734 | of the same virtual host where the group is created. |
2735 | |
2736 | +Options: |
2737 | +\begin{description} |
2738 | +\dbtype |
2739 | +\end{description} |
2740 | + |
2741 | Shared roster groups can be edited \emph{only} via the Web Admin. Each group |
2742 | has a unique identification and the following parameters: |
2743 | \begin{description} |
2744 | @@ -4623,6 +4618,7 @@ |
2745 | \begin{description} |
2746 | \hostitem{vjud} |
2747 | \iqdiscitem{\ns{vcard-temp}} |
2748 | +\dbtype |
2749 | \titem{\{search, true|false\}}\ind{options!search}This option specifies whether the search |
2750 | functionality is enabled or not |
2751 | If disabled, the option \term{host} will be ignored and the |
2752 | @@ -4638,7 +4634,7 @@ |
2753 | \titem{\{search\_all\_hosts, true|false\}}\ind{options!search\_all\_hosts}If this option is set |
2754 | to \term{true}, search operations will apply to all virtual hosts. Otherwise |
2755 | only the current host will be searched. The default value is \term{true}. |
2756 | - This option is available in \modvcard, but not available in \modvcardodbc. |
2757 | + This option is available in \modvcard when using Mnesia, but not when using ODBC storage. |
2758 | \end{description} |
2759 | |
2760 | Examples: |
2761 | @@ -4911,6 +4907,11 @@ |
2762 | For this reason, enabling this module will introduce a computational overhead |
2763 | in servers with clients that change frequently their presence. |
2764 | |
2765 | +Options: |
2766 | +\begin{description} |
2767 | +\dbtype |
2768 | +\end{description} |
2769 | + |
2770 | \makesubsection{modversion}{\modversion{}} |
2771 | \ind{modules!\modversion{}}\ind{protocols!XEP-0092: Software Version} |
2772 | |
2773 | @@ -4979,7 +4980,6 @@ |
2774 | \end{verbatim} |
2775 | |
2776 | If account \term{robot1@example.org} is registered in \ejabberd{} with password \term{abcdef} |
2777 | -(which MD5 is E8B501798950FC58AAD83C8C14978E), |
2778 | and \term{ejabberd.cfg} contains this setting: |
2779 | \begin{verbatim} |
2780 | {hosts, ["example.org"]}. |
2781 | @@ -4991,7 +4991,7 @@ |
2782 | \begin{verbatim} |
2783 | $ ejabberdctl registered_users example.org |
2784 | Error: no_auth_provided |
2785 | -$ ejabberdctl --auth robot1 example.org E8B501798950FC58AAD83C8C14978E registered_users example.org |
2786 | +$ ejabberdctl --auth robot1 example.org abcdef registered_users example.org |
2787 | robot1 |
2788 | testuser1 |
2789 | testuser2 |
2790 | @@ -5154,6 +5154,8 @@ |
2791 | from other Jabber/XMPP servers |
2792 | There exist tutorials to |
2793 | \footahref{http://www.ejabberd.im/migrate-to-ejabberd}{migrate from other software to ejabberd}. |
2794 | +\titem{export2odbc virtualhost directory} \ind{export mnesia data to SQL files} |
2795 | + Export virtual host information from Mnesia tables to SQL files. |
2796 | \titem{delete\_expired\_messages} This option can be used to delete old messages |
2797 | in offline storage. This might be useful when the number of offline messages |
2798 | is very high. |
2799 | @@ -5184,7 +5186,6 @@ |
2800 | that has permission to execute the corresponding command. |
2801 | This means that the account must be registered in the local ejabberd, |
2802 | because the information will be verified. |
2803 | -It is possible to provide the plaintext password or its MD5 sum. |
2804 | |
2805 | When one or several access restrictions are defined and the |
2806 | authentication information is provided, |
2807 | @@ -5320,7 +5321,7 @@ |
2808 | |
2809 | If you enable \modconfigure\ and \modadhoc, |
2810 | you can perform several administrative tasks in \ejabberd{} |
2811 | -with a XMPP client. |
2812 | +with an XMPP client. |
2813 | The client must support Ad-Hoc Commands (\xepref{0050}), |
2814 | and you must login in the XMPP server with |
2815 | an account with proper privileges. |
2816 | @@ -5873,6 +5874,7 @@ |
2817 | \item Badlop (\ahrefurl{xmpp:badlop@jabberes.org}) |
2818 | \item Evgeniy Khramtsov (\ahrefurl{xmpp:xram@jabber.ru}) |
2819 | \item Florian Zumbiehl (\ahrefurl{xmpp:florz@florz.de}) |
2820 | +\item Ludovic Bocquet (\ahrefurl{xmpp:lbocquet@jabber.org}) |
2821 | \item Marcin Owsiany (\ahrefurl{xmpp:marcin.owsiany@gmail.com}) |
2822 | \item Michael Grigutsch (\ahrefurl{xmpp:migri@jabber.i-pobox.net}) |
2823 | \item Mickael Remond (\ahrefurl{xmpp:mremond@process-one.net}) |
2824 | @@ -5885,7 +5887,7 @@ |
2825 | \makechapter{copyright}{Copyright Information} |
2826 | |
2827 | Ejabberd Installation and Operation Guide.\\ |
2828 | -Copyright \copyright{} 2003 --- 2010 ProcessOne |
2829 | +Copyright \copyright{} 2003 --- 2013 ProcessOne |
2830 | |
2831 | This document is free software; you can redistribute it and/or |
2832 | modify it under the terms of the GNU General Public License |
2833 | |
2834 | === added file 'doc/release_notes_2.1.11.txt' |
2835 | --- doc/release_notes_2.1.11.txt 1970-01-01 00:00:00 +0000 |
2836 | +++ doc/release_notes_2.1.11.txt 2014-07-10 22:50:00 +0000 |
2837 | @@ -0,0 +1,58 @@ |
2838 | + |
2839 | + Release Notes |
2840 | + ejabberd 2.1.11 |
2841 | + |
2842 | + ejabberd 2.1.11 includes a few bugfixes and improvements. |
2843 | + |
2844 | + Read more details about the changes in: |
2845 | + http://redir.process-one.net/ejabberd-2.1.11 |
2846 | + |
2847 | + Download the source code and installers from: |
2848 | + http://www.process-one.net/en/ejabberd/ |
2849 | + |
2850 | + |
2851 | + The major changes are: |
2852 | + |
2853 | +* HTTP service |
2854 | +- Fix ejabberd_http:get_line |
2855 | +- Don't use binary:match to extract lines from binaries |
2856 | +- Parse and encode https header names like native http parser does |
2857 | +- Parse correctly https request split into multiple packets |
2858 | +- Properly handle HEAD request in mod_http_bind (EJAB-1538) |
2859 | +- New option default_host for handling requests with ambiguous Host (EJAB-1261) |
2860 | + |
2861 | +* ODBC |
2862 | +- New ODBC support for mod_announce |
2863 | +- New ODBC support for mod_blocking |
2864 | +- New ODBC support for mod_irc |
2865 | +- New ODBC support for mod_muc |
2866 | +- New ODBC support for mod_shared_roster |
2867 | +- New ODBC support for mod_vcard_xupdate |
2868 | +- Add ODBC exporting function for privacy table |
2869 | +- Work also with some unicode strings in PgSQL (EJAB-1490) |
2870 | +- Replace a single quote with double quotes in an ODBC escape |
2871 | + |
2872 | +* SSL |
2873 | +- Make sure that res is initialized in all cases |
2874 | +- Parse correctly https request split into multiple packets (EJAB-1537) |
2875 | +- Added missed tls:recv_data/2 |
2876 | +- Don't ignore Length parameter in tls:recv |
2877 | +- Avoid quadratic behavior in reading SSL data |
2878 | +- Dix http_bind webserver TLS fail on Chrome (EJAB-1530) |
2879 | + |
2880 | +* Miscelanea |
2881 | +- Assume we have only one CPU when an auto-detection fails (EJAB-1516) |
2882 | +- Auth: Relax digest-uri handling (EJAB-1529) |
2883 | +- Caps: Cache caps timestamp before the IQ-request is done |
2884 | +- IRC: Use of MUC password |
2885 | +- Private: misc errors cases fixes |
2886 | +- Pubsub: return user affiliation for a specified node (EJAB-1294) |
2887 | +- Shared Roster: Foreign items were not pushed (EJAB-1509) |
2888 | +- Shared Roster LDAP: user substitution in ldap_rfilter (EJAB-1555) |
2889 | +- Windows: Fix makefile rules for building DLLs |
2890 | + |
2891 | + |
2892 | + Bug reports |
2893 | + |
2894 | + You can officially report bugs on ProcessOne support site: |
2895 | + http://support.process-one.net/ |
2896 | |
2897 | === added file 'doc/release_notes_2.1.12.txt' |
2898 | --- doc/release_notes_2.1.12.txt 1970-01-01 00:00:00 +0000 |
2899 | +++ doc/release_notes_2.1.12.txt 2014-07-10 22:50:00 +0000 |
2900 | @@ -0,0 +1,67 @@ |
2901 | + |
2902 | + Release Notes |
2903 | + ejabberd 2.1.12 |
2904 | + |
2905 | + ejabberd 2.1.12 includes a many bugfixes and a few improvements. |
2906 | + |
2907 | + Read more details about the changes in: |
2908 | + http://redir.process-one.net/ejabberd-2.1.12 |
2909 | + |
2910 | + Download the source code and installers from: |
2911 | + http://www.process-one.net/en/ejabberd/ |
2912 | + |
2913 | + |
2914 | + The changes are: |
2915 | + |
2916 | +* Core ejabberd |
2917 | +- Make terms serialization faster |
2918 | +- Reduce size of XML stream state |
2919 | + |
2920 | +* Administration |
2921 | +- Add SCRAM and remove MD5 support to ejabberd commands auth verification |
2922 | +- Added command to list all the vhosts registered in an ejabberd node |
2923 | +- Added export2odbc command, copied from mod_admin_extra.erl |
2924 | +- Fix ejabberdctl number of arguments error report with R15 |
2925 | +- Check node name is available before starting ejabberd (EJAB-1572) |
2926 | +- Fix ejabberd_xmlrpc commands authentication with SCRAM |
2927 | +- Fix mod_offline:store_offline_msg argument (EJAB-1581) |
2928 | +- Log IP address when auth attempt fails |
2929 | +- Make sure update_info returns atoms only (EJAB-1595) |
2930 | +- On shutdown, first stop listeners, then modules |
2931 | + |
2932 | +* Encryption |
2933 | +- Detect OpenSSL version at runtime, not at compile time |
2934 | +- Fixed signedness issue in tls_drv GET_DESCRYPTED_INPUT (EJAB-1591) |
2935 | +- Enable DHE key exchange in TLS driver |
2936 | +- Enable ECDHE key exchange in TSL driver |
2937 | +- Disable old and unsecure ciphers in TLS driver |
2938 | +- Disable SSL 2.0 in TLS driver |
2939 | + |
2940 | +* HTTP-Bind |
2941 | +- Do not trigger item-not-found errors in mod_http_bind |
2942 | +- Repeated http-bind request should abort only requests with same rid |
2943 | +- Receiving missing request shouldn't close waiting out-ouf-order request |
2944 | + |
2945 | +* XMPP |
2946 | +- Allow multiple fqdn values in configuration (EJAB-1578) |
2947 | +- Fix get_subscription_lists/4 |
2948 | +- Fix account registration |
2949 | +- Send announce Message stanzas as Headline type instead of Normal |
2950 | + |
2951 | +* Other |
2952 | +- Guide: Fix file name of Name Service Switch |
2953 | +- Guide: Document the db_type modules option (EJAB-1560) |
2954 | +- LDAP: Fix broken JPEG photo (EJAB-1526) |
2955 | +- LDAP: Fix compatibility with Erlang R16A (EJAB-1612) |
2956 | +- MUC: Fix angle brackets handle in plaintext log (EJAB-1610) |
2957 | +- MUC: Fix MUC start when Mnesia tables don't exist yet |
2958 | +- MUC: New mod_muc_log option file_permissions (EJAB-1588) |
2959 | +- ODBC: Merge SQL and Mnesia code into one module (EJAB-1560) |
2960 | +- Translation: New Hebrew |
2961 | +- Translation: Update Slovak |
2962 | + |
2963 | + |
2964 | + Bug reports |
2965 | + |
2966 | + You can officially report bugs on ProcessOne support site: |
2967 | + http://support.process-one.net/ |
2968 | |
2969 | === added file 'doc/release_notes_2.1.13.txt' |
2970 | --- doc/release_notes_2.1.13.txt 1970-01-01 00:00:00 +0000 |
2971 | +++ doc/release_notes_2.1.13.txt 2014-07-10 22:50:00 +0000 |
2972 | @@ -0,0 +1,29 @@ |
2973 | + |
2974 | + Release Notes |
2975 | + ejabberd 2.1.12 |
2976 | + |
2977 | + ejabberd 2.1.13 includes just a few bugfixes. |
2978 | + |
2979 | + Read more details about the changes in: |
2980 | + http://redir.process-one.net/ejabberd-2.1.13 |
2981 | + |
2982 | + Download the source code and installers from: |
2983 | + http://www.process-one.net/en/ejabberd/ |
2984 | + |
2985 | + |
2986 | + The changes are: |
2987 | + |
2988 | +- Compilation: Detect correctly newer Darwin versions (EJAB-1594) |
2989 | +- Guide: ejabberd_service expects a shaper_rule, not a shaper |
2990 | +- MUC: Handle multiple < and > in mod_muc_log plaintext mode (EJAB-1640) |
2991 | +- MUC: Handle ~ control sequence in text of mod_muc_log (EJAB-1639) |
2992 | +- MUC: list_to_integer/2 only works in OTP R14 and newer |
2993 | +- Pubsub: access_createnode acl also applies to auto created nodes |
2994 | +- Web: Normalize HTTP path |
2995 | +- WebAdmin: Fix bug when displaying offline messages in WebAdmin |
2996 | + |
2997 | + |
2998 | + Bug reports |
2999 | + |
3000 | + You can officially report bugs on ProcessOne support site: |
3001 | + http://support.process-one.net/ |
3002 | |
3003 | === modified file 'doc/version.tex' |
3004 | --- doc/version.tex 2012-01-08 11:45:38 +0000 |
3005 | +++ doc/version.tex 2014-07-10 22:50:00 +0000 |
3006 | @@ -1,2 +1,2 @@ |
3007 | % ejabberd version (automatically generated). |
3008 | -\newcommand{\version}{2.1.10} |
3009 | +\newcommand{\version}{2.1.13} |
3010 | |
3011 | === modified file 'src/Makefile.win32' |
3012 | --- src/Makefile.win32 2009-12-04 18:22:49 +0000 |
3013 | +++ src/Makefile.win32 2014-07-10 22:50:00 +0000 |
3014 | @@ -170,7 +170,7 @@ |
3015 | LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(EXPAT_LIB)" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib |
3016 | |
3017 | $(DLL) : $(OBJECT) |
3018 | - $(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT) |
3019 | + $(LD) $(LD_FLAGS) -out:$@ $< |
3020 | |
3021 | $(OBJECT) : $(SOURCE) |
3022 | - $(CC) $(CC_FLAGS) -c -Fo$(OBJECT) $(SOURCE) |
3023 | + $(CC) $(CC_FLAGS) -c -Fo$@ $< |
3024 | |
3025 | === modified file 'src/acl.erl' |
3026 | --- src/acl.erl 2012-01-08 11:45:38 +0000 |
3027 | +++ src/acl.erl 2014-07-10 22:50:00 +0000 |
3028 | @@ -5,7 +5,7 @@ |
3029 | %%% Created : 18 Jan 2003 by Alexey Shchepin <alexey@process-one.net> |
3030 | %%% |
3031 | %%% |
3032 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3033 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3034 | %%% |
3035 | %%% This program is free software; you can redistribute it and/or |
3036 | %%% modify it under the terms of the GNU General Public License as |
3037 | @@ -181,9 +181,11 @@ |
3038 | lists:member(Server, ?MYHOSTS))) |
3039 | andalso is_regexp_match(User, UR); |
3040 | {shared_group, G} -> |
3041 | - mod_shared_roster:is_user_in_group({User, Server}, G, Host); |
3042 | + Mod = loaded_shared_roster_module(Host), |
3043 | + Mod:is_user_in_group({User, Server}, G, Host); |
3044 | {shared_group, G, H} -> |
3045 | - mod_shared_roster:is_user_in_group({User, Server}, G, H); |
3046 | + Mod = loaded_shared_roster_module(H), |
3047 | + Mod:is_user_in_group({User, Server}, G, H); |
3048 | {user_regexp, UR, S} -> |
3049 | (S == Server) andalso |
3050 | is_regexp_match(User, UR); |
3051 | @@ -238,4 +240,10 @@ |
3052 | is_glob_match(String, Glob) -> |
3053 | is_regexp_match(String, ejabberd_regexp:sh_to_awk(Glob)). |
3054 | |
3055 | - |
3056 | +loaded_shared_roster_module(Host) -> |
3057 | + case gen_mod:is_loaded(Host, mod_shared_roster_ldap) of |
3058 | + true -> |
3059 | + mod_shared_roster_ldap; |
3060 | + false -> |
3061 | + mod_shared_roster |
3062 | + end. |
3063 | |
3064 | === modified file 'src/adhoc.erl' |
3065 | --- src/adhoc.erl 2011-09-11 16:16:55 +0000 |
3066 | +++ src/adhoc.erl 2014-07-10 22:50:00 +0000 |
3067 | @@ -5,7 +5,7 @@ |
3068 | %%% Created : 31 Oct 2005 by Magnus Henoch <henoch@dtek.chalmers.se> |
3069 | %%% |
3070 | %%% |
3071 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3072 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3073 | %%% |
3074 | %%% This program is free software; you can redistribute it and/or |
3075 | %%% modify it under the terms of the GNU General Public License as |
3076 | |
3077 | === modified file 'src/adhoc.hrl' |
3078 | --- src/adhoc.hrl 2011-09-11 16:16:55 +0000 |
3079 | +++ src/adhoc.hrl 2014-07-10 22:50:00 +0000 |
3080 | @@ -1,6 +1,6 @@ |
3081 | %%%---------------------------------------------------------------------- |
3082 | %%% |
3083 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3084 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3085 | %%% |
3086 | %%% This program is free software; you can redistribute it and/or |
3087 | %%% modify it under the terms of the GNU General Public License as |
3088 | |
3089 | === modified file 'src/cache_tab.erl' |
3090 | --- src/cache_tab.erl 2011-09-11 16:16:55 +0000 |
3091 | +++ src/cache_tab.erl 2014-07-10 22:50:00 +0000 |
3092 | @@ -6,7 +6,7 @@ |
3093 | %%% Created : 29 Aug 2010 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
3094 | %%% |
3095 | %%% |
3096 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3097 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3098 | %%% |
3099 | %%% This program is free software; you can redistribute it and/or |
3100 | %%% modify it under the terms of the GNU General Public License as |
3101 | @@ -380,7 +380,12 @@ |
3102 | shrink_size = ShrinkSize}. |
3103 | |
3104 | get_proc_num() -> |
3105 | - erlang:system_info(logical_processors). |
3106 | + case erlang:system_info(logical_processors) of |
3107 | + unknown -> |
3108 | + 1; |
3109 | + Num -> |
3110 | + Num |
3111 | + end. |
3112 | |
3113 | get_proc_by_hash(Tab, Term) -> |
3114 | N = erlang:phash2(Term, get_proc_num()) + 1, |
3115 | |
3116 | === modified file 'src/cache_tab_sup.erl' |
3117 | --- src/cache_tab_sup.erl 2011-09-11 16:16:55 +0000 |
3118 | +++ src/cache_tab_sup.erl 2014-07-10 22:50:00 +0000 |
3119 | @@ -6,7 +6,7 @@ |
3120 | %%% Created : 30 Aug 2010 by Evgeniy Khramtsov <ekhramtsov@process-one.net> |
3121 | %%% |
3122 | %%% |
3123 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3124 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3125 | %%% |
3126 | %%% This program is free software; you can redistribute it and/or |
3127 | %%% modify it under the terms of the GNU General Public License as |
3128 | |
3129 | === modified file 'src/configure' |
3130 | --- src/configure 2012-01-08 11:45:38 +0000 |
3131 | +++ src/configure 2014-07-10 22:50:00 +0000 |
3132 | @@ -1,6 +1,6 @@ |
3133 | #! /bin/sh |
3134 | # Guess values for system-dependent variables and create Makefiles. |
3135 | -# Generated by GNU Autoconf 2.68 for ejabberd 2.1.10. |
3136 | +# Generated by GNU Autoconf 2.68 for ejabberd 2.1.12. |
3137 | # |
3138 | # Report bugs to <ejabberd@process-one.net>. |
3139 | # |
3140 | @@ -560,8 +560,8 @@ |
3141 | # Identity of this package. |
3142 | PACKAGE_NAME='ejabberd' |
3143 | PACKAGE_TARNAME='ejabberd' |
3144 | -PACKAGE_VERSION='2.1.10' |
3145 | -PACKAGE_STRING='ejabberd 2.1.10' |
3146 | +PACKAGE_VERSION='2.1.12' |
3147 | +PACKAGE_STRING='ejabberd 2.1.12' |
3148 | PACKAGE_BUGREPORT='ejabberd@process-one.net' |
3149 | PACKAGE_URL='' |
3150 | |
3151 | @@ -1288,7 +1288,7 @@ |
3152 | # Omit some internal or obsolete options to make the list less imposing. |
3153 | # This message is too long to be a string in the A/UX 3.1 sh. |
3154 | cat <<_ACEOF |
3155 | -\`configure' configures ejabberd 2.1.10 to adapt to many kinds of systems. |
3156 | +\`configure' configures ejabberd 2.1.12 to adapt to many kinds of systems. |
3157 | |
3158 | Usage: $0 [OPTION]... [VAR=VALUE]... |
3159 | |
3160 | @@ -1354,7 +1354,7 @@ |
3161 | |
3162 | if test -n "$ac_init_help"; then |
3163 | case $ac_init_help in |
3164 | - short | recursive ) echo "Configuration of ejabberd 2.1.10:";; |
3165 | + short | recursive ) echo "Configuration of ejabberd 2.1.12:";; |
3166 | esac |
3167 | cat <<\_ACEOF |
3168 | |
3169 | @@ -1479,7 +1479,7 @@ |
3170 | test -n "$ac_init_help" && exit $ac_status |
3171 | if $ac_init_version; then |
3172 | cat <<\_ACEOF |
3173 | -ejabberd configure 2.1.10 |
3174 | +ejabberd configure 2.1.12 |
3175 | generated by GNU Autoconf 2.68 |
3176 | |
3177 | Copyright (C) 2010 Free Software Foundation, Inc. |
3178 | @@ -1823,7 +1823,7 @@ |
3179 | This file contains any messages produced by compilers while |
3180 | running configure, to aid debugging if configure makes a mistake. |
3181 | |
3182 | -It was created by ejabberd $as_me 2.1.10, which was |
3183 | +It was created by ejabberd $as_me 2.1.12, which was |
3184 | generated by GNU Autoconf 2.68. Invocation command line was |
3185 | |
3186 | $ $0 $@ |
3187 | @@ -4984,8 +4984,8 @@ |
3188 | |
3189 | |
3190 | case "$target_os" in |
3191 | - *darwin10*) |
3192 | - echo "Target OS is 'Darwin10'" |
3193 | + *darwin*) |
3194 | + echo "Target OS is 'Darwin'" |
3195 | ac_ext=erl |
3196 | ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5' |
3197 | ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5 && echo "#!/bin/sh" > conftest$ac_exeext && $as_echo "\"$ERL\" -run conftest start -run init stop -noshell" >> conftest$ac_exeext && chmod +x conftest$ac_exeext' |
3198 | @@ -5690,7 +5690,7 @@ |
3199 | # report actual input values of CONFIG_FILES etc. instead of their |
3200 | # values after options handling. |
3201 | ac_log=" |
3202 | -This file was extended by ejabberd $as_me 2.1.10, which was |
3203 | +This file was extended by ejabberd $as_me 2.1.12, which was |
3204 | generated by GNU Autoconf 2.68. Invocation command line was |
3205 | |
3206 | CONFIG_FILES = $CONFIG_FILES |
3207 | @@ -5743,7 +5743,7 @@ |
3208 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
3209 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
3210 | ac_cs_version="\\ |
3211 | -ejabberd config.status 2.1.10 |
3212 | +ejabberd config.status 2.1.12 |
3213 | configured by $0, generated by GNU Autoconf 2.68, |
3214 | with options \\"\$ac_cs_config\\" |
3215 | |
3216 | |
3217 | === modified file 'src/configure.ac' |
3218 | --- src/configure.ac 2010-12-14 17:45:08 +0000 |
3219 | +++ src/configure.ac 2014-07-10 22:50:00 +0000 |
3220 | @@ -157,8 +157,8 @@ |
3221 | |
3222 | |
3223 | case "$target_os" in |
3224 | - *darwin10*) |
3225 | - echo "Target OS is 'Darwin10'" |
3226 | + *darwin*) |
3227 | + echo "Target OS is 'Darwin'" |
3228 | AC_LANG(Erlang) |
3229 | AC_RUN_IFELSE( |
3230 | [AC_LANG_PROGRAM([],[dnl |
3231 | |
3232 | === modified file 'src/configure.erl' |
3233 | --- src/configure.erl 2011-09-11 16:16:55 +0000 |
3234 | +++ src/configure.erl 2014-07-10 22:50:00 +0000 |
3235 | @@ -5,7 +5,7 @@ |
3236 | %%% Created : 27 Jan 2003 by Alexey Shchepin <alexey@process-one.net> |
3237 | %%% |
3238 | %%% |
3239 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3240 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3241 | %%% |
3242 | %%% This program is free software; you can redistribute it and/or |
3243 | %%% modify it under the terms of the GNU General Public License as |
3244 | |
3245 | === modified file 'src/cyrsasl.erl' |
3246 | --- src/cyrsasl.erl 2011-10-03 20:27:12 +0000 |
3247 | +++ src/cyrsasl.erl 2014-07-10 22:50:00 +0000 |
3248 | @@ -5,7 +5,7 @@ |
3249 | %%% Created : 8 Mar 2003 by Alexey Shchepin <alexey@process-one.net> |
3250 | %%% |
3251 | %%% |
3252 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3253 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3254 | %%% |
3255 | %%% This program is free software; you can redistribute it and/or |
3256 | %%% modify it under the terms of the GNU General Public License as |
3257 | |
3258 | === modified file 'src/cyrsasl_anonymous.erl' |
3259 | --- src/cyrsasl_anonymous.erl 2011-10-03 20:27:12 +0000 |
3260 | +++ src/cyrsasl_anonymous.erl 2014-07-10 22:50:00 +0000 |
3261 | @@ -6,7 +6,7 @@ |
3262 | %%% Created : 23 Aug 2005 by Magnus Henoch <henoch@dtek.chalmers.se> |
3263 | %%% |
3264 | %%% |
3265 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3266 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3267 | %%% |
3268 | %%% This program is free software; you can redistribute it and/or |
3269 | %%% modify it under the terms of the GNU General Public License as |
3270 | |
3271 | === modified file 'src/cyrsasl_digest.erl' |
3272 | --- src/cyrsasl_digest.erl 2011-10-03 20:27:12 +0000 |
3273 | +++ src/cyrsasl_digest.erl 2014-07-10 22:50:00 +0000 |
3274 | @@ -5,7 +5,7 @@ |
3275 | %%% Created : 11 Mar 2003 by Alexey Shchepin <alexey@sevcom.net> |
3276 | %%% |
3277 | %%% |
3278 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3279 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3280 | %%% |
3281 | %%% This program is free software; you can redistribute it and/or |
3282 | %%% modify it under the terms of the GNU General Public License as |
3283 | @@ -37,9 +37,11 @@ |
3284 | -behaviour(cyrsasl). |
3285 | |
3286 | -record(state, {step, nonce, username, authzid, get_password, check_password, auth_module, |
3287 | - host}). |
3288 | + host, hostfqdn}). |
3289 | |
3290 | start(_Opts) -> |
3291 | + Fqdn = get_local_fqdn(), |
3292 | + ?INFO_MSG("FQDN used to check DIGEST-MD5 SASL authentication: ~p", [Fqdn]), |
3293 | cyrsasl:register_mechanism("DIGEST-MD5", ?MODULE, digest). |
3294 | |
3295 | stop() -> |
3296 | @@ -49,6 +51,7 @@ |
3297 | {ok, #state{step = 1, |
3298 | nonce = randoms:get_string(), |
3299 | host = Host, |
3300 | + hostfqdn = get_local_fqdn(), |
3301 | get_password = GetPassword, |
3302 | check_password = CheckPasswordDigest}}. |
3303 | |
3304 | @@ -64,10 +67,11 @@ |
3305 | KeyVals -> |
3306 | DigestURI = xml:get_attr_s("digest-uri", KeyVals), |
3307 | UserName = xml:get_attr_s("username", KeyVals), |
3308 | - case is_digesturi_valid(DigestURI, State#state.host) of |
3309 | + case is_digesturi_valid(DigestURI, State#state.host, State#state.hostfqdn) of |
3310 | false -> |
3311 | ?DEBUG("User login not authorized because digest-uri " |
3312 | - "seems invalid: ~p", [DigestURI]), |
3313 | + "seems invalid: ~p (checking for Host ~p, FQDN ~p)", [DigestURI, |
3314 | + State#state.host, State#state.hostfqdn]), |
3315 | {error, "not-authorized", UserName}; |
3316 | true -> |
3317 | AuthzId = xml:get_attr_s("authzid", KeyVals), |
3318 | @@ -154,21 +158,46 @@ |
3319 | %% however ejabberd doesn't allow that. |
3320 | %% If the service (for example jabber.example.org) |
3321 | %% is provided by several hosts (being one of them server3.example.org), |
3322 | -%% then digest-uri can be like xmpp/server3.example.org/jabber.example.org |
3323 | -%% In that case, ejabberd only checks the service name, not the host. |
3324 | -is_digesturi_valid(DigestURICase, JabberHost) -> |
3325 | +%% then acceptable digest-uris would be: |
3326 | +%% xmpp/server3.example.org/jabber.example.org, xmpp/server3.example.org and |
3327 | +%% xmpp/jabber.example.org |
3328 | +%% The last version is not actually allowed by the RFC, but implemented by popular clients |
3329 | +is_digesturi_valid(DigestURICase, JabberDomain, JabberFQDN) -> |
3330 | DigestURI = stringprep:tolower(DigestURICase), |
3331 | case catch string:tokens(DigestURI, "/") of |
3332 | - ["xmpp", Host] when Host == JabberHost -> |
3333 | - true; |
3334 | - ["xmpp", _Host, ServName] when ServName == JabberHost -> |
3335 | - true; |
3336 | + ["xmpp", Host] -> |
3337 | + IsHostFqdn = is_host_fqdn(Host, JabberFQDN), |
3338 | + (Host == JabberDomain) or IsHostFqdn; |
3339 | + ["xmpp", Host, ServName] -> |
3340 | + IsHostFqdn = is_host_fqdn(Host, JabberFQDN), |
3341 | + (ServName == JabberDomain) and IsHostFqdn; |
3342 | _ -> |
3343 | false |
3344 | end. |
3345 | |
3346 | - |
3347 | - |
3348 | +is_host_fqdn(Host, [Letter | _Tail] = Fqdn) when not is_list(Letter) -> |
3349 | + Host == Fqdn; |
3350 | +is_host_fqdn(_Host, []) -> |
3351 | + false; |
3352 | +is_host_fqdn(Host, [Fqdn | _FqdnTail]) when Host == Fqdn -> |
3353 | + true; |
3354 | +is_host_fqdn(Host, [Fqdn | FqdnTail]) when Host /= Fqdn -> |
3355 | + is_host_fqdn(Host, FqdnTail). |
3356 | + |
3357 | +get_local_fqdn() -> |
3358 | + case (catch get_local_fqdn2()) of |
3359 | + Str when is_list(Str) -> Str; |
3360 | + _ -> "unknown-fqdn, please configure fqdn option in ejabberd.cfg!" |
3361 | + end. |
3362 | +get_local_fqdn2() -> |
3363 | + case ejabberd_config:get_local_option(fqdn) of |
3364 | + ConfiguredFqdn when is_list(ConfiguredFqdn) -> |
3365 | + ConfiguredFqdn; |
3366 | + _undefined -> |
3367 | + {ok, Hostname} = inet:gethostname(), |
3368 | + {ok, {hostent, Fqdn, _, _, _, _}} = inet:gethostbyname(Hostname), |
3369 | + Fqdn |
3370 | + end. |
3371 | |
3372 | digit_to_xchar(D) when (D >= 0) and (D < 10) -> |
3373 | D + 48; |
3374 | |
3375 | === modified file 'src/cyrsasl_plain.erl' |
3376 | --- src/cyrsasl_plain.erl 2011-10-03 20:27:12 +0000 |
3377 | +++ src/cyrsasl_plain.erl 2014-07-10 22:50:00 +0000 |
3378 | @@ -5,7 +5,7 @@ |
3379 | %%% Created : 8 Mar 2003 by Alexey Shchepin <alexey@process-one.net> |
3380 | %%% |
3381 | %%% |
3382 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3383 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3384 | %%% |
3385 | %%% This program is free software; you can redistribute it and/or |
3386 | %%% modify it under the terms of the GNU General Public License as |
3387 | |
3388 | === modified file 'src/cyrsasl_scram.erl' |
3389 | --- src/cyrsasl_scram.erl 2011-10-03 20:27:12 +0000 |
3390 | +++ src/cyrsasl_scram.erl 2014-07-10 22:50:00 +0000 |
3391 | @@ -5,7 +5,7 @@ |
3392 | %%% Created : 7 Aug 2011 by Stephen Röttger <stephen.roettger@googlemail.com> |
3393 | %%% |
3394 | %%% |
3395 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3396 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3397 | %%% |
3398 | %%% This program is free software; you can redistribute it and/or |
3399 | %%% modify it under the terms of the GNU General Public License as |
3400 | |
3401 | === modified file 'src/ejabberd.app' |
3402 | --- src/ejabberd.app 2012-01-08 11:45:38 +0000 |
3403 | +++ src/ejabberd.app 2014-07-10 22:50:00 +0000 |
3404 | @@ -2,7 +2,7 @@ |
3405 | |
3406 | {application, ejabberd, |
3407 | [{description, "ejabberd"}, |
3408 | - {vsn, "2.1.10"}, |
3409 | + {vsn, "2.1.13"}, |
3410 | {modules, [acl, |
3411 | adhoc, |
3412 | configure, |
3413 | @@ -78,16 +78,12 @@ |
3414 | mod_irc, |
3415 | mod_irc_connection, |
3416 | mod_last, |
3417 | - mod_last_odbc, |
3418 | mod_muc, |
3419 | mod_muc_log, |
3420 | mod_muc_room, |
3421 | mod_offline, |
3422 | - mod_offline_odbc, |
3423 | mod_privacy, |
3424 | - mod_privacy_odbc, |
3425 | mod_private, |
3426 | - mod_private_odbc, |
3427 | mod_proxy65, |
3428 | mod_proxy65_lib, |
3429 | mod_proxy65_service, |
3430 | @@ -96,14 +92,12 @@ |
3431 | mod_pubsub, |
3432 | mod_register, |
3433 | mod_roster, |
3434 | - mod_roster_odbc, |
3435 | mod_service_log, |
3436 | mod_shared_roster, |
3437 | mod_stats, |
3438 | mod_time, |
3439 | mod_vcard, |
3440 | mod_vcard_ldap, |
3441 | - mod_vcard_odbc, |
3442 | mod_version, |
3443 | node_buddy, |
3444 | node_club, |
3445 | |
3446 | === modified file 'src/ejabberd.cfg.example' |
3447 | --- src/ejabberd.cfg.example 2011-10-03 20:27:12 +0000 |
3448 | +++ src/ejabberd.cfg.example 2014-07-10 22:50:00 +0000 |
3449 | @@ -222,6 +222,9 @@ |
3450 | %% Store the plain passwords or hashed for SCRAM: |
3451 | %%{auth_password_format, plain}. |
3452 | %%{auth_password_format, scram}. |
3453 | +%% |
3454 | +%% Define the FQDN if ejabberd doesn't detect it: |
3455 | +%%{fqdn, "server3.example.com"}. |
3456 | |
3457 | %% |
3458 | %% Authentication using external script |
3459 | |
3460 | === modified file 'src/ejabberd.erl' |
3461 | --- src/ejabberd.erl 2011-09-11 16:16:55 +0000 |
3462 | +++ src/ejabberd.erl 2014-07-10 22:50:00 +0000 |
3463 | @@ -5,7 +5,7 @@ |
3464 | %%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
3465 | %%% |
3466 | %%% |
3467 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3468 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3469 | %%% |
3470 | %%% This program is free software; you can redistribute it and/or |
3471 | %%% modify it under the terms of the GNU General Public License as |
3472 | |
3473 | === modified file 'src/ejabberd.hrl' |
3474 | --- src/ejabberd.hrl 2011-10-03 20:27:12 +0000 |
3475 | +++ src/ejabberd.hrl 2014-07-10 22:50:00 +0000 |
3476 | @@ -1,6 +1,6 @@ |
3477 | %%%---------------------------------------------------------------------- |
3478 | %%% |
3479 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3480 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3481 | %%% |
3482 | %%% This program is free software; you can redistribute it and/or |
3483 | %%% modify it under the terms of the GNU General Public License as |
3484 | |
3485 | === modified file 'src/ejabberd_admin.erl' |
3486 | --- src/ejabberd_admin.erl 2012-01-08 11:45:38 +0000 |
3487 | +++ src/ejabberd_admin.erl 2014-07-10 22:50:00 +0000 |
3488 | @@ -5,7 +5,7 @@ |
3489 | %%% Created : 7 May 2006 by Mickael Remond <mremond@process-one.net> |
3490 | %%% |
3491 | %%% |
3492 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3493 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3494 | %%% |
3495 | %%% This program is free software; you can redistribute it and/or |
3496 | %%% modify it under the terms of the GNU General Public License as |
3497 | @@ -31,6 +31,7 @@ |
3498 | %% Server |
3499 | status/0, reopen_log/0, |
3500 | stop_kindly/2, send_service_message_all_mucs/2, |
3501 | + registered_vhosts/0, |
3502 | %% Erlang |
3503 | update_list/0, update/1, |
3504 | %% Accounts |
3505 | @@ -41,6 +42,7 @@ |
3506 | %% Purge DB |
3507 | delete_expired_messages/0, delete_old_messages/1, |
3508 | %% Mnesia |
3509 | + export2odbc/2, |
3510 | set_master/1, |
3511 | backup_mnesia/1, restore_mnesia/1, |
3512 | dump_mnesia/1, dump_table/2, load_mnesia/1, |
3513 | @@ -85,6 +87,10 @@ |
3514 | args = [], result = {res, rescode}}, |
3515 | #ejabberd_commands{name = stop_kindly, tags = [server], |
3516 | desc = "Inform users and rooms, wait, and stop the server", |
3517 | + longdesc = "Provide the delay in seconds, and the " |
3518 | + "announcement quoted, for example: \n" |
3519 | + "ejabberdctl stop_kindly 60 " |
3520 | + "\\\"The server will stop in one minute.\\\"", |
3521 | module = ?MODULE, function = stop_kindly, |
3522 | args = [{delay, integer}, {announcement, string}], |
3523 | result = {res, rescode}}, |
3524 | @@ -123,6 +129,11 @@ |
3525 | module = ?MODULE, function = registered_users, |
3526 | args = [{host, string}], |
3527 | result = {users, {list, {username, string}}}}, |
3528 | + #ejabberd_commands{name = registered_vhosts, tags = [server], |
3529 | + desc = "List all registered vhosts in SERVER", |
3530 | + module = ?MODULE, function = registered_vhosts, |
3531 | + args = [], |
3532 | + result = {vhosts, {list, {vhost, string}}}}, |
3533 | |
3534 | #ejabberd_commands{name = import_file, tags = [mnesia], |
3535 | desc = "Import user data from jabberd14 spool file", |
3536 | @@ -161,6 +172,11 @@ |
3537 | module = mod_pubsub, function = rename_default_nodeplugin, |
3538 | args = [], result = {res, rescode}}, |
3539 | |
3540 | + #ejabberd_commands{name = export2odbc, tags = [mnesia], |
3541 | + desc = "Export virtual host information from Mnesia tables to SQL files", |
3542 | + module = ?MODULE, function = export2odbc, |
3543 | + args = [{host, string}, {directory, string}], |
3544 | + result = {res, rescode}}, |
3545 | #ejabberd_commands{name = set_master, tags = [mnesia], |
3546 | desc = "Set master node of the clustered Mnesia tables", |
3547 | longdesc = "If you provide as nodename \"self\", this " |
3548 | @@ -271,7 +287,7 @@ |
3549 | - TimestampStart, |
3550 | io:format("[~p/~p ~ps] ~s... ", |
3551 | [NumberThis, NumberLast, SecondsDiff, Desc]), |
3552 | - Result = apply(Mod, Func, Args), |
3553 | + Result = (catch apply(Mod, Func, Args)), |
3554 | io:format("~p~n", [Result]), |
3555 | NumberThis+1 |
3556 | end, |
3557 | @@ -338,6 +354,8 @@ |
3558 | SUsers = lists:sort(Users), |
3559 | lists:map(fun({U, _S}) -> U end, SUsers). |
3560 | |
3561 | +registered_vhosts() -> |
3562 | + ?MYHOSTS. |
3563 | |
3564 | %%% |
3565 | %%% Migration management |
3566 | @@ -369,18 +387,38 @@ |
3567 | %%% |
3568 | |
3569 | delete_expired_messages() -> |
3570 | - {atomic, ok} = mod_offline:remove_expired_messages(), |
3571 | - ok. |
3572 | + lists:foreach( |
3573 | + fun(Host) -> |
3574 | + {atomic, ok} = mod_offline:remove_expired_messages(Host) |
3575 | + end, ?MYHOSTS). |
3576 | |
3577 | delete_old_messages(Days) -> |
3578 | - {atomic, _} = mod_offline:remove_old_messages(Days), |
3579 | - ok. |
3580 | - |
3581 | + lists:foreach( |
3582 | + fun(Host) -> |
3583 | + {atomic, _} = mod_offline:remove_old_messages(Days, Host) |
3584 | + end, ?MYHOSTS). |
3585 | |
3586 | %%% |
3587 | %%% Mnesia management |
3588 | %%% |
3589 | |
3590 | +export2odbc(Host, Directory) -> |
3591 | + Tables = [{export_last, last}, |
3592 | + {export_offline, offline}, |
3593 | + {export_private_storage, private_storage}, |
3594 | + {export_roster, roster}, |
3595 | + {export_vcard, vcard}, |
3596 | + {export_vcard_search, vcard_search}, |
3597 | + {export_passwd, passwd}], |
3598 | + Export = fun({TableFun, Table}) -> |
3599 | + Filename = filename:join([Directory, atom_to_list(Table)++".txt"]), |
3600 | + io:format("Trying to export Mnesia table '~p' on Host '~s' to file '~s'~n", [Table, Host, Filename]), |
3601 | + Res = (catch ejd2odbc:TableFun(Host, Filename)), |
3602 | + io:format(" Result: ~p~n", [Res]) |
3603 | + end, |
3604 | + lists:foreach(Export, Tables), |
3605 | + ok. |
3606 | + |
3607 | set_master("self") -> |
3608 | set_master(node()); |
3609 | set_master(NodeString) when is_list(NodeString) -> |
3610 | |
3611 | === modified file 'src/ejabberd_app.erl' |
3612 | --- src/ejabberd_app.erl 2011-10-03 20:27:12 +0000 |
3613 | +++ src/ejabberd_app.erl 2014-07-10 22:50:00 +0000 |
3614 | @@ -5,7 +5,7 @@ |
3615 | %%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net> |
3616 | %%% |
3617 | %%% |
3618 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3619 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3620 | %%% |
3621 | %%% This program is free software; you can redistribute it and/or |
3622 | %%% modify it under the terms of the GNU General Public License as |
3623 | @@ -78,6 +78,7 @@ |
3624 | %% This function is called when an application is about to be stopped, |
3625 | %% before shutting down the processes of the application. |
3626 | prep_stop(State) -> |
3627 | + ejabberd_listener:stop_listeners(), |
3628 | stop_modules(), |
3629 | ejabberd_admin:stop(), |
3630 | broadcast_c2s_shutdown(), |
3631 | |
3632 | === modified file 'src/ejabberd_auth.erl' |
3633 | --- src/ejabberd_auth.erl 2011-10-03 20:27:12 +0000 |
3634 | +++ src/ejabberd_auth.erl 2014-07-10 22:50:00 +0000 |
3635 | @@ -5,7 +5,7 @@ |
3636 | %%% Created : 23 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
3637 | %%% |
3638 | %%% |
3639 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3640 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3641 | %%% |
3642 | %%% This program is free software; you can redistribute it and/or |
3643 | %%% modify it under the terms of the GNU General Public License as |
3644 | |
3645 | === modified file 'src/ejabberd_auth_anonymous.erl' |
3646 | --- src/ejabberd_auth_anonymous.erl 2011-10-03 20:27:12 +0000 |
3647 | +++ src/ejabberd_auth_anonymous.erl 2014-07-10 22:50:00 +0000 |
3648 | @@ -5,7 +5,7 @@ |
3649 | %%% Created : 17 Feb 2006 by Mickael Remond <mremond@process-one.net> |
3650 | %%% |
3651 | %%% |
3652 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3653 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3654 | %%% |
3655 | %%% This program is free software; you can redistribute it and/or |
3656 | %%% modify it under the terms of the GNU General Public License as |
3657 | |
3658 | === modified file 'src/ejabberd_auth_external.erl' |
3659 | --- src/ejabberd_auth_external.erl 2011-10-03 20:27:12 +0000 |
3660 | +++ src/ejabberd_auth_external.erl 2014-07-10 22:50:00 +0000 |
3661 | @@ -5,7 +5,7 @@ |
3662 | %%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net> |
3663 | %%% |
3664 | %%% |
3665 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3666 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3667 | %%% |
3668 | %%% This program is free software; you can redistribute it and/or |
3669 | %%% modify it under the terms of the GNU General Public License as |
3670 | @@ -293,27 +293,20 @@ |
3671 | get_last_info(User, Server) -> |
3672 | case get_mod_last_enabled(Server) of |
3673 | mod_last -> mod_last:get_last_info(User, Server); |
3674 | - mod_last_odbc -> mod_last_odbc:get_last_info(User, Server); |
3675 | no_mod_last -> mod_last_required |
3676 | end. |
3677 | |
3678 | -%% @spec (Server) -> mod_last | mod_last_odbc | no_mod_last |
3679 | +%% @spec (Server) -> mod_last | no_mod_last |
3680 | get_mod_last_enabled(Server) -> |
3681 | - ML = gen_mod:is_loaded(Server, mod_last), |
3682 | - MLO = gen_mod:is_loaded(Server, mod_last_odbc), |
3683 | - case {ML, MLO} of |
3684 | - {true, _} -> mod_last; |
3685 | - {false, true} -> mod_last_odbc; |
3686 | - {false, false} -> no_mod_last |
3687 | + case gen_mod:is_loaded(Server, mod_last) of |
3688 | + true -> mod_last; |
3689 | + false -> no_mod_last |
3690 | end. |
3691 | |
3692 | get_mod_last_configured(Server) -> |
3693 | - ML = is_configured(Server, mod_last), |
3694 | - MLO = is_configured(Server, mod_last_odbc), |
3695 | - case {ML, MLO} of |
3696 | - {true, _} -> mod_last; |
3697 | - {false, true} -> mod_last_odbc; |
3698 | - {false, false} -> no_mod_last |
3699 | + case is_configured(Server, mod_last) of |
3700 | + true -> mod_last; |
3701 | + false -> no_mod_last |
3702 | end. |
3703 | |
3704 | is_configured(Host, Module) -> |
3705 | |
3706 | === modified file 'src/ejabberd_auth_internal.erl' |
3707 | --- src/ejabberd_auth_internal.erl 2011-10-03 20:27:12 +0000 |
3708 | +++ src/ejabberd_auth_internal.erl 2014-07-10 22:50:00 +0000 |
3709 | @@ -5,7 +5,7 @@ |
3710 | %%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net> |
3711 | %%% |
3712 | %%% |
3713 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3714 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3715 | %%% |
3716 | %%% This program is free software; you can redistribute it and/or |
3717 | %%% modify it under the terms of the GNU General Public License as |
3718 | |
3719 | === modified file 'src/ejabberd_auth_ldap.erl' |
3720 | --- src/ejabberd_auth_ldap.erl 2011-10-03 20:27:12 +0000 |
3721 | +++ src/ejabberd_auth_ldap.erl 2014-07-10 22:50:00 +0000 |
3722 | @@ -5,7 +5,7 @@ |
3723 | %%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net> |
3724 | %%% |
3725 | %%% |
3726 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3727 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3728 | %%% |
3729 | %%% This program is free software; you can redistribute it and/or |
3730 | %%% modify it under the terms of the GNU General Public License as |
3731 | |
3732 | === modified file 'src/ejabberd_auth_odbc.erl' |
3733 | --- src/ejabberd_auth_odbc.erl 2011-10-03 20:27:12 +0000 |
3734 | +++ src/ejabberd_auth_odbc.erl 2014-07-10 22:50:00 +0000 |
3735 | @@ -5,7 +5,7 @@ |
3736 | %%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net> |
3737 | %%% |
3738 | %%% |
3739 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3740 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3741 | %%% |
3742 | %%% This program is free software; you can redistribute it and/or |
3743 | %%% modify it under the terms of the GNU General Public License as |
3744 | |
3745 | === modified file 'src/ejabberd_auth_pam.erl' |
3746 | --- src/ejabberd_auth_pam.erl 2011-10-03 20:27:12 +0000 |
3747 | +++ src/ejabberd_auth_pam.erl 2014-07-10 22:50:00 +0000 |
3748 | @@ -5,7 +5,7 @@ |
3749 | %%% Created : 5 Jul 2007 by Evgeniy Khramtsov <xram@jabber.ru> |
3750 | %%% |
3751 | %%% |
3752 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3753 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3754 | %%% |
3755 | %%% This program is free software; you can redistribute it and/or |
3756 | %%% modify it under the terms of the GNU General Public License as |
3757 | |
3758 | === modified file 'src/ejabberd_c2s.erl' |
3759 | --- src/ejabberd_c2s.erl 2012-01-08 11:45:38 +0000 |
3760 | +++ src/ejabberd_c2s.erl 2014-07-10 22:50:00 +0000 |
3761 | @@ -5,7 +5,7 @@ |
3762 | %%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
3763 | %%% |
3764 | %%% |
3765 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3766 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3767 | %%% |
3768 | %%% This program is free software; you can redistribute it and/or |
3769 | %%% modify it under the terms of the GNU General Public License as |
3770 | @@ -556,10 +556,11 @@ |
3771 | fsm_next_state_pack(session_established, |
3772 | NewStateData); |
3773 | _ -> |
3774 | + IP = peerip(StateData#state.sockmod, StateData#state.socket), |
3775 | ?INFO_MSG( |
3776 | - "(~w) Failed legacy authentication for ~s", |
3777 | + "(~w) Failed legacy authentication for ~s from IP ~s (~w)", |
3778 | [StateData#state.socket, |
3779 | - jlib:jid_to_string(JID)]), |
3780 | + jlib:jid_to_string(JID), jlib:ip_to_list(IP), IP]), |
3781 | Err = jlib:make_error_reply( |
3782 | El, ?ERR_NOT_AUTHORIZED), |
3783 | send_element(StateData, Err), |
3784 | @@ -646,10 +647,11 @@ |
3785 | StateData#state{ |
3786 | sasl_state = NewSASLState}); |
3787 | {error, Error, Username} -> |
3788 | + IP = peerip(StateData#state.sockmod, StateData#state.socket), |
3789 | ?INFO_MSG( |
3790 | - "(~w) Failed authentication for ~s@~s", |
3791 | + "(~w) Failed authentication for ~s@~s from IP ~s (~w)", |
3792 | [StateData#state.socket, |
3793 | - Username, StateData#state.server]), |
3794 | + Username, StateData#state.server, jlib:ip_to_list(IP), IP]), |
3795 | send_element(StateData, |
3796 | {xmlelement, "failure", |
3797 | [{"xmlns", ?NS_SASL}], |
3798 | @@ -799,10 +801,11 @@ |
3799 | fsm_next_state(wait_for_sasl_response, |
3800 | StateData#state{sasl_state = NewSASLState}); |
3801 | {error, Error, Username} -> |
3802 | + IP = peerip(StateData#state.sockmod, StateData#state.socket), |
3803 | ?INFO_MSG( |
3804 | - "(~w) Failed authentication for ~s@~s", |
3805 | + "(~w) Failed authentication for ~s@~s from IP ~s (~w)", |
3806 | [StateData#state.socket, |
3807 | - Username, StateData#state.server]), |
3808 | + Username, StateData#state.server, jlib:ip_to_list(IP), IP]), |
3809 | send_element(StateData, |
3810 | {xmlelement, "failure", |
3811 | [{"xmlns", ?NS_SASL}], |
3812 | |
3813 | === modified file 'src/ejabberd_c2s_config.erl' |
3814 | --- src/ejabberd_c2s_config.erl 2011-09-11 16:16:55 +0000 |
3815 | +++ src/ejabberd_c2s_config.erl 2014-07-10 22:50:00 +0000 |
3816 | @@ -6,7 +6,7 @@ |
3817 | %%% Created : 2 Nov 2007 by Mickael Remond <mremond@process-one.net> |
3818 | %%% |
3819 | %%% |
3820 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3821 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3822 | %%% |
3823 | %%% This program is free software; you can redistribute it and/or |
3824 | %%% modify it under the terms of the GNU General Public License as |
3825 | |
3826 | === modified file 'src/ejabberd_captcha.erl' |
3827 | --- src/ejabberd_captcha.erl 2011-09-11 16:16:55 +0000 |
3828 | +++ src/ejabberd_captcha.erl 2014-07-10 22:50:00 +0000 |
3829 | @@ -5,7 +5,7 @@ |
3830 | %%% Created : 26 Apr 2008 by Evgeniy Khramtsov <xramtsov@gmail.com> |
3831 | %%% |
3832 | %%% |
3833 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3834 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3835 | %%% |
3836 | %%% This program is free software; you can redistribute it and/or |
3837 | %%% modify it under the terms of the GNU General Public License as |
3838 | @@ -304,7 +304,7 @@ |
3839 | Form = |
3840 | {xmlelement, "p", [], |
3841 | [{xmlcdata, |
3842 | - translate:translate(Lang, "The captcha is valid.") |
3843 | + translate:translate(Lang, "The CAPTCHA is valid.") |
3844 | }]}, |
3845 | ejabberd_web:make_xhtml([Form]); |
3846 | captcha_non_valid -> |
3847 | |
3848 | === modified file 'src/ejabberd_check.erl' |
3849 | --- src/ejabberd_check.erl 2011-09-11 16:16:55 +0000 |
3850 | +++ src/ejabberd_check.erl 2014-07-10 22:50:00 +0000 |
3851 | @@ -5,7 +5,7 @@ |
3852 | %%% Created : 27 Feb 2008 by Mickael Remond <mremond@process-one.net> |
3853 | %%% |
3854 | %%% |
3855 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3856 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3857 | %%% |
3858 | %%% This program is free software; you can redistribute it and/or |
3859 | %%% modify it under the terms of the GNU General Public License as |
3860 | |
3861 | === modified file 'src/ejabberd_commands.erl' |
3862 | --- src/ejabberd_commands.erl 2011-09-11 16:16:55 +0000 |
3863 | +++ src/ejabberd_commands.erl 2014-07-10 22:50:00 +0000 |
3864 | @@ -5,7 +5,7 @@ |
3865 | %%% Created : 20 May 2008 by Badlop <badlop@process-one.net> |
3866 | %%% |
3867 | %%% |
3868 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3869 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3870 | %%% |
3871 | %%% This program is free software; you can redistribute it and/or |
3872 | %%% modify it under the terms of the GNU General Public License as |
3873 | @@ -381,18 +381,11 @@ |
3874 | no_auth_provided; |
3875 | check_auth({User, Server, Password}) -> |
3876 | %% Check the account exists and password is valid |
3877 | - AccountPass = ejabberd_auth:get_password_s(User, Server), |
3878 | - AccountPassMD5 = get_md5(AccountPass), |
3879 | - case Password of |
3880 | - AccountPass -> {ok, User, Server}; |
3881 | - AccountPassMD5 -> {ok, User, Server}; |
3882 | + case ejabberd_auth:check_password(User, Server, Password) of |
3883 | + true -> {ok, User, Server}; |
3884 | _ -> throw({error, invalid_account_data}) |
3885 | end. |
3886 | |
3887 | -get_md5(AccountPass) -> |
3888 | - lists:flatten([io_lib:format("~.16B", [X]) |
3889 | - || X <- binary_to_list(crypto:md5(AccountPass))]). |
3890 | - |
3891 | check_access(all, _) -> |
3892 | true; |
3893 | check_access(Access, Auth) -> |
3894 | |
3895 | === modified file 'src/ejabberd_commands.hrl' |
3896 | --- src/ejabberd_commands.hrl 2011-09-11 16:16:55 +0000 |
3897 | +++ src/ejabberd_commands.hrl 2014-07-10 22:50:00 +0000 |
3898 | @@ -1,6 +1,6 @@ |
3899 | %%%---------------------------------------------------------------------- |
3900 | %%% |
3901 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3902 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3903 | %%% |
3904 | %%% This program is free software; you can redistribute it and/or |
3905 | %%% modify it under the terms of the GNU General Public License as |
3906 | |
3907 | === modified file 'src/ejabberd_config.erl' |
3908 | --- src/ejabberd_config.erl 2011-09-11 16:16:55 +0000 |
3909 | +++ src/ejabberd_config.erl 2014-07-10 22:50:00 +0000 |
3910 | @@ -5,7 +5,7 @@ |
3911 | %%% Created : 14 Dec 2002 by Alexey Shchepin <alexey@process-one.net> |
3912 | %%% |
3913 | %%% |
3914 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3915 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3916 | %%% |
3917 | %%% This program is free software; you can redistribute it and/or |
3918 | %%% modify it under the terms of the GNU General Public License as |
3919 | @@ -374,6 +374,9 @@ |
3920 | State; |
3921 | {hosts, _Hosts} -> |
3922 | State; |
3923 | + {fqdn, HostFQDN} -> |
3924 | + ?DEBUG("FQDN set to: ~p", [HostFQDN]), |
3925 | + add_option(fqdn, HostFQDN, State); |
3926 | {host_config, Host, Terms} -> |
3927 | lists:foldl(fun(T, S) -> process_host_term(T, Host, S) end, |
3928 | State, Terms); |
3929 | @@ -464,6 +467,8 @@ |
3930 | State; |
3931 | {odbc_server, ODBC_server} -> |
3932 | add_option({odbc_server, Host}, ODBC_server, State); |
3933 | + {modules, Modules} -> |
3934 | + add_option({modules, Host}, replace_modules(Modules), State); |
3935 | {Opt, Val} -> |
3936 | add_option({Opt, Host}, Val, State) |
3937 | end. |
3938 | @@ -607,3 +612,30 @@ |
3939 | {error, _Reason} -> |
3940 | false |
3941 | end. |
3942 | + |
3943 | +replace_module(mod_announce_odbc) -> {mod_announce, odbc}; |
3944 | +replace_module(mod_blocking_odbc) -> {mod_blocking, odbc}; |
3945 | +replace_module(mod_irc_odbc) -> {mod_irc, odbc}; |
3946 | +replace_module(mod_last_odbc) -> {mod_last, odbc}; |
3947 | +replace_module(mod_muc_odbc) -> {mod_muc, odbc}; |
3948 | +replace_module(mod_offline_odbc) -> {mod_offline, odbc}; |
3949 | +replace_module(mod_privacy_odbc) -> {mod_privacy, odbc}; |
3950 | +replace_module(mod_private_odbc) -> {mod_private, odbc}; |
3951 | +replace_module(mod_roster_odbc) -> {mod_roster, odbc}; |
3952 | +replace_module(mod_shared_roster_odbc) -> {mod_shared_roster, odbc}; |
3953 | +replace_module(mod_vcard_odbc) -> {mod_vcard, odbc}; |
3954 | +replace_module(mod_vcard_xupdate_odbc) -> {mod_vcard_xupdate, odbc}; |
3955 | +replace_module(Module) -> Module. |
3956 | + |
3957 | +replace_modules(Modules) -> |
3958 | + lists:map( |
3959 | + fun({Module, Opts}) -> |
3960 | + case replace_module(Module) of |
3961 | + {NewModule, DBType} -> |
3962 | + NewOpts = [{db_type, DBType} | |
3963 | + lists:keydelete(db_type, 1, Opts)], |
3964 | + {NewModule, NewOpts}; |
3965 | + NewModule -> |
3966 | + {NewModule, Opts} |
3967 | + end |
3968 | + end, Modules). |
3969 | |
3970 | === modified file 'src/ejabberd_config.hrl' |
3971 | --- src/ejabberd_config.hrl 2011-09-11 16:16:55 +0000 |
3972 | +++ src/ejabberd_config.hrl 2014-07-10 22:50:00 +0000 |
3973 | @@ -1,6 +1,6 @@ |
3974 | %%%---------------------------------------------------------------------- |
3975 | %%% |
3976 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3977 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3978 | %%% |
3979 | %%% This program is free software; you can redistribute it and/or |
3980 | %%% modify it under the terms of the GNU General Public License as |
3981 | |
3982 | === modified file 'src/ejabberd_ctl.erl' |
3983 | --- src/ejabberd_ctl.erl 2012-01-08 11:45:38 +0000 |
3984 | +++ src/ejabberd_ctl.erl 2014-07-10 22:50:00 +0000 |
3985 | @@ -5,7 +5,7 @@ |
3986 | %%% Created : 11 Jan 2004 by Alexey Shchepin <alexey@process-one.net> |
3987 | %%% |
3988 | %%% |
3989 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
3990 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
3991 | %%% |
3992 | %%% This program is free software; you can redistribute it and/or |
3993 | %%% modify it under the terms of the GNU General Public License as |
3994 | @@ -292,6 +292,7 @@ |
3995 | Result = ejabberd_commands:execute_command(AccessCommands, Auth, Command, |
3996 | ArgsFormatted), |
3997 | format_result(Result, ResultFormat); |
3998 | + %% This case clause is for Erlang R14 and older |
3999 | {'EXIT', {function_clause,[{lists,zip,[A1, A2]} | _]}} -> |
4000 | {NumCompa, TextCompa} = |
4001 | case {length(A1), length(A2)} of |
4002 | @@ -300,6 +301,16 @@ |
4003 | end, |
4004 | {io_lib:format("Error: the command ~p requires ~p ~s.", |
4005 | [CmdString, NumCompa, TextCompa]), |
4006 | + wrong_command_arguments}; |
4007 | + %% This case clause is for Erlang R15 and newer |
4008 | + {'EXIT', {function_clause,[{lists,zip,[A1, A2],_} | _]}} -> |
4009 | + {NumCompa, TextCompa} = |
4010 | + case {length(A1), length(A2)} of |
4011 | + {L1, L2} when L1 < L2 -> {L2-L1, "less argument"}; |
4012 | + {L1, L2} when L1 > L2 -> {L1-L2, "more argument"} |
4013 | + end, |
4014 | + {io_lib:format("Error: the command ~p requires ~p ~s.", |
4015 | + [CmdString, NumCompa, TextCompa]), |
4016 | wrong_command_arguments} |
4017 | end |
4018 | end. |
4019 | |
4020 | === modified file 'src/ejabberd_ctl.hrl' |
4021 | --- src/ejabberd_ctl.hrl 2011-09-11 16:16:55 +0000 |
4022 | +++ src/ejabberd_ctl.hrl 2014-07-10 22:50:00 +0000 |
4023 | @@ -1,6 +1,6 @@ |
4024 | %%%---------------------------------------------------------------------- |
4025 | %%% |
4026 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4027 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4028 | %%% |
4029 | %%% This program is free software; you can redistribute it and/or |
4030 | %%% modify it under the terms of the GNU General Public License as |
4031 | |
4032 | === modified file 'src/ejabberd_frontend_socket.erl' |
4033 | --- src/ejabberd_frontend_socket.erl 2011-09-11 16:16:55 +0000 |
4034 | +++ src/ejabberd_frontend_socket.erl 2014-07-10 22:50:00 +0000 |
4035 | @@ -5,7 +5,7 @@ |
4036 | %%% Created : 23 Aug 2006 by Alexey Shchepin <alexey@process-one.net> |
4037 | %%% |
4038 | %%% |
4039 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4040 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4041 | %%% |
4042 | %%% This program is free software; you can redistribute it and/or |
4043 | %%% modify it under the terms of the GNU General Public License as |
4044 | |
4045 | === modified file 'src/ejabberd_hooks.erl' |
4046 | --- src/ejabberd_hooks.erl 2011-09-11 16:16:55 +0000 |
4047 | +++ src/ejabberd_hooks.erl 2014-07-10 22:50:00 +0000 |
4048 | @@ -5,7 +5,7 @@ |
4049 | %%% Created : 8 Aug 2004 by Alexey Shchepin <alexey@process-one.net> |
4050 | %%% |
4051 | %%% |
4052 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4053 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4054 | %%% |
4055 | %%% This program is free software; you can redistribute it and/or |
4056 | %%% modify it under the terms of the GNU General Public License as |
4057 | |
4058 | === modified file 'src/ejabberd_listener.erl' |
4059 | --- src/ejabberd_listener.erl 2011-09-11 16:16:55 +0000 |
4060 | +++ src/ejabberd_listener.erl 2014-07-10 22:50:00 +0000 |
4061 | @@ -5,7 +5,7 @@ |
4062 | %%% Created : 16 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
4063 | %%% |
4064 | %%% |
4065 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4066 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4067 | %%% |
4068 | %%% This program is free software; you can redistribute it and/or |
4069 | %%% modify it under the terms of the GNU General Public License as |
4070 | @@ -290,8 +290,8 @@ |
4071 | CallMod:start(strip_frontend(Module), gen_tcp, Socket, Opts), |
4072 | accept(ListenSocket, Module, Opts); |
4073 | {error, Reason} -> |
4074 | - ?INFO_MSG("(~w) Failed TCP accept: ~w", |
4075 | - [ListenSocket, Reason]), |
4076 | + ?ERROR_MSG("(~w) Failed TCP accept: ~w", |
4077 | + [ListenSocket, Reason]), |
4078 | accept(ListenSocket, Module, Opts) |
4079 | end. |
4080 | |
4081 | |
4082 | === modified file 'src/ejabberd_local.erl' |
4083 | --- src/ejabberd_local.erl 2011-09-11 16:16:55 +0000 |
4084 | +++ src/ejabberd_local.erl 2014-07-10 22:50:00 +0000 |
4085 | @@ -5,7 +5,7 @@ |
4086 | %%% Created : 30 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
4087 | %%% |
4088 | %%% |
4089 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4090 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4091 | %%% |
4092 | %%% This program is free software; you can redistribute it and/or |
4093 | %%% modify it under the terms of the GNU General Public License as |
4094 | |
4095 | === modified file 'src/ejabberd_logger_h.erl' |
4096 | --- src/ejabberd_logger_h.erl 2011-09-11 16:16:55 +0000 |
4097 | +++ src/ejabberd_logger_h.erl 2014-07-10 22:50:00 +0000 |
4098 | @@ -5,7 +5,7 @@ |
4099 | %%% Created : 23 Oct 2003 by Alexey Shchepin <alexey@process-one.net> |
4100 | %%% |
4101 | %%% |
4102 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4103 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4104 | %%% |
4105 | %%% This program is free software; you can redistribute it and/or |
4106 | %%% modify it under the terms of the GNU General Public License as |
4107 | |
4108 | === modified file 'src/ejabberd_loglevel.erl' |
4109 | --- src/ejabberd_loglevel.erl 2011-09-11 16:16:55 +0000 |
4110 | +++ src/ejabberd_loglevel.erl 2014-07-10 22:50:00 +0000 |
4111 | @@ -9,7 +9,7 @@ |
4112 | %%% Created : 29 Nov 2006 by Mickael Remond <mremond@process-one.net> |
4113 | %%% |
4114 | %%% |
4115 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4116 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4117 | %%% |
4118 | %%% This program is free software; you can redistribute it and/or |
4119 | %%% modify it under the terms of the GNU General Public License as |
4120 | |
4121 | === modified file 'src/ejabberd_node_groups.erl' |
4122 | --- src/ejabberd_node_groups.erl 2011-09-11 16:16:55 +0000 |
4123 | +++ src/ejabberd_node_groups.erl 2014-07-10 22:50:00 +0000 |
4124 | @@ -5,7 +5,7 @@ |
4125 | %%% Created : 1 Nov 2006 by Alexey Shchepin <alexey@process-one.net> |
4126 | %%% |
4127 | %%% |
4128 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4129 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4130 | %%% |
4131 | %%% This program is free software; you can redistribute it and/or |
4132 | %%% modify it under the terms of the GNU General Public License as |
4133 | |
4134 | === modified file 'src/ejabberd_piefxis.erl' |
4135 | --- src/ejabberd_piefxis.erl 2011-10-03 20:27:12 +0000 |
4136 | +++ src/ejabberd_piefxis.erl 2014-07-10 22:50:00 +0000 |
4137 | @@ -5,7 +5,7 @@ |
4138 | %%% Created : 17 Jul 2008 by Pablo Polvorin <pablo.polvorin@process-one.net> |
4139 | %%% |
4140 | %%% |
4141 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4142 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4143 | %%% |
4144 | %%% This program is free software; you can redistribute it and/or |
4145 | %%% modify it under the terms of the GNU General Public License as |
4146 | @@ -289,9 +289,10 @@ |
4147 | |
4148 | populate_user(User,Domain,El=#xmlel{name='query', ns='jabber:iq:roster'}) -> |
4149 | io:format("Trying to add/update roster list...",[]), |
4150 | - case loaded_module(Domain,[mod_roster_odbc,mod_roster]) of |
4151 | - {ok, M} -> |
4152 | - case M:set_items(User, Domain, exmpp_xml:xmlel_to_xmlelement(El)) of |
4153 | + case loaded_module(Domain, mod_roster) of |
4154 | + {ok, _DBType} -> |
4155 | + case mod_roster:set_items(User, Domain, |
4156 | + exmpp_xml:xmlel_to_xmlelement(El)) of |
4157 | {atomic, ok} -> |
4158 | io:format(" DONE.~n",[]), |
4159 | ok; |
4160 | @@ -302,7 +303,7 @@ |
4161 | {error, not_found} |
4162 | end; |
4163 | E -> io:format(" ERROR: ~p~n",[E]), |
4164 | - ?ERROR_MSG("No modules loaded [mod_roster, mod_roster_odbc] ~s ~n", |
4165 | + ?ERROR_MSG("No modules loaded [mod_roster] ~s ~n", |
4166 | [exmpp_xml:document_to_list(El)]), |
4167 | {error, not_found} |
4168 | end; |
4169 | @@ -330,10 +331,10 @@ |
4170 | |
4171 | populate_user(User,Domain,El=#xmlel{name='vCard', ns='vcard-temp'}) -> |
4172 | io:format("Trying to add/update vCards...",[]), |
4173 | - case loaded_module(Domain,[mod_vcard,mod_vcard_odbc]) of |
4174 | - {ok, M} -> FullUser = jid_to_old_jid(exmpp_jid:make(User, Domain)), |
4175 | + case loaded_module(Domain, mod_vcard) of |
4176 | + {ok, _} -> FullUser = jid_to_old_jid(exmpp_jid:make(User, Domain)), |
4177 | IQ = iq_to_old_iq(#iq{type = set, payload = El}), |
4178 | - case M:process_sm_iq(FullUser, FullUser , IQ) of |
4179 | + case mod_vcard:process_sm_iq(FullUser, FullUser , IQ) of |
4180 | {error,_Err} -> |
4181 | io:format(" ERROR.~n",[]), |
4182 | ?ERROR_MSG("Error processing vcard ~s : ~p ~n", |
4183 | @@ -343,7 +344,7 @@ |
4184 | end; |
4185 | _ -> |
4186 | io:format(" ERROR.~n",[]), |
4187 | - ?ERROR_MSG("No modules loaded [mod_vcard, mod_vcard_odbc] ~s ~n", |
4188 | + ?ERROR_MSG("No modules loaded [mod_vcard] ~s ~n", |
4189 | [exmpp_xml:document_to_list(El)]), |
4190 | {error, not_found} |
4191 | end; |
4192 | @@ -356,8 +357,8 @@ |
4193 | |
4194 | populate_user(User,Domain,El=#xmlel{name='offline-messages'}) -> |
4195 | io:format("Trying to add/update offline-messages...",[]), |
4196 | - case loaded_module(Domain, [mod_offline, mod_offline_odbc]) of |
4197 | - {ok, M} -> |
4198 | + case loaded_module(Domain, mod_offline) of |
4199 | + {ok, _DBType} -> |
4200 | ok = exmpp_xml:foreach( |
4201 | fun (_Element, {xmlcdata, _}) -> |
4202 | ok; |
4203 | @@ -367,11 +368,11 @@ |
4204 | FullUser = jid_to_old_jid(exmpp_jid:make(User, |
4205 | Domain)), |
4206 | OldChild = exmpp_xml:xmlel_to_xmlelement(Child), |
4207 | - _R = M:store_packet(FullFrom, FullUser, OldChild) |
4208 | + _R = mod_offline:store_packet(FullFrom, FullUser, OldChild) |
4209 | end, El), io:format(" DONE.~n",[]); |
4210 | _ -> |
4211 | io:format(" ERROR.~n",[]), |
4212 | - ?ERROR_MSG("No modules loaded [mod_offline, mod_offline_odbc] ~s ~n", |
4213 | + ?ERROR_MSG("No modules loaded [mod_offline] ~s ~n", |
4214 | [exmpp_xml:document_to_list(El)]), |
4215 | {error, not_found} |
4216 | end; |
4217 | @@ -384,15 +385,15 @@ |
4218 | |
4219 | populate_user(User,Domain,El=#xmlel{name='query', ns='jabber:iq:private'}) -> |
4220 | io:format("Trying to add/update private storage...",[]), |
4221 | - case loaded_module(Domain,[mod_private_odbc,mod_private]) of |
4222 | - {ok, M} -> |
4223 | + case loaded_module(Domain, mod_private) of |
4224 | + {ok, _DBType} -> |
4225 | FullUser = jid_to_old_jid(exmpp_jid:make(User, Domain)), |
4226 | IQ = iq_to_old_iq(#iq{type = set, |
4227 | ns = 'jabber:iq:private', |
4228 | kind = request, |
4229 | iq_ns = 'jabberd:client', |
4230 | payload = El}), |
4231 | - case M:process_sm_iq(FullUser, FullUser, IQ ) of |
4232 | + case mod_private:process_sm_iq(FullUser, FullUser, IQ ) of |
4233 | {error, _Err} -> |
4234 | io:format(" ERROR.~n",[]), |
4235 | ?ERROR_MSG("Error processing private storage ~s : ~p ~n", |
4236 | @@ -401,7 +402,7 @@ |
4237 | end; |
4238 | _ -> |
4239 | io:format(" ERROR.~n",[]), |
4240 | - ?ERROR_MSG("No modules loaded [mod_private, mod_private_odbc] ~s ~n", |
4241 | + ?ERROR_MSG("No modules loaded [mod_private] ~s ~n", |
4242 | [exmpp_xml:document_to_list(El)]), |
4243 | {error, not_found} |
4244 | end; |
4245 | @@ -415,13 +416,12 @@ |
4246 | %%%================================== |
4247 | %%%% Utilities |
4248 | |
4249 | -loaded_module(Domain,Options) -> |
4250 | - LoadedModules = gen_mod:loaded_modules(Domain), |
4251 | - case lists:filter(fun(Module) -> |
4252 | - lists:member(Module, LoadedModules) |
4253 | - end, Options) of |
4254 | - [M|_] -> {ok, M}; |
4255 | - [] -> {error,not_found} |
4256 | +loaded_module(Domain, Module) -> |
4257 | + case gen_mod:is_loaded(Domain, Module) of |
4258 | + true -> |
4259 | + {ok, gen_mod:db_type(Domain, Module)}; |
4260 | + false -> |
4261 | + {error, not_found} |
4262 | end. |
4263 | |
4264 | jid_to_old_jid(Jid) -> |
4265 | @@ -574,13 +574,13 @@ |
4266 | |
4267 | %% @spec (InfoName::atom(), Username::string(), Host::string()) -> string() |
4268 | extract_user_info(roster, Username, Host) -> |
4269 | - case loaded_module(Host,[mod_roster_odbc,mod_roster]) of |
4270 | - {ok, M} -> |
4271 | + case loaded_module(Host, mod_roster) of |
4272 | + {ok, _DBType} -> |
4273 | From = To = jlib:make_jid(Username, Host, ""), |
4274 | SubelGet = {xmlelement, "query", [{"xmlns",?NS_ROSTER}], []}, |
4275 | %%IQGet = #iq{type=get, xmlns=?NS_ROSTER, payload=SubelGet}, % this is for 3.0.0 version |
4276 | IQGet = {iq, "", get, ?NS_ROSTER, "" , SubelGet}, |
4277 | - Res = M:process_local_iq(From, To, IQGet), |
4278 | + Res = mod_roster:process_local_iq(From, To, IQGet), |
4279 | %%[El] = Res#iq.payload, % this is for 3.0.0 version |
4280 | {iq, _, result, _, _, Els} = Res, |
4281 | case Els of |
4282 | @@ -592,8 +592,8 @@ |
4283 | end; |
4284 | |
4285 | extract_user_info(offline, Username, Host) -> |
4286 | - case loaded_module(Host,[mod_offline,mod_offline_odbc]) of |
4287 | - {ok, mod_offline} -> |
4288 | + case loaded_module(Host, mod_offline) of |
4289 | + {ok, mnesia} -> |
4290 | Els = mnesia_pop_offline_messages([], Username, Host), |
4291 | case Els of |
4292 | [] -> ""; |
4293 | @@ -601,30 +601,30 @@ |
4294 | OfEl = {xmlelement, "offline-messages", [], Els}, |
4295 | exmpp_xml:document_to_list(OfEl) |
4296 | end; |
4297 | - {ok, mod_offline_odbc} -> |
4298 | + {ok, odbc} -> |
4299 | ""; |
4300 | _E -> |
4301 | "" |
4302 | end; |
4303 | |
4304 | extract_user_info(private, Username, Host) -> |
4305 | - case loaded_module(Host,[mod_private,mod_private_odbc]) of |
4306 | - {ok, mod_private} -> |
4307 | + case loaded_module(Host, mod_private) of |
4308 | + {ok, mnesia} -> |
4309 | get_user_private_mnesia(Username, Host); |
4310 | - {ok, mod_private_odbc} -> |
4311 | + {ok, odbc} -> |
4312 | ""; |
4313 | _E -> |
4314 | "" |
4315 | end; |
4316 | |
4317 | extract_user_info(vcard, Username, Host) -> |
4318 | - case loaded_module(Host,[mod_vcard, mod_vcard_odbc, mod_vcard_odbc]) of |
4319 | - {ok, M} -> |
4320 | + case loaded_module(Host, mod_vcard) of |
4321 | + {ok, _DBType} -> |
4322 | From = To = jlib:make_jid(Username, Host, ""), |
4323 | SubelGet = {xmlelement, "vCard", [{"xmlns",?NS_VCARD}], []}, |
4324 | %%IQGet = #iq{type=get, xmlns=?NS_VCARD, payload=SubelGet}, % this is for 3.0.0 version |
4325 | IQGet = {iq, "", get, ?NS_VCARD, "" , SubelGet}, |
4326 | - Res = M:process_sm_iq(From, To, IQGet), |
4327 | + Res = mod_vcard:process_sm_iq(From, To, IQGet), |
4328 | %%[El] = Res#iq.payload, % this is for 3.0.0 version |
4329 | {iq, _, result, _, _, Els} = Res, |
4330 | case Els of |
4331 | |
4332 | === modified file 'src/ejabberd_rdbms.erl' |
4333 | --- src/ejabberd_rdbms.erl 2011-09-11 16:16:55 +0000 |
4334 | +++ src/ejabberd_rdbms.erl 2014-07-10 22:50:00 +0000 |
4335 | @@ -5,7 +5,7 @@ |
4336 | %%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net> |
4337 | %%% |
4338 | %%% |
4339 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4340 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4341 | %%% |
4342 | %%% This program is free software; you can redistribute it and/or |
4343 | %%% modify it under the terms of the GNU General Public License as |
4344 | |
4345 | === modified file 'src/ejabberd_receiver.erl' |
4346 | --- src/ejabberd_receiver.erl 2011-09-11 16:16:55 +0000 |
4347 | +++ src/ejabberd_receiver.erl 2014-07-10 22:50:00 +0000 |
4348 | @@ -5,7 +5,7 @@ |
4349 | %%% Created : 10 Nov 2003 by Alexey Shchepin <alexey@process-one.net> |
4350 | %%% |
4351 | %%% |
4352 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4353 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4354 | %%% |
4355 | %%% This program is free software; you can redistribute it and/or |
4356 | %%% modify it under the terms of the GNU General Public License as |
4357 | @@ -84,16 +84,16 @@ |
4358 | gen_server:cast(Pid, {change_shaper, Shaper}). |
4359 | |
4360 | reset_stream(Pid) -> |
4361 | - gen_server:call(Pid, reset_stream). |
4362 | + do_call(Pid, reset_stream). |
4363 | |
4364 | starttls(Pid, TLSSocket) -> |
4365 | - gen_server:call(Pid, {starttls, TLSSocket}). |
4366 | + do_call(Pid, {starttls, TLSSocket}). |
4367 | |
4368 | compress(Pid, ZlibSocket) -> |
4369 | - gen_server:call(Pid, {compress, ZlibSocket}). |
4370 | + do_call(Pid, {compress, ZlibSocket}). |
4371 | |
4372 | become_controller(Pid, C2SPid) -> |
4373 | - gen_server:call(Pid, {become_controller, C2SPid}). |
4374 | + do_call(Pid, {become_controller, C2SPid}). |
4375 | |
4376 | close(Pid) -> |
4377 | gen_server:cast(Pid, close). |
4378 | @@ -345,3 +345,11 @@ |
4379 | ok; |
4380 | close_stream(XMLStreamState) -> |
4381 | xml_stream:close(XMLStreamState). |
4382 | + |
4383 | +do_call(Pid, Msg) -> |
4384 | + case catch gen_server:call(Pid, Msg) of |
4385 | + {'EXIT', Why} -> |
4386 | + {error, Why}; |
4387 | + Res -> |
4388 | + Res |
4389 | + end. |
4390 | |
4391 | === modified file 'src/ejabberd_regexp.erl' |
4392 | --- src/ejabberd_regexp.erl 2012-01-08 11:45:38 +0000 |
4393 | +++ src/ejabberd_regexp.erl 2014-07-10 22:50:00 +0000 |
4394 | @@ -5,7 +5,7 @@ |
4395 | %%% Created : 8 Dec 2011 by Badlop |
4396 | %%% |
4397 | %%% |
4398 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4399 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4400 | %%% |
4401 | %%% This program is free software; you can redistribute it and/or |
4402 | %%% modify it under the terms of the GNU General Public License as |
4403 | |
4404 | === modified file 'src/ejabberd_router.erl' |
4405 | --- src/ejabberd_router.erl 2011-09-11 16:16:55 +0000 |
4406 | +++ src/ejabberd_router.erl 2014-07-10 22:50:00 +0000 |
4407 | @@ -5,7 +5,7 @@ |
4408 | %%% Created : 27 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
4409 | %%% |
4410 | %%% |
4411 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4412 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4413 | %%% |
4414 | %%% This program is free software; you can redistribute it and/or |
4415 | %%% modify it under the terms of the GNU General Public License as |
4416 | |
4417 | === modified file 'src/ejabberd_s2s.erl' |
4418 | --- src/ejabberd_s2s.erl 2012-01-08 11:45:38 +0000 |
4419 | +++ src/ejabberd_s2s.erl 2014-07-10 22:50:00 +0000 |
4420 | @@ -5,7 +5,7 @@ |
4421 | %%% Created : 7 Dec 2002 by Alexey Shchepin <alexey@process-one.net> |
4422 | %%% |
4423 | %%% |
4424 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4425 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4426 | %%% |
4427 | %%% This program is free software; you can redistribute it and/or |
4428 | %%% modify it under the terms of the GNU General Public License as |
4429 | |
4430 | === modified file 'src/ejabberd_s2s_in.erl' |
4431 | --- src/ejabberd_s2s_in.erl 2012-01-08 11:45:38 +0000 |
4432 | +++ src/ejabberd_s2s_in.erl 2014-07-10 22:50:00 +0000 |
4433 | @@ -5,7 +5,7 @@ |
4434 | %%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net> |
4435 | %%% |
4436 | %%% |
4437 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4438 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4439 | %%% |
4440 | %%% This program is free software; you can redistribute it and/or |
4441 | %%% modify it under the terms of the GNU General Public License as |
4442 | |
4443 | === modified file 'src/ejabberd_s2s_out.erl' |
4444 | --- src/ejabberd_s2s_out.erl 2011-10-03 20:27:12 +0000 |
4445 | +++ src/ejabberd_s2s_out.erl 2014-07-10 22:50:00 +0000 |
4446 | @@ -5,7 +5,7 @@ |
4447 | %%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net> |
4448 | %%% |
4449 | %%% |
4450 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4451 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4452 | %%% |
4453 | %%% This program is free software; you can redistribute it and/or |
4454 | %%% modify it under the terms of the GNU General Public License as |
4455 | |
4456 | === modified file 'src/ejabberd_service.erl' |
4457 | --- src/ejabberd_service.erl 2011-09-11 16:16:55 +0000 |
4458 | +++ src/ejabberd_service.erl 2014-07-10 22:50:00 +0000 |
4459 | @@ -5,7 +5,7 @@ |
4460 | %%% Created : 6 Dec 2002 by Alexey Shchepin <alexey@process-one.net> |
4461 | %%% |
4462 | %%% |
4463 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4464 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4465 | %%% |
4466 | %%% This program is free software; you can redistribute it and/or |
4467 | %%% modify it under the terms of the GNU General Public License as |
4468 | |
4469 | === modified file 'src/ejabberd_sm.erl' |
4470 | --- src/ejabberd_sm.erl 2011-10-03 20:27:12 +0000 |
4471 | +++ src/ejabberd_sm.erl 2014-07-10 22:50:00 +0000 |
4472 | @@ -5,7 +5,7 @@ |
4473 | %%% Created : 24 Nov 2002 by Alexey Shchepin <alexey@process-one.net> |
4474 | %%% |
4475 | %%% |
4476 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4477 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4478 | %%% |
4479 | %%% This program is free software; you can redistribute it and/or |
4480 | %%% modify it under the terms of the GNU General Public License as |
4481 | |
4482 | === modified file 'src/ejabberd_socket.erl' |
4483 | --- src/ejabberd_socket.erl 2011-09-11 16:16:55 +0000 |
4484 | +++ src/ejabberd_socket.erl 2014-07-10 22:50:00 +0000 |
4485 | @@ -5,7 +5,7 @@ |
4486 | %%% Created : 23 Aug 2006 by Alexey Shchepin <alexey@process-one.net> |
4487 | %%% |
4488 | %%% |
4489 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4490 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4491 | %%% |
4492 | %%% This program is free software; you can redistribute it and/or |
4493 | %%% modify it under the terms of the GNU General Public License as |
4494 | |
4495 | === modified file 'src/ejabberd_sup.erl' |
4496 | --- src/ejabberd_sup.erl 2011-09-11 16:16:55 +0000 |
4497 | +++ src/ejabberd_sup.erl 2014-07-10 22:50:00 +0000 |
4498 | @@ -5,7 +5,7 @@ |
4499 | %%% Created : 31 Jan 2003 by Alexey Shchepin <alexey@process-one.net> |
4500 | %%% |
4501 | %%% |
4502 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4503 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4504 | %%% |
4505 | %%% This program is free software; you can redistribute it and/or |
4506 | %%% modify it under the terms of the GNU General Public License as |
4507 | |
4508 | === modified file 'src/ejabberd_system_monitor.erl' |
4509 | --- src/ejabberd_system_monitor.erl 2011-09-11 16:16:55 +0000 |
4510 | +++ src/ejabberd_system_monitor.erl 2014-07-10 22:50:00 +0000 |
4511 | @@ -5,7 +5,7 @@ |
4512 | %%% Created : 21 Mar 2007 by Alexey Shchepin <alexey@process-one.net> |
4513 | %%% |
4514 | %%% |
4515 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4516 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4517 | %%% |
4518 | %%% This program is free software; you can redistribute it and/or |
4519 | %%% modify it under the terms of the GNU General Public License as |
4520 | |
4521 | === modified file 'src/ejabberd_tmp_sup.erl' |
4522 | --- src/ejabberd_tmp_sup.erl 2011-09-11 16:16:55 +0000 |
4523 | +++ src/ejabberd_tmp_sup.erl 2014-07-10 22:50:00 +0000 |
4524 | @@ -5,7 +5,7 @@ |
4525 | %%% Created : 18 Jul 2003 by Alexey Shchepin <alexey@process-one.net> |
4526 | %%% |
4527 | %%% |
4528 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4529 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4530 | %%% |
4531 | %%% This program is free software; you can redistribute it and/or |
4532 | %%% modify it under the terms of the GNU General Public License as |
4533 | |
4534 | === modified file 'src/ejabberd_update.erl' |
4535 | --- src/ejabberd_update.erl 2012-01-08 11:45:38 +0000 |
4536 | +++ src/ejabberd_update.erl 2014-07-10 22:50:00 +0000 |
4537 | @@ -5,7 +5,7 @@ |
4538 | %%% Created : 27 Jan 2006 by Alexey Shchepin <alexey@process-one.net> |
4539 | %%% |
4540 | %%% |
4541 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4542 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4543 | %%% |
4544 | %%% This program is free software; you can redistribute it and/or |
4545 | %%% modify it under the terms of the GNU General Public License as |
4546 | @@ -69,6 +69,7 @@ |
4547 | |
4548 | %% OTP R14B03 and older provided release_handler_1:eval_script/3 |
4549 | %% But OTP R14B04 and newer provide release_handler_1:eval_script/5 |
4550 | +%% Dialyzer reports a call to missing function; don't worry. |
4551 | eval_script(Script, Apps, LibDirs) -> |
4552 | case lists:member({eval_script, 5}, release_handler_1:module_info(exports)) of |
4553 | true -> |
4554 | @@ -141,21 +142,26 @@ |
4555 | release_handler_1:check_script( |
4556 | LowLevelScript, |
4557 | [{ejabberd, "", filename:join(Dir, "..")}]), |
4558 | - case Check of |
4559 | - ok -> |
4560 | - ?DEBUG("script: ~p~n", [Script]), |
4561 | - ?DEBUG("low level script: ~p~n", [LowLevelScript]), |
4562 | - ?DEBUG("check: ~p~n", [Check]); |
4563 | - {ok, []} -> |
4564 | - ?DEBUG("script: ~p~n", [Script]), |
4565 | - ?DEBUG("low level script: ~p~n", [LowLevelScript]), |
4566 | - ?DEBUG("check: ~p~n", [Check]); |
4567 | - _ -> |
4568 | - ?ERROR_MSG("script: ~p~n", [Script]), |
4569 | - ?ERROR_MSG("low level script: ~p~n", [LowLevelScript]), |
4570 | - ?ERROR_MSG("check: ~p~n", [Check]) |
4571 | - end, |
4572 | - {Script, LowLevelScript, Check}. |
4573 | + Check1 = case Check of |
4574 | + ok -> |
4575 | + %% This clause is for OTP R14B03 and older. |
4576 | + %% Newer Dialyzer reports a never match pattern; don't worry. |
4577 | + ?DEBUG("script: ~p~n", [Script]), |
4578 | + ?DEBUG("low level script: ~p~n", [LowLevelScript]), |
4579 | + ?DEBUG("check: ~p~n", [Check]), |
4580 | + ok; |
4581 | + {ok, []} -> |
4582 | + ?DEBUG("script: ~p~n", [Script]), |
4583 | + ?DEBUG("low level script: ~p~n", [LowLevelScript]), |
4584 | + ?DEBUG("check: ~p~n", [Check]), |
4585 | + ok; |
4586 | + _ -> |
4587 | + ?ERROR_MSG("script: ~p~n", [Script]), |
4588 | + ?ERROR_MSG("low level script: ~p~n", [LowLevelScript]), |
4589 | + ?ERROR_MSG("check: ~p~n", [Check]), |
4590 | + error |
4591 | + end, |
4592 | + {Script, LowLevelScript, Check1}. |
4593 | |
4594 | %% Copied from Erlang/OTP file: lib/sasl/src/systools.hrl |
4595 | -record(application, |
4596 | |
4597 | === modified file 'src/ejabberd_zlib/Makefile.win32' |
4598 | --- src/ejabberd_zlib/Makefile.win32 2009-01-15 19:44:58 +0000 |
4599 | +++ src/ejabberd_zlib/Makefile.win32 2014-07-10 22:50:00 +0000 |
4600 | @@ -29,8 +29,8 @@ |
4601 | LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(ZLIB_LIB)" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib |
4602 | |
4603 | $(DLL) : $(OBJECT) |
4604 | - $(LD) $(LD_FLAGS) -out:$(DLL) $(OBJECT) |
4605 | + $(LD) $(LD_FLAGS) -out:$@ $< |
4606 | |
4607 | $(OBJECT) : $(SOURCE) |
4608 | - $(CC) $(CC_FLAGS) -c -Fo$(OBJECT) $(SOURCE) |
4609 | + $(CC) $(CC_FLAGS) -c -Fo$@ $< |
4610 | |
4611 | |
4612 | === modified file 'src/ejabberd_zlib/ejabberd_zlib.erl' |
4613 | --- src/ejabberd_zlib/ejabberd_zlib.erl 2011-10-03 20:27:12 +0000 |
4614 | +++ src/ejabberd_zlib/ejabberd_zlib.erl 2014-07-10 22:50:00 +0000 |
4615 | @@ -5,7 +5,7 @@ |
4616 | %%% Created : 19 Jan 2006 by Alexey Shchepin <alexey@process-one.net> |
4617 | %%% |
4618 | %%% |
4619 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4620 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4621 | %%% |
4622 | %%% This program is free software; you can redistribute it and/or |
4623 | %%% modify it under the terms of the GNU General Public License as |
4624 | |
4625 | === modified file 'src/ejabberd_zlib/ejabberd_zlib_drv.c' |
4626 | --- src/ejabberd_zlib/ejabberd_zlib_drv.c 2012-01-08 11:45:38 +0000 |
4627 | +++ src/ejabberd_zlib/ejabberd_zlib_drv.c 2014-07-10 22:50:00 +0000 |
4628 | @@ -1,5 +1,5 @@ |
4629 | /* |
4630 | - * ejabberd, Copyright (C) 2002-2011 ProcessOne |
4631 | + * ejabberd, Copyright (C) 2002-2013 ProcessOne |
4632 | * |
4633 | * This program is free software; you can redistribute it and/or |
4634 | * modify it under the terms of the GNU General Public License as |
4635 | |
4636 | === modified file 'src/ejabberdctl.template' |
4637 | --- src/ejabberdctl.template 2011-10-03 20:27:12 +0000 |
4638 | +++ src/ejabberdctl.template 2014-07-10 22:50:00 +0000 |
4639 | @@ -143,6 +143,9 @@ |
4640 | # start server |
4641 | start () |
4642 | { |
4643 | + checknodenameusage |
4644 | + [ "$?" -eq 0 ] && echo "\nERROR: The node '$ERLANG_NODE' is already running." && return 1 |
4645 | + |
4646 | $EXEC_CMD "$ERL \ |
4647 | $NAME $ERLANG_NODE \ |
4648 | -noinput -detached \ |
4649 | @@ -189,6 +192,9 @@ |
4650 | # start interactive server |
4651 | live () |
4652 | { |
4653 | + checknodenameusage |
4654 | + [ "$?" -eq 0 ] && echo "\nERROR: The node '$ERLANG_NODE' is already running." && return 1 |
4655 | + |
4656 | echo "--------------------------------------------------------------------" |
4657 | echo "" |
4658 | echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode." |
4659 | @@ -362,6 +368,15 @@ |
4660 | return $status |
4661 | } |
4662 | |
4663 | +# check node name is used or not |
4664 | +# $? --> 0=alreadyused 1=available |
4665 | +checknodenameusage () |
4666 | +{ |
4667 | + $EXEC_CMD "$ERL \ |
4668 | + $NAME $ERLANG_NODE \ |
4669 | + -s erlang halt | grep -c duplicate_name > /dev/null " |
4670 | +} |
4671 | + |
4672 | case $ARGS in |
4673 | ' start') start;; |
4674 | ' debug') debug;; |
4675 | |
4676 | === modified file 'src/ejd2odbc.erl' |
4677 | --- src/ejd2odbc.erl 2011-09-11 16:16:55 +0000 |
4678 | +++ src/ejd2odbc.erl 2014-07-10 22:50:00 +0000 |
4679 | @@ -5,7 +5,7 @@ |
4680 | %%% Created : 22 Aug 2005 by Alexey Shchepin <alexey@process-one.net> |
4681 | %%% |
4682 | %%% |
4683 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4684 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4685 | %%% |
4686 | %%% This program is free software; you can redistribute it and/or |
4687 | %%% modify it under the terms of the GNU General Public License as |
4688 | @@ -34,15 +34,26 @@ |
4689 | export_last/2, |
4690 | export_vcard/2, |
4691 | export_vcard_search/2, |
4692 | - export_private_storage/2]). |
4693 | + export_vcard_xupdate/2, |
4694 | + export_private_storage/2, |
4695 | + export_privacy/2, |
4696 | + export_motd/2, |
4697 | + export_motd_users/2, |
4698 | + export_irc_custom/2, |
4699 | + export_sr_group/2, |
4700 | + export_sr_user/2, |
4701 | + export_muc_room/2, |
4702 | + export_muc_registered/2]). |
4703 | |
4704 | -include("ejabberd.hrl"). |
4705 | -include("jlib.hrl"). |
4706 | -include("mod_roster.hrl"). |
4707 | +-include("mod_privacy.hrl"). |
4708 | |
4709 | -record(offline_msg, {us, timestamp, expire, from, to, packet}). |
4710 | -record(last_activity, {us, timestamp, status}). |
4711 | -record(vcard, {us, vcard}). |
4712 | +-record(vcard_xupdate, {us, hash}). |
4713 | -record(vcard_search, {us, |
4714 | user, luser, |
4715 | fn, lfn, |
4716 | @@ -58,6 +69,13 @@ |
4717 | orgunit, lorgunit |
4718 | }). |
4719 | -record(private_storage, {usns, xml}). |
4720 | +-record(irc_custom, {us_host, data}). |
4721 | +-record(muc_room, {name_host, opts}). |
4722 | +-record(muc_registered, {us_host, nick}). |
4723 | +-record(sr_group, {group_host, opts}). |
4724 | +-record(sr_user, {us, group_host}). |
4725 | +-record(motd, {server, packet}). |
4726 | +-record(motd_users, {us, dummy = []}). |
4727 | |
4728 | -define(MAX_RECORDS_PER_TRANSACTION, 1000). |
4729 | |
4730 | @@ -74,7 +92,13 @@ |
4731 | export_passwd(Server, Output) -> |
4732 | export_common( |
4733 | Server, passwd, Output, |
4734 | - fun(Host, {passwd, {LUser, LServer}, Password} = _R) |
4735 | + fun(_Host, {passwd, {LUser, LServer}, {scram, _, _, _, _}} = _R) -> |
4736 | + ?INFO_MSG("You are trying to export the authentication " |
4737 | + "information of the account ~s@~s, but his password " |
4738 | + "is stored as SCRAM, and ejabberd ODBC authentication " |
4739 | + "doesn't support SCRAM.", [LUser, LServer]), |
4740 | + []; |
4741 | + (Host, {passwd, {LUser, LServer}, Password} = _R) |
4742 | when LServer == Host -> |
4743 | Username = ejabberd_odbc:escape(LUser), |
4744 | Pass = ejabberd_odbc:escape(Password), |
4745 | @@ -250,6 +274,20 @@ |
4746 | [] |
4747 | end). |
4748 | |
4749 | +export_vcard_xupdate(Server, Output) -> |
4750 | + export_common( |
4751 | + Server, vcard_xupdate, Output, |
4752 | + fun(Host, #vcard_xupdate{us = {LUser, LServer}, hash = Hash}) |
4753 | + when LServer == Host -> |
4754 | + Username = ejabberd_odbc:escape(LUser), |
4755 | + SHash = ejabberd_odbc:escape(Hash), |
4756 | + ["delete from vcard_xupdate where username='", Username, "';" |
4757 | + "insert into vcard_xupdate(username, hash) " |
4758 | + "values ('", Username, "', '", SHash, "');"]; |
4759 | + (_Host, _R) -> |
4760 | + [] |
4761 | + end). |
4762 | + |
4763 | export_private_storage(Server, Output) -> |
4764 | export_common( |
4765 | Server, private_storage, Output, |
4766 | @@ -265,6 +303,167 @@ |
4767 | [] |
4768 | end). |
4769 | |
4770 | +export_muc_room(Server, Output) -> |
4771 | + export_common( |
4772 | + Server, muc_room, Output, |
4773 | + fun(Host, #muc_room{name_host = {Name, RoomHost}, opts = Opts}) -> |
4774 | + case lists:suffix(Host, RoomHost) of |
4775 | + true -> |
4776 | + SName = ejabberd_odbc:escape(Name), |
4777 | + SRoomHost = ejabberd_odbc:escape(RoomHost), |
4778 | + SOpts = ejabberd_odbc:encode_term(Opts), |
4779 | + ["delete from muc_room where name='", SName, |
4780 | + "' and host='", SRoomHost, "';", |
4781 | + "insert into muc_room(name, host, opts) values (", |
4782 | + "'", SName, "', '", SRoomHost, "', '", SOpts, "');"]; |
4783 | + false -> |
4784 | + [] |
4785 | + end |
4786 | + end). |
4787 | + |
4788 | +export_muc_registered(Server, Output) -> |
4789 | + export_common( |
4790 | + Server, muc_registered, Output, |
4791 | + fun(Host, #muc_registered{us_host = {{U, S}, RoomHost}, nick = Nick}) -> |
4792 | + case lists:suffix(Host, RoomHost) of |
4793 | + true -> |
4794 | + SJID = ejabberd_odbc:escape( |
4795 | + jlib:jid_to_string( |
4796 | + jlib:make_jid(U, S, ""))), |
4797 | + SNick = ejabberd_odbc:escape(Nick), |
4798 | + SRoomHost = ejabberd_odbc:escape(RoomHost), |
4799 | + ["delete from muc_registered where jid='", SJID, |
4800 | + "' and host='", SRoomHost, "';" |
4801 | + "insert into muc_registered(jid, host, nick) values (" |
4802 | + "'", SJID, "', '", SRoomHost, "', '", SNick, "');"]; |
4803 | + false -> |
4804 | + [] |
4805 | + end |
4806 | + end). |
4807 | + |
4808 | +export_irc_custom(Server, Output) -> |
4809 | + export_common( |
4810 | + Server, irc_custom, Output, |
4811 | + fun(Host, #irc_custom{us_host = {{U, S}, IRCHost}, data = Data}) -> |
4812 | + case lists:suffix(Host, IRCHost) of |
4813 | + true -> |
4814 | + SJID = ejabberd_odbc:escape( |
4815 | + jlib:jid_to_string( |
4816 | + jlib:make_jid(U, S, ""))), |
4817 | + SIRCHost = ejabberd_odbc:escape(IRCHost), |
4818 | + SData = ejabberd_odbc:encode_term(Data), |
4819 | + ["delete from irc_custom where jid='", SJID, |
4820 | + "' and host='", SIRCHost, "';" |
4821 | + "insert into irc_custom(jid, host, data) values (" |
4822 | + "'", SJID, "', '", SIRCHost, "', '", SData, "');"]; |
4823 | + false -> |
4824 | + [] |
4825 | + end |
4826 | + end). |
4827 | + |
4828 | +export_privacy(Server, Output) -> |
4829 | + case ejabberd_odbc:sql_query( |
4830 | + jlib:nameprep(Server), |
4831 | + ["select id from privacy_list order by id desc limit 1;"]) of |
4832 | + {selected, ["id"], [{I}]} -> |
4833 | + put(id, list_to_integer(I)); |
4834 | + _ -> |
4835 | + put(id, 0) |
4836 | + end, |
4837 | + export_common( |
4838 | + Server, privacy, Output, |
4839 | + fun(Host, #privacy{us = {LUser, LServer}, |
4840 | + lists = Lists, |
4841 | + default = Default}) when LServer == Host -> |
4842 | + Username = ejabberd_odbc:escape(LUser), |
4843 | + if Default /= none -> |
4844 | + SDefault = ejabberd_odbc:escape(Default), |
4845 | + ["delete from privacy_default_list where ", |
4846 | + "username='", Username, "';", |
4847 | + "insert into privacy_default_list(username, name) ", |
4848 | + "values ('", Username, "', '", SDefault, "');"]; |
4849 | + true -> |
4850 | + [] |
4851 | + end ++ |
4852 | + lists:flatmap( |
4853 | + fun({Name, List}) -> |
4854 | + SName = ejabberd_odbc:escape(Name), |
4855 | + RItems = lists:map( |
4856 | + fun mod_privacy:item_to_raw/1, |
4857 | + List), |
4858 | + ID = integer_to_list(get_id()), |
4859 | + ["delete from privacy_list " |
4860 | + "where username='", Username, "' and name='", SName, "';" |
4861 | + "insert into privacy_list(username, name, id) " |
4862 | + "values ('", Username, "', '", SName, "', '", ID, "');", |
4863 | + "delete from privacy_list_data where id='", ID, "';" |
4864 | + |[["insert into privacy_list_data(" |
4865 | + "id, t, value, action, ord, match_all, match_iq, " |
4866 | + "match_message, match_presence_in, " |
4867 | + "match_presence_out) values ('", ID, "', '", |
4868 | + string:join(Items, "', '"), "');"] || Items <- RItems]] |
4869 | + end, Lists); |
4870 | + (_Host, _R) -> |
4871 | + [] |
4872 | + end). |
4873 | + |
4874 | +export_sr_group(Server, Output) -> |
4875 | + export_common( |
4876 | + Server, sr_group, Output, |
4877 | + fun(Host, #sr_group{group_host = {Group, LServer}, opts = Opts}) |
4878 | + when LServer == Host -> |
4879 | + SGroup = ejabberd_odbc:escape(Group), |
4880 | + SOpts = ejabberd_odbc:encode_term(Opts), |
4881 | + ["delete from sr_group where name='", Group, "';" |
4882 | + "insert into sr_group(name, opts) values ('", |
4883 | + SGroup, "', '", SOpts, "');"]; |
4884 | + (_Host, _R) -> |
4885 | + [] |
4886 | + end). |
4887 | + |
4888 | +export_sr_user(Server, Output) -> |
4889 | + export_common( |
4890 | + Server, sr_user, Output, |
4891 | + fun(Host, #sr_user{us = {U, S}, group_host = {Group, LServer}}) |
4892 | + when LServer == Host -> |
4893 | + SGroup = ejabberd_odbc:escape(Group), |
4894 | + SJID = ejabberd_odbc:escape( |
4895 | + jlib:jid_to_string( |
4896 | + jlib:jid_tolower( |
4897 | + jlib:make_jid(U, S, "")))), |
4898 | + ["delete from sr_user where jid='", SJID, |
4899 | + "'and grp='", Group, "';" |
4900 | + "insert into sr_user(jid, grp) values ('", |
4901 | + SJID, "', '", SGroup, "');"]; |
4902 | + (_Host, _R) -> |
4903 | + [] |
4904 | + end). |
4905 | + |
4906 | +export_motd(Server, Output) -> |
4907 | + export_common( |
4908 | + Server, motd, Output, |
4909 | + fun(Host, #motd{server = LServer, packet = El}) |
4910 | + when LServer == Host -> |
4911 | + ["delete from motd where username='';" |
4912 | + "insert into motd(username, xml) values ('', '", |
4913 | + ejabberd_odbc:escape(xml:element_to_binary(El)), "');"]; |
4914 | + (_Host, _R) -> |
4915 | + [] |
4916 | + end). |
4917 | + |
4918 | +export_motd_users(Server, Output) -> |
4919 | + export_common( |
4920 | + Server, motd_users, Output, |
4921 | + fun(Host, #motd_users{us = {LUser, LServer}}) |
4922 | + when LServer == Host, LUser /= "" -> |
4923 | + Username = ejabberd_odbc:escape(LUser), |
4924 | + ["delete from motd where username='", Username, "';" |
4925 | + "insert into motd(username, xml) values ('", |
4926 | + Username, "', '');"]; |
4927 | + (_Host, _R) -> |
4928 | + [] |
4929 | + end). |
4930 | + |
4931 | %%%---------------------------------------------------------------------- |
4932 | %%% Internal functions |
4933 | %%%---------------------------------------------------------------------- |
4934 | @@ -363,3 +562,8 @@ |
4935 | "'", Username, "'," |
4936 | "'", SJID, "'," |
4937 | "'", ejabberd_odbc:escape(Group), "')"] || Group <- Groups]. |
4938 | + |
4939 | +get_id() -> |
4940 | + ID = get(id), |
4941 | + put(id, ID+1), |
4942 | + ID+1. |
4943 | |
4944 | === modified file 'src/eldap/eldap.erl' |
4945 | --- src/eldap/eldap.erl 2012-01-08 11:45:38 +0000 |
4946 | +++ src/eldap/eldap.erl 2014-07-10 22:50:00 +0000 |
4947 | @@ -439,6 +439,7 @@ |
4948 | end; |
4949 | init({Hosts, Port, Rootdn, Passwd, Opts}) -> |
4950 | catch ssl:start(), |
4951 | + %% ssl:seed was removed in OTP R14B04, newer Dialyzer will complain |
4952 | catch ssl:seed(randoms:get_string()), |
4953 | Encrypt = case proplists:get_value(encrypt, Opts) of |
4954 | tls -> tls; |
4955 | @@ -760,7 +761,6 @@ |
4956 | %% {'EXIT', Reason} - Broke |
4957 | %%----------------------------------------------------------------------- |
4958 | recvd_packet(Pkt, S) -> |
4959 | - check_tag(Pkt), |
4960 | case asn1rt:decode('ELDAPv3', 'LDAPMessage', Pkt) of |
4961 | {ok,Msg} -> |
4962 | Op = Msg#'LDAPMessage'.protocolOp, |
4963 | @@ -873,7 +873,6 @@ |
4964 | %% {'EXIT', Reason} - Broken packet |
4965 | %%----------------------------------------------------------------------- |
4966 | recvd_wait_bind_response(Pkt, S) -> |
4967 | - check_tag(Pkt), |
4968 | case asn1rt:decode('ELDAPv3', 'LDAPMessage', Pkt) of |
4969 | {ok,Msg} -> |
4970 | ?DEBUG("~p", [Msg]), |
4971 | @@ -906,12 +905,6 @@ |
4972 | end. |
4973 | |
4974 | |
4975 | -%%% Sanity check of received packet |
4976 | -check_tag(Data) -> |
4977 | - {_Tag, Data1, _Rb} = asn1rt_ber_bin:decode_tag(Data), |
4978 | - {{_Len,_Data2}, _Rb2} = asn1rt_ber_bin:decode_length(Data1), |
4979 | - ok. |
4980 | - |
4981 | close_and_retry(S, Timeout) -> |
4982 | catch (S#eldap.sockmod):close(S#eldap.fd), |
4983 | Queue = dict:fold( |
4984 | |
4985 | === modified file 'src/eldap/eldap.hrl' |
4986 | --- src/eldap/eldap.hrl 2011-10-03 20:27:12 +0000 |
4987 | +++ src/eldap/eldap.hrl 2014-07-10 22:50:00 +0000 |
4988 | @@ -1,6 +1,6 @@ |
4989 | %%%---------------------------------------------------------------------- |
4990 | %%% |
4991 | -%%% ejabberd, Copyright (C) 2002-2011 ProcessOne |
4992 | +%%% ejabberd, Copyright (C) 2002-2013 ProcessOne |
4993 | %%% |
4994 | %%% This program is free software; you can redistribute it and/or |
4995 | %%% modify it under the terms of the GNU General Public License as |
4996 | |
4997 | === modified file 'src/eldap/eldap_filter.erl' |
4998 | --- src/eldap/eldap_filter.erl 2012-01-08 11:45:38 +0000 |
4999 | +++ src/eldap/eldap_filter.erl 2014-07-10 22:50:00 +0000 |
5000 | @@ -6,7 +6,7 @@ |