Skip to content

Fix an empty path bug with most file -at syscall handlers#3661

Merged
stevenengler merged 2 commits intoshadow:mainfrom
stevenengler:fstatat
Sep 23, 2025
Merged

Fix an empty path bug with most file -at syscall handlers#3661
stevenengler merged 2 commits intoshadow:mainfrom
stevenengler:fstatat

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

Fixes #3659.

I haven't noticed a bug regarding this, but it seems wrong to treat
files we store in memory and files without a valid OS fd as the current
working directory.

This change doesn't fix the behaviour, but returns an error instead of
doing the wrong thing.
@stevenengler stevenengler added this to the Support missing syscalls milestone Sep 21, 2025
@stevenengler stevenengler self-assigned this Sep 21, 2025
@github-actions github-actions bot added Component: Testing Unit and integration tests and frameworks Component: Main Composing the core Shadow executable labels Sep 21, 2025
These didn't properly handle an empty path.

I didn't fix 'regularfile_linkat' and 'regularfile_renameat2', and
instead just left TODOs.
@github-actions github-actions bot added the Component: Documentation In-repository documentation, under docs/ label Sep 21, 2025
@stevenengler stevenengler requested a review from a team September 21, 2025 02:20
@stevenengler stevenengler merged commit 0eefc4a into shadow:main Sep 23, 2025
24 checks passed
@stevenengler stevenengler deleted the fstatat branch September 23, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fstatat and similar syscalls return wrong value when path name is empty

2 participants