Skip to content

x/sys/windows: get Windows services status without all access permissions #48777

@powersj

Description

@powersj

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

$ go version
go version go1.17.1 windows/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env

What did you do?

By default, the Connect and OpenService calls will both attempt to run with the SERVICE_ALL_ACCESS option. This is, as the name implies, elevated permissions.

What did you expect to see?

It would be preferable if the permission level could optionally be set by the user to something like GENERIC_READ. For example, if the user only wants to get the state of services and not stop/start them, then limiting the user to the lowest level of permissions required would be preferred.

What did you see instead?

Any action requires the use of the SERVICE_ALL_ACCESS permission level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions