fix: get hidden/archive/system porps on file #107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I read samba's source code carefully and found them placed the hidden/archive/system porps in the execution flag.
So we can infer the original attribute value from these flags.
The correspondence is as follows:
File has default 644 permission mask but directory has default 755 permission mask
So directory cant determine weather has hidden/archive/system porps
Source: https://gitlab.com/samba-team/samba/-/blob/84b5440eb4f3c10e2729e916d097f5af07150dcd/source3/libsmb/libsmb_stat.c#L67
By the way, I also found the reason why the
system.dos_attr.mode
change from dos permissions mask to unix permission mask.https://gitlab.com/samba-team/samba/-/commit/0fe9dc521#64c7de226f297840d2892b1c3d76cc68a56fbc72
This is one bug, and I have proposed merge request to the samba team to solve this problem.
https://gitlab.com/samba-team/samba/-/merge_requests/2056
I appreciate you checking the code and merging as soon as possible. Because my nextcloud urgently needs this part of the fix. Thanks!