Status of SO_PASSCRED in Linux compatibility

James Alastair McLaughlin (PGR) j.a.mclaughlin at newcastle.ac.uk
Wed Aug 16 02:02:21 UTC 2017


Dear all,


I've been attempting to run Visual Studio Code[1] in an Ubuntu 16.04 chroot. VS Code is built using Electron, which is basically a minimal chromium to enable building desktop applications using web technology.


While I was able to install VS Code and all its dependencies in my chroot, I'm now stuck with the following error on attempting to run it:


    [5269:0816/001320.918234:FATAL:zygote_host_impl_linux.cc(140)] Check failed: base::UnixDomainSocket::EnableReceiveProcessId(fds[0]).


After investigating the Chromium source code, I've found that the EnableReceiveProcessId function calls setsockopt(2) with the SOL_SOCKET level and the option name SO_PASSCRED.  This fails because SO_PASSCRED Is not implemented in the Linux socket compatibility layer[2].


After some googling, I've found a patch[3] from 2010 to implement SO_PASSCRED that it seems has never been merged.  Does anyone know why, and if there are any plans to merge it?


Thanks,


James



[1] https://github.com/Microsoft/vscode

[2] https://github.com/freebsd/freebsd/blob/5451804107bd7fd8ab0fccba0293f3def6ccf0be/sys/compat/linux/linux_socket.c

[3] https://people.freebsd.org/~nox/linux-so_passcred.patch<https://people.freebsd.org/%7Enox/linux-so_passcred.patch>




More information about the freebsd-current mailing list