fixed setting unix socket permissions
first call fchmod() to prevent TOCTTOU, then apply permissions using chmod()
This commit is contained in:
@@ -32,6 +32,10 @@ class SocketAddress;
|
||||
/**
|
||||
* Creates a socket listening on the specified address. This is a
|
||||
* shortcut for socket(), bind() and listen().
|
||||
* When a unix socket is created (domain == AF_UNIX), its
|
||||
* permissions will be stripped down to prevent unauthorized
|
||||
* access. The caller is responsible to apply proper permissions
|
||||
* at a later point.
|
||||
*
|
||||
* Throws #std::system_error on error.
|
||||
*
|
||||
|
Reference in New Issue
Block a user