Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cmd/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ if [ ${CURRENT_NIX_INODE} -ne ${TARGET_NIX_INODE} ]; then
fi
{{ end }}

ln -s /proc/${CURRENT_PID}/root/ /proc/{{ .TARGET_PID }}/root/.cdebug-{{ .ID }}

export CDEBUG_ROOTFS=/.cdebug-{{ .ID }}
export CDEBUG_ROOTFS=/proc/${CURRENT_PID}/root/

cat > /.cdebug-entrypoint.sh <<EOF
#!/bin/sh
Expand Down
2 changes: 1 addition & 1 deletion cmd/exec/exec_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func runDebuggerKubernetes(ctx context.Context, cli cliutil.CLI, opts *options)

cli.PrintAux("Starting debugger container...\n")

useChroot := isRootUser(opts.user) && !isReadOnlyRootFS(pod, targetName) && !runsAsNonRoot(pod, targetName)
useChroot := isRootUser(opts.user) && !runsAsNonRoot(pod, targetName)
if err := runPodDebugger(
ctx,
cli,
Expand Down