• Lubomir I. Ivanov (VMware)'s avatar
    os/user: obtain a user GID on Windows · 2a16176a
    Lubomir I. Ivanov (VMware) authored
    Add the following helpers in lookup_windows.go:
    1) lookupGroupName() is used to obtain the SID of a group based
    on name.
    2) listGroupsForUsernameAndDomain() uses NetUserGetLocalGroups()
    as a WINAPI backend to obtain the list of local groups for this
    user.
    3) lookupUserPrimaryGroup() is now used to populate the User.Gid
    field when looking up a user by name.
    
    Implement listGroups(), lookupGroupId(), lookupGroup() and no longer
    return unimplemented errors.
    
    Do not skip Windows User.Gid tests in user_test.go.
    
    Change-Id: I81fd41b406da51f9a4cb24e50d392a333df81141
    GitHub-Last-Rev: d1448fd55d6eaa0f41bf347df18b40da06791df1
    GitHub-Pull-Request: golang/go#24222
    Reviewed-on: https://go-review.googlesource.com/98137Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
    Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    2a16176a
Name
Last commit
Last update
..
registry Loading commit data...
sysdll Loading commit data...
exec_windows_test.go Loading commit data...
mksyscall.go Loading commit data...
psapi_windows.go Loading commit data...
reparse_windows.go Loading commit data...
security_windows.go Loading commit data...
syscall_windows.go Loading commit data...
zsyscall_windows.go Loading commit data...