-
Notifications
You must be signed in to change notification settings - Fork 116
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
There's no way to tell what security new files should be created with #139
Comments
Ah congratulation ! If you could improve also the mirror and make a PR, it would be very appreciate ❤️ It is true that currently this is not passed by c# createfile 😮 ! https://github.com/dokan-dev/dokan-dotnet/blob/master/DokanNet/DokanOperationProxy.cs#L272 The param is type of Haven't look yet if this can be made or not. Do you think you can look into it ? |
I'm currently busy with being behind on a final-year university project (the thing I'm making my VFS for), so much as I'd like to, I don't have a huge amount of time to go investigating a perfect solution to all the interesting issues of open-source projects I find, unfortunately. It might go on my long list of things to do once I graduate. Additionally, I'm having issues unsetting the I'm also not sure how big an issue this actually is. I think the effective access I'm getting is the same, but it's enough to upset winfstest, and enough for me to feel it's not quite ready for a PR. Maybe it would be a good idea for Dokan.NET to provide helper functions which wrap behaviour which VFSes are likely to need, but can't get in C#. |
@AnyOldName3 Helper sounds to be a good idea |
@Liryna, @AnyOldName3 |
@magol will try to help you on this if you have any questions or if find some time 😢 |
@Liryna I havn't test it, but can FileStream.SetAccessControl be used for setting The question is how we get the |
Yes, exact @magol ! There is also directly the constructor that has the param: https://msdn.microsoft.com/en-us/library/ms143397(v=vs.110).aspx Yes we will need to change the IDokanOperations as you said. There is already SetFileSecurityProxy that make the conversion. We should probably just move it to a helper and use it in ZwCreateFileProxy to create the proper |
If we change the I have looked at
|
@Liryna Can you please take a look and see if you can see what is wrong. |
Hi @magol , Thank you for looking into it 👍 I have made some changes on your structs to make marshal work:
UNICODE_STRING:
But an error happen during call of |
@Liryna Thanks for fixing the struct. Is it any other way to get the size? |
@magol your call seems to be alright but during debug I seen that the point was null and the documentation of A null check should be added and see if with a normal call |
You could change the API in IDokanOperations, but I think there might be a better way to do it: make a method in DokanFileInfo that returns the correct ACL to create the file with. (This is defined as 'the ACL created by SeAssignSecurity() called from the kernel driver'.) This would go alongside the GetRequestor() method that's already there. I realize that this further separates the C# API from the C/C++ API, but honestly there's a lot more that should be altered if it's really supposed to be using C# idioms. (My goal with suggesting this is to decrease the number of breaking changes that filesystem creators need to deal with. I've already got one breaking change that I can't actually fix right now, because I use Keybase and they're dragging their heels on updating KeybaseFS to a newer version of Dokan.) Anyway, do you think the creation of another method (or two) in DokanFileInfo might be an acceptable approach to address this particular issue, until 2.0 comes out? |
In my VFS, I've got what seems to be a better implementation of
GetFileSecurity
andSetFileSecurity
than the Mirror sample includes, meaning that I get closer results to what winfstest expects in the10.t
(security and permissions) test set. However, it attempts to create new files with specific DACLs, and this information is not relayed to me via Dokan.NET, so I'm limited in what I can do to resolve this.If a
FileSystemSecurity
object was passed toCreateFile
, then I could get this set of tests to pass (and provide the necessary changes to the mirror sample).The text was updated successfully, but these errors were encountered: