mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibSQL: Don't try to fchmod() socket on GNU/Hurd
Because of the way sockets are implemented, a local socket object inside pflocal has little to do with the filesystem node that has an ifsock translator sitting on it; and the latter doesn't even exist until you bind() the socket. So it's not possible to set the socket's mode using Unix-level APIs (other than by temporarily changing umask). It's still possible to do this with Mach-level APIs, essentially doing the same thing as glibc's bind() implementation does, but supplying the desired mode instead of 0666, but let's not go there.
This commit is contained in:
parent
c64c199ab7
commit
1205f29a40
Notes:
sideshowbarker
2024-07-17 03:27:40 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/1205f29a40 Pull-request: https://github.com/SerenityOS/serenity/pull/22752 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/Hendiadyoin1
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ static ErrorOr<int> create_database_socket(ByteString const& socket_path)
|
|||
TRY(Core::System::fcntl(socket_fd, F_SETFD, FD_CLOEXEC));
|
||||
# endif
|
||||
|
||||
# if !defined(AK_OS_BSD_GENERIC)
|
||||
# if !defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_GNU_HURD)
|
||||
TRY(Core::System::fchmod(socket_fd, 0600));
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue