[ejabberd] Importing roaster from piefxis

David Mohr damailings at mcbf.net
Thu Dec 2 00:02:24 MSK 2010


On Wed, 2010-12-01 at 00:58 +0100, Badlop wrote:
> 2010/11/30 David Mohr <damailings at mcbf.net>:
> > # ejabberdctl import_piefxis ~/david.xml
> >
> > =INFO REPORT==== 30-Nov-2010::22:58:49 ===
> > D(<4605.501.0>:ejabberd_commands:314) : Executing command
> > ejabberd_piefxis:import_file with Args=["/root/david.xml"]
> > ** at node ejabberd at seeker **
> > Problem 'error badarg' occurred executing the command.
> > Stacktrace: [{erlang,binary_to_list,[none]},
> >             {ejabberd_piefxis,add_user,2},
> >             {ejabberd_piefxis,process_element,2},
> >             {lists,foldl,3},
> >             {ejabberd_piefxis,read_chunks,2},
> >             {ejabberd_piefxis,import_file,2},
> >             {ejabberd_ctl,call_command,3},
> >             {ejabberd_ctl,try_call_command,3}]
> >
> > So this looks to me like it's trying to create the user when all I want
> > is to import the roster.
> 
> Right. I imagine in your XML, the User element doesn't contain the
> Password attribute.

That's correct, since it's not available in the source jabber server.

> > How else can I import a roaster while using
> > ldap for authentication?
> 
> I've implemented support for your case.
> You can apply this patch to your ejabberd source code:
> https://git.process-one.net/ejabberd/mainline/commit/955343f6aae5224e215181f826350a0d5e2def1f
> Then try again to import your file.

For some strange reason the patch didn't apply against 2.1.5, but since
it wasn't very large I applied it manually.

Works nicely, thank you for writing it Badlop!

~David


More information about the ejabberd mailing list