From dffa9c57fee931e4de53e3ae955d632dcd77a42d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 21 Oct 2019 08:43:07 +0200 Subject: luci-mod-system: sshkeys.js: create authorized_keys as 0600 Fixes: #3226 Signed-off-by: Jo-Philipp Wich --- .../luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js') diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js index 84a1d64878..05d41b0dde 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js @@ -117,7 +117,7 @@ function renderKeys(keys) { } function saveKeys(keys) { - return fs.write('/etc/dropbear/authorized_keys', keys.join('\n') + '\n') + return fs.write('/etc/dropbear/authorized_keys', keys.join('\n') + '\n', 384 /* 0600 */) .then(renderKeys.bind(this, keys)) .catch(function(e) { L.ui.addNotification(null, E('p', e.message)) }) .finally(L.ui.hideModal); -- cgit v1.2.3