-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mapping of create_options and granted_access #28
Comments
I'm not sure how to do that, but maybe take inspiration from the winfsp passthrough example? |
I did that already, but it seems not to be 100% complete or correct.
It failes at the last write operation (constrained write) with the error message bad file descriptor. Here the code to for open and creation which i seperated for better debugging.
When passing os.O_NOINHERIT also to the msvcrt in the open method, most office write operations will fail, the solution above, which is taken 1:1 from bills example works in all cases except this "saving old word files" problem. so I assume, something is missing here, but I can't find out what it is exactly. |
Problem adressed but still not solved. |
I see, so all you need is a way to serialize security descriptors in order to store them persistently right? In this case, exposing ConvertSecurityDescriptorToStringSecurityDescriptorW through a This has been already done for winfspy/src/_cffi_src/winfsp.cdef.h Lines 174 to 179 in 5c34d02
I can make a PR for that once you confirm that this is something useful to your usecase :) |
Confirmed ;) |
Thanks for the report :) |
0.8.1 solved the problem. |
This should be labelled as question.
When dealing with winfsp in fuse mode, open in operations will be called as
def open(self, path, flags):
in winfspy open looks like
def open(self, file_name, create_options, granted_access):
so far so good.
Now let's assume I have (a kind of) passthrough filesystem.
using fuse i can open the real file which is somewhere in the ntfs filesystem this way:
Means I get the access_flags and create_flags out of flags passed by the fuse operation open.
When create_options & CREATE_FILE_CREATE_OPTIONS.FILE_NON_DIRECTORY_FILE are not 0, I know to create a file by using
0x40000000 for access_flags and 0x4 for create_flags.
But I can''t find any valid mapping from CREATE_FILE_CREATE_OPTIONS to find the proper parameters for the winapi CreateFile method.
How can this be adressed ?
Or even asked the other way around, how can the create_options and granted_access flags from winfspy open operations be converted to flags which can be used with standard os.open() ?
The text was updated successfully, but these errors were encountered: