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

Extended attributes problem with dangling symlinks #247

Closed
ekalin opened this issue Nov 12, 2016 · 1 comment
Closed

Extended attributes problem with dangling symlinks #247

ekalin opened this issue Nov 12, 2016 · 1 comment

Comments

@ekalin
Copy link

ekalin commented Nov 12, 2016

On a normal filesystem, this is what happens when one tries to list attributes in a dangling symlink:

$ ln -s inexistent_file.txt bad_link

$ attr -l bad_link
[No output]

$ attr -l inexistent_file.txt
attr_list: No such file or directory
Could not list "(null)" for inexistent_file.txt

But on an encfs mount, there is an error:

$ ln -s inexistent_file.txt bad_link

$ attr -l bad_link
attr_list: No such file or directory
Could not list "(null)" for bad_link

$ attr -l inexistent_file.txt
attr_list: No such file or directory
Could not list "(null)" for inexistent_file.txt

It seems that instead of calling llistxattr() (which lists xattrs from the link itself), listxattr() (which lists xattrs from the pointed-to file) is called instead. This is an strace from the "attr -l bad_link" command in a normal filesystem:

llistxattr("bad_link", "", 65536) = 0

And here's the strace of the encfs process of the same command in an encfs mount:

listxattr("/tmp/e/cryptstore/tTj5KY7uJx3Uf-PDeR0bIV7b", 0x1f7df80, 65536) = -1 ENOENT (No such file or directory)

@dinoboy197
Copy link
Contributor

I believe I'm seeing a manifestation of the same problem in #283 . @ekalin , can you reproduce my problem in #283?

@ekalin ekalin changed the title Extended attributes problem with symlinks Extended attributes problem with dangling symlinks Feb 11, 2017
rfjakob added a commit that referenced this issue Feb 20, 2017
Resolve xattrs for symlinks (resolves #247, resolves #283)
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

No branches or pull requests

2 participants