Age | Commit message (Collapse) | Author |
|
We'd still use the invalid errno for a return value. Rework
the code to simply return the right error right away.
|
|
Currently socket_address_listen() calls mac_selinux_bind() to bind a UNIX
socket and checks its return value and errno for EADDRINUSE. This is not
correct. When there's an SELinux context change made for the new socket,
bind() is not the last function called in mac_selinux_bind(). In that
case the last call is setfscreatecon() from libselinux which can change
errno as it uses access() to check if /proc/thread-self is available.
It fails on kernels before 3.17 and errno is set to ENOENT.
It's safe to check only the return value at it's set to -errno.
|
|
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
|
|
core: Add flexible way to provide socket type
the socket type should be a diffrent argumet
in make_socket_fd . In this way we can set the socket
type like SOCK_STREAM SOCK_DGRAM in the address.
journal-remote: modify make_socket_fd
|
|
My previous patch to only include what we use accidentially placed
the added inlcudes in non-sorted order.
|
|
This is a cleaned up result of running iwyu but without forward
declarations on src/basic.
|
|
|
|
There are more than enough to deserve their own .c file, hence move them
over.
|
|
Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier.
|
|
bind() fails if it is called before setting SO_REUSEPORT and another
process is already binded to the same addess.
A new reuse_port option has been introduced to socket_address_listen()
to set the option as part of socket initialization.
|
|
basic/ can be used by everything
cannot use anything outside of basic/
libsystemd/ can use basic/
cannot use shared/
shared/ can use libsystemd/
|