You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On FreeBSD, mod_notionflux fails on start (xmessage opens mentioning an invalid argument error) because of an invalid arg related to the listening socket. start_listening tries to fchmod the newly created socket but on FreeBSD this always fails. The manpage for fchmod says:
[EINVAL] The fd argument refers to a socket, not to a file.
The following (hacky) patch fixes the issue and mod_notionflux seems to start up fine.
While this should be fine from a security standpoint since we're wrapping the socket into a secured temporary directory, it still feels suboptimal until now that it's coming back to me that FreeBSD doesn't support permissions on socket files no matter whether per chmod or fchmod.
This fchmod is weird - it happens right after socket() - so this fd is a completely new socket and isn't associated with a path yet and so it makes perfect sense that the fchmod would fail. Note that the chmod after we bind the socket (a few lines later) succeeds.
wilhelmy
added a commit
to wilhelmy/notion
that referenced
this issue
Feb 24, 2023
On FreeBSD, mod_notionflux fails on start (xmessage opens mentioning an invalid argument error) because of an invalid arg related to the listening socket.
start_listening
tries to fchmod the newly created socket but on FreeBSD this always fails. The manpage for fchmod says:The following (hacky) patch fixes the issue and mod_notionflux seems to start up fine.
The text was updated successfully, but these errors were encountered: