We need:
-
A new
sm_presence_inhook to track the presence of contacts fromejabberd_sm. The existingcaps_addandcaps_updatehooks could be removed. -
A global table (distributed across the cluster) that maps the
FullJIDof an
| import gleam/list | |
| const credentials = [ | |
| #("alice", "l0vesBob"), | |
| #("bob", "l0vesAlice"), | |
| #("eve", "stalksTh3m")] | |
| pub type StoreType { | |
| Plain | |
| External |
| #include <err.h> | |
| #include <inttypes.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <arpa/inet.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> |
| #include <err.h> | |
| #include <inttypes.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <arpa/inet.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> |
| #include <err.h> | |
| #include <inttypes.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <arpa/inet.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> |
| -module(example_app). | |
| -behaviour(application). | |
| -export([start/2, prep_stop/1, stop/1]). | |
| -spec start(application:start_type(), any()) -> {ok, pid()} | {error, term()}. | |
| start(_StartType, _StartArgs) -> | |
| case example_sup:start_link() of | |
| {ok, _PID} = Res -> | |
| ok = systemd:ready(), | |
| Res; |
| #!/usr/bin/env python | |
| # | |
| # By Holger Weiss, based on a script provided by Stefan Karlsson. | |
| # | |
| """ | |
| Log in with two resources and have each of them send a never-ending message | |
| flood to the other one. | |
| 1. Install SleekXMPP, e.g. on Debian: |
| From [email protected] Mon Sep 17 00:00:00 2001 | |
| From: Holger Weiss <[email protected]> | |
| Date: Mon, 14 Apr 2014 17:10:49 +0200 | |
| Subject: [PATCH] Pass client IP address to authentication script | |
| --- | |
| src/ejabberd_auth.erl | 10 +++++++++- | |
| src/ejabberd_auth_external.erl | 34 +++++++++++++++++++--------------- | |
| src/ejabberd_c2s.erl | 2 +- | |
| src/extauth.erl | 11 +++++++++-- |
| diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl | |
| index 057c60a..eb98943 100644 | |
| --- a/src/ejabberd_s2s.erl | |
| +++ b/src/ejabberd_s2s.erl | |
| @@ -207,6 +216,31 @@ try_register(FromTo) -> | |
| dirty_get_connections() -> | |
| mnesia:dirty_all_keys(s2s). | |
| +check_peer_certificate(SockMod, Sock, Peer) -> | |
| + case SockMod:get_peer_certificate(Sock) of |