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
Discussion: Set Drvfs metadata support from user mode #6
Comments
I don't know WSL internals. I didn't looking disassemble of WSL. This test done with Build 17134. Even though metadata mount option is added, the reason why you do not see those EAs is may using a filesystem that does not support EA. |
One naive question, why do you allocate maximum memory of UCHAR/USHORT in
I've tried to apply those EA ($LXUID, $LXGID) with |
There is no particularly important reason. In the future, I thought that it would be troublesome if the required buffer size changed. I'm lazy. |
Did you include the buffer size for the null-terminated character? https://msdn.microsoft.com/en-us/library/cc232069.aspx
And MAXIMUM_LENGTH_OF_EA_NAME of my code is not enough when using all 255 characters. I have to fix it. |
That one byte is not a problem during
After |
Oh, it was my mistake in seeing. sizeof(FILE_FULL_EA_INFORMATION) + strlen(eaName) + eaValueLength // Enough, include EaName[1]
offsetof(FILE_FULL_EA_INFORMATION, EaName) + strlen(eaName) + eaValueLength // Not enough |
Is there any security mechanism in kernel that restricts any arbritary extended attributes to be added with a file? |
I only know deny FILE_WRITE_EA of NTFS ACL. |
I've successfully ad those three metadata from user mode with |
Have you heard that NTFS stores very small data directly in the MFT? |
I don't know. |
Continuing discussion from commit 025e881 :
I've found thoose extended attributes (EA) in LxCore.sys driver. Those are configured with
ZwSetEaFile()
but the buffer length is84
bytes. Here is a screenshot of LxCore driver in IDA:I mount D:\ drive with
mount -o metadata,uid=1000,gid=1000
but I can't get those EA inZwQueryEaFile()
. Can you provide some details about how can I get/query those EA withZwQueryEaFile()
with STATUS_SUCCESS?The text was updated successfully, but these errors were encountered: