From 1146a81a64374332289b1acebfe172e161f3a957 Mon Sep 17 00:00:00 2001 From: Robert Langhammer Date: Mon, 21 Dec 2020 18:25:47 +0100 Subject: [PATCH] treewide: Update webui password on password change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the password is changed via SSH, the web UI still used the old password until uhttpd is restart. Fix it by forcing uhttpd restart when passwd is called. Fixes: #11 (gitea) Signed-off-by: Robert Langhammer Reviewed-by: Christian Dresel Reviewed-by: Fabian Bläse [add commit message] Signed-off-by: Adrian Schmutzler --- bsp/default/root_file_system/etc/profile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bsp/default/root_file_system/etc/profile b/bsp/default/root_file_system/etc/profile index 4bfa5c50..0e9ad14f 100644 --- a/bsp/default/root_file_system/etc/profile +++ b/bsp/default/root_file_system/etc/profile @@ -13,6 +13,9 @@ export HOME=${HOME:-/root} [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } +# update uhttpd passwd on passwd-change +[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd && /etc/init.d/uhttpd restart; } + # I'm lazy, let's add some aliases alias ..='cd ..' alias ...='cd ../..' @@ -22,4 +25,4 @@ alias ll='ls -alF' alias ls='ls --color=auto' # and color my prompt -export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' \ No newline at end of file +export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '