Skip to content

syscall: use O_PATH for held directory traversal - #1065

Open
FusionPow wants to merge 1 commit into
RsyncProject:masterfrom
FusionPow:issue-1064-search-only-dirfds
Open

syscall: use O_PATH for held directory traversal#1065
FusionPow wants to merge 1 commit into
RsyncProject:masterfrom
FusionPow:issue-1064-search-only-dirfds

Conversation

@FusionPow

Copy link
Copy Markdown

Use O_PATH on Linux for directory descriptors used only for path traversal, fchdir(), or as *at() parents. Reopen final directory endpoints with the caller-requested access mode and retain the existing O_RDONLY fallback elsewhere.

Add coverage for exact sources and readable descendants beneath search-only directories, known-file creation beneath write/search-only destinations, and retained refusal to enumerate unreadable directories.

Fixes #1064.

Use O_PATH on Linux for directory descriptors used only for path
traversal, fchdir(), or as *at() parents. Reopen final directory
endpoints with the caller-requested access mode and retain the existing
O_RDONLY fallback elsewhere.

Add coverage for exact sources and readable descendants beneath
search-only directories, known-file creation beneath write/search-only
destinations, and retained refusal to enumerate unreadable directories.

Fixes RsyncProject#1064.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rsync still requires read permission for search-only directories

1 participant