From e7bc372d777d323eaea50a88469b6a421d8d81be Mon Sep 17 00:00:00 2001
From: Matthew Wild <mwild1@gmail.com>
Date: Sat, 7 Jul 2012 02:32:39 +0100
Subject: usermanager: Pass session on to auth provider (missing half of commit
 0545a574667b) (thanks Zash)

---
 core/usermanager.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/usermanager.lua b/core/usermanager.lua
index 50aee701..3aba5786 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -91,8 +91,8 @@ function delete_user(username, host)
 	return hosts[host].users.delete_user(username);
 end
 
-function get_sasl_handler(host)
-	return hosts[host].users.get_sasl_handler();
+function get_sasl_handler(host, session)
+	return hosts[host].users.get_sasl_handler(session);
 end
 
 function get_provider(host)
-- 
cgit v1.2.3


From d7bbafcd372997dbec05e0dec67c1da41968050f Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sat, 7 Jul 2012 03:42:31 +0200
Subject: mod_auth_anonymous: Attach a fake roster to the session, so the null
 storage backend can be used

---
 plugins/mod_auth_anonymous.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua
index c080177d..3cb7cf98 100644
--- a/plugins/mod_auth_anonymous.lua
+++ b/plugins/mod_auth_anonymous.lua
@@ -32,9 +32,10 @@ function new_default_provider(host)
 		return nil, "Account creation/modification not supported.";
 	end
 
-	function provider.get_sasl_handler()
+	function provider.get_sasl_handler(session)
 		local anonymous_authentication_profile = {
 			anonymous = function(sasl, username, realm)
+				session.roster = {}; -- so that the null storage backend doesn't upset rostermanager
 				return true; -- for normal usage you should always return true here
 			end
 		};
-- 
cgit v1.2.3