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

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

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

hankji
Copy link
Owner

@hankji hankji commented Jul 17, 2024

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