Your message dated Tue, 16 Oct 2007 14:32:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#446848: fixed in ejabberd 1.1.4-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: ejabberd
Version: 1.1.4-2
Severity: normal
Tags: patch

This is upstream bug EJAB-152, which has in the meantime been fixed for
the ejabbed-2.0.0 branch.

Upstream bug report URL:
https://support.process-one.net/browse/EJAB-152

Upstream bug fix URL:
https://forge.process-one.net/changelog/ejabberd/?cs=664

Quoted from SVN changeset #644:

* src/ejabberd_rdbms.erl: It is now possible to use ldap or
internal authentication with some other modules using relationnal
database storage (EJAB-152). Refactored relational databases
connections initialisation.
* src/ejabberd_auth_odbc.erl: Likewise. odbc supervisor startup is now
delegated to the ejabberd rdbms module.
* src/ejabberd_app.erl: Likewise.

Example configuration which does not work without this patch:
[...]
{auth_method, external}.
{extauth_program, "/path/to/authentication/script"}.
{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
{modules,
 [
  {mod_roster_odbc,     []},
  {mod_vcard_odbc,      []},
  {mod_offline_odbc,    []},
  {mod_last_odbc,       []},
[...]

A modified version of the patch, which does not include changes to $Id$
and $Revision$ VCS strings, and applies cleanly to ejabberd-1.1.4-2 is
attached.

Best regards,
Andreas Oberritter
[EJAB-152] - Relational databases can be used for modules when using non relational authentication

SVN changeset #664 (Fix version: ejabberd-2.0.0):
* src/ejabberd_rdbms.erl: It is now possible to use ldap or
internal authentication with some other modules using relationnal
database storage (EJAB-152). Refactored relational databases
connections initialisation.
* src/ejabberd_auth_odbc.erl: Likewise. odbc supervisor startup is now
delegated to the ejabberd rdbms module.
* src/ejabberd_app.erl: Likewise.

Index: trunk/src/ejabberd_rdbms.erl
===================================================================
diff -u -N
--- trunk/src/ejabberd_rdbms.erl	(revision 0)
+++ trunk/src/ejabberd_rdbms.erl	(revision 664)
@@ -0,0 +1,54 @@
+%%%----------------------------------------------------------------------
+%%% File    : ejabberd_rdbms.erl
+%%% Author  : Mickael Remond <[EMAIL PROTECTED]>
+%%% Purpose : Manage the start of the database modules when needed
+%%% Created : 31 Jan 2003 by Alexey Shchepin <[EMAIL PROTECTED]>
+%%% Id      : $Id: $
+%%%----------------------------------------------------------------------
+
+-module(ejabberd_rdbms).
+-author('[EMAIL PROTECTED]').
+-svn('$Revision: $ ').
+
+-export([start/0]).
+-include("ejabberd.hrl").
+
+start() ->
+    %% Check if ejabberd has been compiled with ODBC
+    case catch ejabberd_odbc_sup:module_info() of
+	{'EXIT',{undef,_}} ->
+	    ?INFO_MSG("ejabberd has not been compiled with relational database support. Skipping database startup.", []);
+	_ ->
+	    %% If compiled with ODBC, start ODBC on the needed host
+	    start_hosts()
+    end.
+
+%% Start relationnal DB module on the nodes where it is needed
+start_hosts() ->
+    lists:foreach(
+      fun(Host) ->
+	      case needs_odbc(Host) of
+		  true  -> start_odbc(Host);
+		  false -> ok
+	      end
+      end, ?MYHOSTS).
+
+%% Start the ODBC module on the given host
+start_odbc(Host) ->
+    ChildSpec =
+	{gen_mod:get_module_proc(Host, ejabberd_odbc_sup),
+	 {ejabberd_odbc_sup, start_link, [Host]},
+	 temporary,
+	 infinity,
+	 supervisor,
+	 [ejabberd_odbc_sup]},
+    supervisor:start_child(ejabberd_sup, ChildSpec).
+
+%% Returns true if we have configured odbc_server for the given host
+needs_odbc(Host) ->
+    LHost = jlib:nameprep(Host),
+    case ejabberd_config:get_local_option({odbc_server, LHost}) of
+	undefined ->
+	    false;
+	_ -> true
+    end.
Index: trunk/src/ejabberd_auth_odbc.erl
===================================================================
diff -u -N -r598 -r664
--- trunk/src/ejabberd_auth_odbc.erl	(.../ejabberd_auth_odbc.erl)	(revision 598)
+++ trunk/src/ejabberd_auth_odbc.erl	(.../ejabberd_auth_odbc.erl)	(revision 664)
@@ -34,14 +34,6 @@
 %%% API
 %%%----------------------------------------------------------------------
 start(Host) ->
-    ChildSpec =
-	{gen_mod:get_module_proc(Host, ejabberd_odbc_sup),
-	 {ejabberd_odbc_sup, start_link, [Host]},
-	 temporary,
-	 infinity,
-	 supervisor,
-	 [ejabberd_odbc_sup]},
-    supervisor:start_child(ejabberd_sup, ChildSpec),
     ejabberd_ctl:register_commands(
       Host,
       [{"registered-users", "list all registered users"}],
Index: trunk/src/ejabberd_app.erl
===================================================================
diff -u -N -r510 -r664
--- trunk/src/ejabberd_app.erl	(.../ejabberd_app.erl)	(revision 510)
+++ trunk/src/ejabberd_app.erl	(.../ejabberd_app.erl)	(revision 664)
@@ -29,6 +29,7 @@
     gen_mod:start(),
     ejabberd_config:start(),
     Sup = ejabberd_sup:start_link(),
+    ejabberd_rdbms:start(),
     ejabberd_auth:start(),
     cyrsasl:start(),
     % Profiling

--- End Message ---
--- Begin Message ---
Source: ejabberd
Source-Version: 1.1.4-3

We believe that the bug you reported is fixed in the latest version of
ejabberd, which is due to be installed in the Debian FTP archive:

ejabberd_1.1.4-3.diff.gz
  to pool/main/e/ejabberd/ejabberd_1.1.4-3.diff.gz
ejabberd_1.1.4-3.dsc
  to pool/main/e/ejabberd/ejabberd_1.1.4-3.dsc
ejabberd_1.1.4-3_i386.deb
  to pool/main/e/ejabberd/ejabberd_1.1.4-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sergei Golovan <[EMAIL PROTECTED]> (supplier of updated ejabberd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 16 Oct 2007 10:34:07 +0400
Source: ejabberd
Binary: ejabberd
Architecture: source i386
Version: 1.1.4-3
Distribution: unstable
Urgency: low
Maintainer: Torsten Werner <[EMAIL PROTECTED]>
Changed-By: Sergei Golovan <[EMAIL PROTECTED]>
Description: 
 ejabberd   - Distributed, fault-tolerant Jabber/XMPP server written in Erlang
Closes: 446848
Changes: 
 ejabberd (1.1.4-3) unstable; urgency=low
 .
   * Applied a patch by upstream which fixes usage of relational databases in
     ejabberd modules while using internal or LDAP-based authentication
     (closes: #446848). The patch was adopted from ejabberd SVN by Andreas
     Oberritter.
Files: 
 9c4875a2c15141045d64b06ac633e4f6 854 net optional ejabberd_1.1.4-3.dsc
 1c056a7b6a1738e9802a58a6c0134ed4 56466 net optional ejabberd_1.1.4-3.diff.gz
 da03b51d495b64920de6a858562f888f 910848 net optional ejabberd_1.1.4-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHFMpkIcdH02pGEFIRArIxAJ94pCgm8TvlDHfQyhdPDUs0sUnpHACeONOW
C8Bs59REd/YXH7LfyScumi0=
=nn45
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to