commit | f34bb9fccc5017bce03e0a0446cc145e8424054b | [log] [tgz] |
---|---|---|
author | JoeyShapiro <joeyashapiro@gmail.com> | Sun May 05 01:47:56 2024 +0000 |
committer | Gopher Robot <gobot@golang.org> | Thu May 09 17:46:52 2024 +0000 |
tree | e965b21d2b77a152737aa88dd483085561ec3c78 | |
parent | 6dfb94eaa3bd0fcaa615f58e915f7214ce078beb [diff] |
windows: add net user enum In the go windows package, you can get user information by using `NetUserGetInfo` along with a specified level. However, there is no way to get a list of the users. The only options are to 1. know the users, 2. brute force users, or 3. use an external tool or command (`net users`). I suggest adding a function that implements the windows api for `NetUserEnum`. This will allow a built in way to enumerate users and follow the standard. A side note is that I used `buf **byte` because it is how the others are done, but using `buf *byte` works just as well. Change-Id: Ifcc916659eb1d796175cd18acd2e81f2661bfcd2 GitHub-Last-Rev: 3d01bca920d95280311d47b8e6a9b91d472bea98 GitHub-Pull-Request: golang/sys#190 Reviewed-on: https://go-review.googlesource.com/c/sys/+/578475 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Auto-Submit: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run go get -u golang.org/x/sys
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/sys
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.