Skip to content

Commit

Permalink
Fix applied for directory issue - pending full test
Browse files Browse the repository at this point in the history
Preloading libpadsp.so (which is inherited from the parent shell) is the cause for the issues with smbd not displaying subdirectories, why? i don't know - either libpadsp.so contains conflicting symbols or it breaks the environment that smbd spawns in somehow.
  • Loading branch information
XK9274 committed Jul 2, 2023
1 parent 85ddeab commit bc3f576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 0 additions & 10 deletions static/build/.tmp_update/runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ main() {
check_switcher
set_startup_tab

samba_start_parent

# Main runtime loop
while true; do
state_change
Expand Down Expand Up @@ -564,7 +562,6 @@ start_networking() {

check_networking() {
if [ $deviceModel -ne 354 ] || [ ! -f /tmp/network_changed ]; then
samba_start_parent
check_timezone
return
fi
Expand All @@ -573,7 +570,6 @@ check_networking() {
$sysdir/script/network/update_networking.sh check

check_timezone
samba_start_parent
}

check_timezone() {
Expand All @@ -583,11 +579,5 @@ check_timezone() {
fi
}

samba_start_parent() {
if [ -f /tmp/smbd_kickstart ]; then
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/mnt/SDCARD/.tmp_update/lib/samba:/mnt/SDCARD/.tmp_update/lib/samba/private" /mnt/SDCARD/.tmp_update/bin/samba/sbin/smbd --no-process-group -D &
rm /tmp/smbd_kickstart
fi
}

main
5 changes: 3 additions & 2 deletions static/build/.tmp_update/script/network/update_networking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ check_smbdstate() {
mkdir -p /var/log/
fi

touch /tmp/smbd_kickstart # This lets runtime.sh handle it.. but only at boot and on exit of tweaks - If you start smbd here you lose sub-directory access
touch /tmp/network_changed
#unset preload or samba doesn't work correctly.
#dont env var all the libpaths for this shell, only the shell we open smbd in
LD_PRELOAD="" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/mnt/SDCARD/.tmp_update/lib/samba:/mnt/SDCARD/.tmp_update/lib/samba/private" /mnt/SDCARD/.tmp_update/bin/samba/sbin/smbd --no-process-group -D &

log "Samba: Starting smbd at exit of tweaks.."
else
Expand Down

0 comments on commit bc3f576

Please sign in to comment.