mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Kill duplicated code in connection_listener_new()
This commit is contained in:
parent
78956f5d85
commit
62f297fff0
@ -1234,18 +1234,10 @@ connection_listener_new(const struct sockaddr *listensockaddr,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (type == CONN_TYPE_CONTROL_LISTENER &&
|
if ((type == CONN_TYPE_CONTROL_LISTENER &&
|
||||||
options->ControlSocketsGroupWritable) {
|
options->ControlSocketsGroupWritable) ||
|
||||||
/* We need to use chmod; fchmod doesn't work on sockets on all
|
(type == CONN_TYPE_AP_LISTENER &&
|
||||||
* platforms. */
|
options->SocksSocketsGroupWritable)) {
|
||||||
if (chmod(address, 0660) < 0) {
|
|
||||||
log_warn(LD_FS,"Unable to make %s group-writable.", address);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == CONN_TYPE_AP_LISTENER &&
|
|
||||||
options->SocksSocketsGroupWritable) {
|
|
||||||
/* We need to use chmod; fchmod doesn't work on sockets on all
|
/* We need to use chmod; fchmod doesn't work on sockets on all
|
||||||
* platforms. */
|
* platforms. */
|
||||||
if (chmod(address, 0660) < 0) {
|
if (chmod(address, 0660) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user