summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-04-08 13:08:00 -0300
committerRenato Westphal <renato@opensourcerouting.org>2019-04-08 13:11:28 -0300
commit338b8e914ab1dc30f56f5bcbabd525d547bbc1ea (patch)
tree472af15e5b3fbdf331da8b18ff653cfa24fe2784 /lib/zclient.c
parent421ac5391f22b0659762b184c33c50ff302256ce (diff)
*: setting the socket send/recv buffer sizes doesn't need elevated privs
The less code running under elevated privileges the better. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 92a9d5ef31..e5cab9e0f2 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -212,10 +212,7 @@ int zclient_socket_connect(struct zclient *zclient)
return -1;
set_cloexec(sock);
-
- frr_elevate_privs(zclient->privs) {
- setsockopt_so_sendbuf(sock, 1048576);
- }
+ setsockopt_so_sendbuf(sock, 1048576);
/* Connect to zebra. */
ret = connect(sock, (struct sockaddr *)&zclient_addr, zclient_addr_len);