diff mbox series

[pseudo,06/11] ports/unix: fts_open: Fix chroot behavior

Message ID 1777312601-1393-7-git-send-email-mark.hatle@kernel.crashing.org
State New
Headers show
Series Various fixes, release 1.9.6 | expand

Commit Message

Mark Hatle April 27, 2026, 5:56 p.m. UTC
From: Mark Hatle <mark.hatle@amd.com>

The fts_open wrapper was resolving paths via PSEUDO_ROOT_PATH into
rpath_argv, but then used path_argv in the real_fts_open call.
Switch this to using the pseudo processed root paths.

AI-Generated: AI was used to identify the source of the issue - github copilot (claude opus 4.6)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
 ports/unix/guts/fts_open.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ports/unix/guts/fts_open.c b/ports/unix/guts/fts_open.c
index ccc9322..6acdf9b 100644
--- a/ports/unix/guts/fts_open.c
+++ b/ports/unix/guts/fts_open.c
@@ -42,7 +42,8 @@ 
 		errno = ENOMEM;
 		rc = NULL;
 	} else {
-		rc = real_fts_open(path_argv, options, compar);
+		rpath_argv[args] = NULL;
+		rc = real_fts_open(rpath_argv, options, compar);
 	}
 	for (i = 0; i < args; ++i)
 		free(rpath_argv[i]);