No need to expose +rx permissions for group and others, since only owner (root) is supposed to be able to connect. According to unix(7) manpage +w is needed to connect to a unix socket.
Signed-off-by: Pawel Wieczorkiewicz pwieczorkiewicz@suse.de --- teamd/teamd_usock.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/teamd/teamd_usock.c b/teamd/teamd_usock.c index 1fd3b66..967f68c 100644 --- a/teamd/teamd_usock.c +++ b/teamd/teamd_usock.c @@ -308,6 +308,13 @@ static int teamd_usock_sock_open(struct teamd_context *ctx) return -errno; }
+ err = fchmod(sock, 0700); + if (err == -1) { + teamd_log_err("usock: Failed to change socket permissions."); + err = -errno; + goto close_sock; + } + addr.sun_family = AF_UNIX; teamd_usock_get_sockpath(addr.sun_path, sizeof(addr.sun_path), ctx->team_devname);
Wed, Sep 09, 2015 at 02:20:30PM CEST, pwieczorkiewicz@suse.de wrote:
No need to expose +rx permissions for group and others, since only owner (root) is supposed to be able to connect. According to unix(7) manpage +w is needed to connect to a unix socket.
Signed-off-by: Pawel Wieczorkiewicz pwieczorkiewicz@suse.de
applied, thanks
libteam@lists.fedorahosted.org