-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add security_attributes() to windows::OpenOptionsExt #314
Comments
And how would we define a stable |
I think the easiest thing to do would be to define it as a pointer and let the ecosystem decide on how to wrap it in a nicer API. However, the problem with that is it would make An alternative might be to have Another alternative would be for Tbh, my thought is to just use a pointer on nightly and let the ecosystem figure out the hard questions. Before stabilizing we can revisit the problem and look at how people are using it. |
A solution could be to use the capability of a SecurityDescriptor to be serialized as a String to provide a safe interface using the documentation for the SDDL then internally create the pointer. Thus it would be possible to provide a safe interface over it. |
Considering all the low-level, platform-specific plumbing required to construct a |
Proposal
Problem statement
There is currently no means, using std::fs, to provide SECURITY_ATTRIBUTES when opening a file. A private implementation of OpenOptions do have a
security_attributes
function but it is not expose through theOpenOptionExt
trait. In order to provide a SECURITY_ATTRIBUTES, one must use thewindows
crate directly calling C ffi bindings.Motivating examples or use cases
Solution sketch
Extends OpenOptionsExt for windows
Links and related work
windows_security.go
Design issue
The main design issue I see is how to provide a safe way to create security attributes.
The text was updated successfully, but these errors were encountered: