NamedPipeServerStream.Unix: GetImpersonationUserName tweaks. (#88125)
authorTom Deseyn <tom.deseyn@gmail.com>
Thu, 29 Jun 2023 03:17:38 +0000 (05:17 +0200)
committerGitHub <noreply@github.com>
Thu, 29 Jun 2023 03:17:38 +0000 (23:17 -0400)
commitf99ebea4a94fd113d44618d57281c6b60158bf86
tree1f891da53b18a2851425b58ad6fa8275531147c3
parentcfae69f62414b68e4c98dd3b294154baabf58a5a
NamedPipeServerStream.Unix: GetImpersonationUserName tweaks. (#88125)

* NamedPipeServerStream.Unix: GetImpersonationUserName tweaks.

When the user name is not found, return an empty string like Environment.UserName.

Add EINTR handling.

* Remove GetNameFromUid and use GetUserNameFromPasswd.
src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPeerUserName.cs [deleted file]
src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs
src/native/libs/System.Native/entrypoints.c
src/native/libs/System.Native/pal_networking.c
src/native/libs/System.Native/pal_networking.h
src/native/libs/System.Native/pal_networking_wasi.c