diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-01-25 22:56:56 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-01-25 22:56:56 +0100 |
commit | 22e2bfb09667e167a93b5eca4487ac41669126d9 (patch) | |
tree | 010c6259160d051247389bed9348eb163511d2c9 /modules/luci-base/root/usr/libexec | |
parent | 18b1130711b6ff7aacba98034e2bd7f4893b33df (diff) |
luci-base: explicitly invoke busybox applet for password change
Ensure to invoke the Busybox `passwd` applet to change the system password
in a non-interactive manner. Non-Busybox variants may not take the new
password input from stdin or use password hashes which are not supported
by musl's `crypt()` implementation by default.
Fixes: #5629
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/root/usr/libexec')
-rwxr-xr-x | modules/luci-base/root/usr/libexec/rpcd/luci | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index dccdbee900..d17a7cf40e 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -447,7 +447,7 @@ local methods = { call = function(args) local util = require "luci.util" return { - result = (os.execute("(echo %s; sleep 1; echo %s) | passwd %s >/dev/null 2>&1" %{ + result = (os.execute("(echo %s; sleep 1; echo %s) | /bin/busybox passwd %s >/dev/null 2>&1" %{ luci.util.shellquote(args.password), luci.util.shellquote(args.password), luci.util.shellquote(args.username) |