]> git.proxmox.com Git - mirror_frr.git/commit
zebra: raise the privileges before calling socket()
authorMichal Sekletar <msekleta@redhat.com>
Fri, 16 May 2014 14:13:43 +0000 (14:13 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 27 May 2014 17:50:45 +0000 (19:50 +0200)
commit8e998b1eb5fea53f2a2eddd9f7f2b8ab004406f3
tree95b756ddc86e043189c49a930a016051128c949b
parent000e157c852653288c5a1e6d0dee821c1765d315
zebra: raise the privileges before calling socket()

Because of recent changes when creating AF_NETLINK socket, kernel will
cache capabilities of the caller and if file descriptor is used or
otherwise handed to another process it will check that current user has
necessary capabilities to use the socket. Hence we need to ensure we
have necessary capabilities when creating the socket and at the time we
use the socket.

See: http://www.spinics.net/lists/netdev/msg280198.html

Signed-off-by: Michal Sekletar <msekleta@redhat.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra/rt_netlink.c