aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-23 01:30:58 +0100
committerKim Alvefur <zash@zash.se>2017-03-23 01:30:58 +0100
commit597d3174276ee35ac59a7eb2109469126d054310 (patch)
tree8907b93b95ab3e10a7e3fc7aaef48a769cd190b0 /util
parent6e9e2d5167ba8b5261b2038bb9360f06681e9483 (diff)
parent711e2c8713466ff5fa8d1ed29dcf04d6e2b6e0da (diff)
downloadprosody-597d3174276ee35ac59a7eb2109469126d054310.tar.gz
prosody-597d3174276ee35ac59a7eb2109469126d054310.zip
Merge 0.10->trunk
Diffstat (limited to 'util')
-rw-r--r--util/datamanager.lua26
-rw-r--r--util/dependencies.lua2
2 files changed, 8 insertions, 20 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 2b47c3c4..b825cb33 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -24,8 +24,10 @@ local t_insert = table.insert;
local t_concat = table.concat;
local envloadfile = require"util.envload".envloadfile;
local serialize = require "util.serialization".serialize;
-local path_separator = assert ( package.config:match ( "^([^\n]+)" ) , "package.config not in standard form" ) -- Extract directory seperator from package.config (an undocumented string that comes with lua)
local lfs = require "lfs";
+-- Extract directory seperator from package.config (an undocumented string that comes with lua)
+local path_separator = assert ( package.config:match ( "^([^\n]+)" ) , "package.config not in standard form" )
+
local prosody = prosody;
local raw_mkdir = lfs.mkdir;
@@ -130,15 +132,8 @@ local function load(username, host, datastore)
-- No such file, ok to ignore
return nil;
end
- local mode = lfs.attributes(getpath(username, host, datastore), "mode");
- if not mode then
- log("debug", "Assuming empty %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
- return nil;
- else -- file exists, but can't be read
- -- TODO more detailed error checking and logging?
- log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
- return nil, "Error reading storage";
- end
+ log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
+ return nil, "Error reading storage";
end
local success, ret = pcall(data);
@@ -304,15 +299,8 @@ local function list_load(username, host, datastore)
-- No such file, ok to ignore
return nil;
end
- local mode = lfs.attributes(getpath(username, host, datastore, "list"), "mode");
- if not mode then
- log("debug", "Assuming empty %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
- return nil;
- else -- file exists, but can't be read
- -- TODO more detailed error checking and logging?
- log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
- return nil, "Error reading storage";
- end
+ log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil");
+ return nil, "Error reading storage";
end
local success, ret = pcall(data);
diff --git a/util/dependencies.lua b/util/dependencies.lua
index 38aced70..9b0afd77 100644
--- a/util/dependencies.lua
+++ b/util/dependencies.lua
@@ -93,7 +93,7 @@ local function check_dependencies()
if not ssl then
missingdep("LuaSec", {
- ["Debian/Ubuntu"] = "https://prosody.im/download/start#debian_and_ubuntu";
+ ["Debian/Ubuntu"] = "sudo apt-get install lua-sec";
["luarocks"] = "luarocks install luasec";
["Source"] = "https://github.com/brunoos/luasec";
}, "SSL/TLS support will not be available");