Home
last modified time | relevance | path

Searched hist:bfd03046d18776ea70785ca1ef36dfc60822de3b (Results 1 – 7 of 7) sorted by relevance

/freebsd/lib/libsys/
H A Dchmod.2diff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
/freebsd/tests/sys/kern/
H A Dunix_dgram.cdiff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
/freebsd/share/man/man4/
H A Dunix.4diff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
/freebsd/sys/sys/
H A Dunpcb.hdiff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
H A Dprotosw.hdiff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
/freebsd/sys/kern/
H A Dsys_socket.cdiff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361
H A Duipc_usrreq.cdiff bfd03046d18776ea70785ca1ef36dfc60822de3b Sun Nov 03 15:39:32 CET 2024 Mark Johnston <markj@FreeBSD.org> unix: Add support for atomically setting the socket mode

With this patch, it is possible to call fchmod() on a unix socket prior
to binding it to the filesystem namespace, so that the mode is set
atomically. Without this, one has to call chmod() after bind(), leaving
a window where threads can connect to the socket with the default mode.
After bind(), fchmod() reverts to failing with EINVAL.

This interface is copied from Linux.

The behaviour of fstat() is unmodified, i.e., it continues to return the
mode as set by soo_stat().

PR: 282393
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47361