Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct: use /proc/self/fd to read xattrs #366

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

giuseppe
Copy link
Member

instead of using the lgetxattr and llistxattr system calls on the
entire file path, use the /proc/self/fd/$FD/$RELATIVE_PATH path
instead so that the lookup is relative to the lower dir file
descriptor that is already open.

Closes: #364

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

direct.c Outdated Show resolved Hide resolved
Copy link
Contributor

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Otherthan one doubt above.

instead of using the lgetxattr and llistxattr system calls on the
entire file path, use the /proc/self/fd/$FD/$RELATIVE_PATH path
instead so that the lookup is relative to the lower dir file
descriptor that is already open.

Closes: containers#364

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@flx42
Copy link

flx42 commented Jul 29, 2022

I confirm that this patch fixes the issue I'm seeing in #364, thanks!

@rhatdan
Copy link
Member

rhatdan commented Jul 29, 2022

lgtm

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.

Possible regression when lower layer is under the target mountpoint
4 participants