libutil: use GetUserNameExW to query user name on windows#1778
Conversation
|
Secur32.dll needs to be added to the blacklist |
You are right. Let's get that one merged |
|
ok rebase here on the master submodule, and its good to go |
24bfc7b to
a1762a3
Compare
|
the test failures don't look good - perhaps github actions don't like using that api function? perhaps |
|
I've found hints that this fails if the VM isn't fully set up. I guess you already tested it locally where it works? Other fall back to first and lastname: https://github.com/ubuntu/WSL/blob/cd4e23dfd0967745d46bb5d42302bf17f91e703c/DistroLauncher/WindowsUserInfo.cpp#L78-L101 I guess for us the old variant is good enough. |
a1762a3 to
265686b
Compare
|
Using commit on my private fork once again, so can't be merged until Return-To-The-Roots/libutil#36 gets merged and this PR updated. Let's see if new code helps.
I dunno, I get the feeling that if some environments don't support display names, then first/last names might be empty too. I think it's best to fall back to old stuff in case of failure. I've split it to separate fns to make the |
|
Agreed. Pr merged, can you update the submodule here? |
265686b to
2591322
Compare
Updates libutil submodule with Return-To-The-Roots/libutil#26
I guess this needs further updating after libutil is merged so that it points to proper commit hash