mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05: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
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));
|
TRY(Core::System::fcntl(socket_fd, F_SETFD, FD_CLOEXEC));
|
||||||
# endif
|
# 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));
|
TRY(Core::System::fchmod(socket_fd, 0600));
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue