Skip to content
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

x/sys/windows/registry: way to get ACL #26828

Open
slaharip opened this issue Aug 6, 2018 · 5 comments
Open

x/sys/windows/registry: way to get ACL #26828

slaharip opened this issue Aug 6, 2018 · 5 comments
Labels
FeatureRequest help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@slaharip
Copy link

slaharip commented Aug 6, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

Go 1.10.3

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

GOHOSTARCH=amd64
GOHOSTOS=windows

What did you do?

Using registry package to access the registry keys, values and their ACLs

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

NA

What did you see instead?

NA

@ianlancetaylor
Copy link
Contributor

I'm not sure but I think this is a feature request for golang.org/x/sys/windows/registry: provide some way to find the ACL of a key. I don't know if that is meaningful or not. If I'm wrong, please clarify.

@ianlancetaylor ianlancetaylor changed the title Way to get Registry ACL x/sys/windows/registry: way to get ACL Aug 6, 2018
@gopherbot gopherbot added this to the Unreleased milestone Aug 6, 2018
@ianlancetaylor ianlancetaylor added OS-Windows NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted FeatureRequest labels Aug 6, 2018
@slaharip
Copy link
Author

slaharip commented Aug 6, 2018

Yes, I am checking if there is/or isn't an equivalent of RegGetKeySecurity function in golang that retrieves the security descriptor protecting the specified open registry key.

@alexbrainman
Copy link
Member

I am checking if there is/or isn't an equivalent of RegGetKeySecurity function in golang that retrieves the security descriptor protecting the specified open registry key.

There is no equivalent of RegGetKeySecurity. No one asked for it yet. Adding all functionality to read and write ACLs won't be trivial job.

But you could call Windows RegGetKeySecurity directly - golang.org/x/sys/windows/registry.Key is just a Windows handle, so you can pass it to appropriate Windows function.

Alex

@iamoryanmoshe
Copy link
Contributor

If this is a wanted feature I can give it a look, seems like adding the winapi deceleration to sys/windows/registry/syscall.go, and adding GetACL and SetACL methods to sys/windows/registry/key.go

@alexbrainman
Copy link
Member

adding GetACL and SetACL methods to sys/windows/registry/key.go

I don't see how adding just 2 new methods will do here. What API addition did you have in mind?

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

5 participants