Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1294)

Issue 8541047: code review 8541047: os/user: faster user lookup on Windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by snaury
Modified:
10 years, 11 months ago
Reviewers:
brainman
CC:
golang-dev, bradfitz, lucio
Visibility:
Public.

Description

os/user: faster user lookup on Windows Trying to lookup user's display name with directory services can take several seconds when user's computer is not in a domain. As a workaround, check if computer is joined in a domain first, and don't use directory services if it is not. Additionally, don't leak tokens in user.Current(). Fixes issue 5298.

Patch Set 1 #

Patch Set 2 : diff -r 58f8a30f5b78 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 58f8a30f5b78 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Patch Set 6 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Patch Set 7 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Patch Set 8 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Total comments: 2

Patch Set 9 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Patch Set 10 : diff -r 60242cfc12c3 https://code.google.com/p/go/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -26 lines) Patch
M src/pkg/os/user/lookup_windows.go View 1 2 3 4 5 6 7 8 2 chunks +53 lines, -26 lines 0 comments Download
M src/pkg/syscall/security_windows.go View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 1 comment Download
M src/pkg/syscall/zsyscall_windows_386.go View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M src/pkg/syscall/zsyscall_windows_amd64.go View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 27
snaury
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years ago (2013-04-17 16:29:28 UTC) #1
bradfitz
The issue discussed a Windows API to ask whether your computer was part of a ...
11 years ago (2013-04-17 16:30:38 UTC) #2
snaury
On 2013/04/17 16:30:38, bradfitz wrote: > The issue discussed a Windows API to ask whether ...
11 years ago (2013-04-17 16:50:09 UTC) #3
bradfitz
On Wed, Apr 17, 2013 at 9:50 AM, <snaury@gmail.com> wrote: > On 2013/04/17 16:30:38, bradfitz ...
11 years ago (2013-04-17 16:53:46 UTC) #4
snaury
On 2013/04/17 16:53:46, bradfitz wrote: > Let's figure out what's the correct behavior first, and ...
11 years ago (2013-04-17 17:07:42 UTC) #5
brainman
On 2013/04/17 16:50:09, snaury wrote: > > ..., if machine is part of a domain ...
11 years ago (2013-04-18 01:51:56 UTC) #6
snaury
On 2013/04/18 01:51:56, brainman wrote: > What about using NetGetJoinInformation Oh! It's actually very interesting! ...
11 years ago (2013-04-18 04:13:41 UTC) #7
lucio
Out of curiosity from somebody who seldom uses Windows, what goes wrong if one does ...
11 years ago (2013-04-18 04:20:19 UTC) #8
brainman
On 2013/04/18 04:13:41, snaury wrote: > > Maybe we don't even have to compare any ...
11 years ago (2013-04-18 04:43:52 UTC) #9
brainman
On 2013/04/18 04:20:19, lucio wrote: > ... what goes > wrong if one does an ...
11 years ago (2013-04-18 04:47:01 UTC) #10
lucio
On 4/18/13, alex.brainman@gmail.com <alex.brainman@gmail.com> wrote: > On 2013/04/18 04:20:19, lucio wrote: >> ... what goes ...
11 years ago (2013-04-18 04:52:18 UTC) #11
brainman
On 2013/04/18 04:52:18, lucio wrote: > > > If that is a quick response, ...
11 years ago (2013-04-18 05:05:41 UTC) #12
lucio
The I guess it does precisely what snaury is trying to do and, in all ...
11 years ago (2013-04-18 05:42:25 UTC) #13
snaury
Hello golang-dev@googlegroups.com, bradfitz@golang.org, alex.brainman@gmail.com, lucio.dere@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-04-22 19:48:21 UTC) #14
snaury
Hello golang-dev@googlegroups.com, bradfitz@golang.org, alex.brainman@gmail.com, lucio.dere@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-04-22 20:10:55 UTC) #15
brainman
I think you made mistake with pointers. Your NetGetJoinInformation call always fails with "The parameter ...
11 years ago (2013-04-23 00:59:25 UTC) #16
snaury
Hello golang-dev@googlegroups.com, bradfitz@golang.org, alex.brainman@gmail.com, lucio.dere@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years ago (2013-04-23 05:40:18 UTC) #17
snaury
On 2013/04/23 00:59:25, brainman wrote: > Please, accept my changes. Done. > pc is not ...
11 years ago (2013-04-23 05:43:41 UTC) #18
brainman
LGTM Thank you very much. We are not permitted to submit now, so leaving it ...
11 years ago (2013-04-24 07:00:58 UTC) #19
brainman
Any more reviews? Can I submit now? Alex
10 years, 11 months ago (2013-05-15 02:57:21 UTC) #20
bradfitz
https://codereview.appspot.com/8541047/diff/33001/src/pkg/syscall/security_windows.go File src/pkg/syscall/security_windows.go (right): https://codereview.appspot.com/8541047/diff/33001/src/pkg/syscall/security_windows.go#newcode62 src/pkg/syscall/security_windows.go:62: // do not reorder If these are constants defined ...
10 years, 11 months ago (2013-05-15 03:20:56 UTC) #21
bradfitz
Submit away once you're happy with it. I left one comment, which you can fix ...
10 years, 11 months ago (2013-05-15 03:21:26 UTC) #22
brainman
*** Submitted as https://code.google.com/p/go/source/detail?r=2cf178b97603 *** os/user: faster user lookup on Windows Trying to lookup user's ...
10 years, 11 months ago (2013-05-15 03:25:09 UTC) #23
brainman
On 2013/05/15 03:20:56, bradfitz wrote: > If these are constants defined elsewhere (i.e. in Windows ...
10 years, 11 months ago (2013-05-15 03:29:58 UTC) #24
bradfitz
I would slightly prefer they all be changed. To me (and I think to others?), ...
10 years, 11 months ago (2013-05-15 03:36:09 UTC) #25
brainman
On 2013/05/15 03:36:09, bradfitz wrote: > > To me (and I think to others?), "iota" ...
10 years, 11 months ago (2013-05-15 03:40:29 UTC) #26
bradfitz
10 years, 11 months ago (2013-05-15 03:42:43 UTC) #27
On Tue, May 14, 2013 at 8:40 PM, <alex.brainman@gmail.com> wrote:

> On 2013/05/15 03:36:09, bradfitz wrote:
>
>  To me (and I think to others?), "iota" generally means "I want some
>>
> unique
>
>> numbers, but I don't really care what they are".
>>
>
>
> I disagree. If "iota" means "... I don't really care what they are", why
> does Go allows "1 + iota" and "1 << iota" and such?
>

I disagree but I would prefer this thread end and the code remain unchanged.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b