Currently for the target board remote-gdbserver-on-localhost we use the
gdbserver file on build, using a file name which includes "/../".
Fix this by using a normalized file name instead.
This allows us to be more restrictive about which files REMOTE_TARGET_USERNAME
can access:
...
- remote_exec build "chmod go-rx $objdir/outputs"
+ remote_exec build "chmod go-rx $objdir"
...
Tested on x86_64-linux.
set_board_info compiler "[find_gcc]"
# Test the copy of gdbserver in the build directory.
-set_board_info gdb_server_prog "[pwd]/../../gdbserver/gdbserver"
+set_board_info gdb_server_prog \
+ "[file normalize [pwd]/../../gdbserver/gdbserver]"
# gdbserver does not intercept target file operations and perform them
# on the host.
# We're pretending that some local user account is remote target.
# Make things a bit more realistic by restricting file permissions.
- # Make sure remote target can't see files on build. Note that we're
- # currently using $objdir/output instead of $objdir because of gdbserver
- # being accessed on the target using $objdir/../../gdbserver/gdbserver.
- remote_exec build "chmod go-rx $objdir/outputs"
+ # Make sure remote target can't see files on build.
+ remote_exec build "chmod go-rx $objdir"
# Make sure build can't see files on remote target. We can't use
# remote_exec target, because we're in the middle of parsing the