Skip to content

glog: avoid calling user.Current() on windows (#69) - #7

Merged
hankji merged 1 commit into
hankji:masterfrom
golang:master
Jul 17, 2024
Merged

glog: avoid calling user.Current() on windows (#69)#7
hankji merged 1 commit into
hankji:masterfrom
golang:master

Conversation

@hankji

@hankji hankji commented Jul 17, 2024

Copy link
Copy Markdown
Owner

Use the current process token to look up the user's name on Windows.

This is more reliable than using the USER or USERNAME environment variables, which are not always set, or might be overridden by the user accidentally or maliciously.

It follows the implementation of the user.Current() implementation in the standard library.

cl/650142356 (google-internal)

Use the current process token to look up the user's name on Windows.

This is more reliable than using the USER or USERNAME environment variables, which are not always set, or might be overridden by the user accidentally or
maliciously.

It follows the implementation of the user.Current() implementation in the
standard library.

cl/650142356 (google-internal)
@hankji
hankji merged commit 5641cab into hankji:master Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants