mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 09:30:30 +00:00
ldpd: fix issues detected by Coverity Scan
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
77e17a6ae5
commit
af7e63a357
10
ldpd/lde.c
10
ldpd/lde.c
@ -80,10 +80,6 @@ static zebra_capabilities_t _caps_p [] =
|
|||||||
|
|
||||||
static struct zebra_privs_t lde_privs =
|
static struct zebra_privs_t lde_privs =
|
||||||
{
|
{
|
||||||
#if defined(FRR_USER) && defined(FRR_GROUP)
|
|
||||||
.user = FRR_USER,
|
|
||||||
.group = FRR_GROUP,
|
|
||||||
#endif
|
|
||||||
#if defined(VTY_GROUP)
|
#if defined(VTY_GROUP)
|
||||||
.vty_group = VTY_GROUP,
|
.vty_group = VTY_GROUP,
|
||||||
#endif
|
#endif
|
||||||
@ -164,10 +160,8 @@ void
|
|||||||
lde_init(struct ldpd_init *init)
|
lde_init(struct ldpd_init *init)
|
||||||
{
|
{
|
||||||
/* drop privileges */
|
/* drop privileges */
|
||||||
if (init->user)
|
lde_privs.user = init->user;
|
||||||
lde_privs.user = init->user;
|
lde_privs.group = init->group;
|
||||||
if (init->group)
|
|
||||||
lde_privs.group = init->group;
|
|
||||||
zprivs_init(&lde_privs);
|
zprivs_init(&lde_privs);
|
||||||
|
|
||||||
#ifdef HAVE_PLEDGE
|
#ifdef HAVE_PLEDGE
|
||||||
|
10
ldpd/ldpe.c
10
ldpd/ldpe.c
@ -66,10 +66,6 @@ static zebra_capabilities_t _caps_p [] =
|
|||||||
|
|
||||||
struct zebra_privs_t ldpe_privs =
|
struct zebra_privs_t ldpe_privs =
|
||||||
{
|
{
|
||||||
#if defined(FRR_USER) && defined(FRR_GROUP)
|
|
||||||
.user = FRR_USER,
|
|
||||||
.group = FRR_GROUP,
|
|
||||||
#endif
|
|
||||||
#if defined(VTY_GROUP)
|
#if defined(VTY_GROUP)
|
||||||
.vty_group = VTY_GROUP,
|
.vty_group = VTY_GROUP,
|
||||||
#endif
|
#endif
|
||||||
@ -143,10 +139,8 @@ void
|
|||||||
ldpe_init(struct ldpd_init *init)
|
ldpe_init(struct ldpd_init *init)
|
||||||
{
|
{
|
||||||
/* drop privileges */
|
/* drop privileges */
|
||||||
if (init->user)
|
ldpe_privs.user = init->user;
|
||||||
ldpe_privs.user = init->user;
|
ldpe_privs.group = init->group;
|
||||||
if (init->group)
|
|
||||||
ldpe_privs.group = init->group;
|
|
||||||
zprivs_init(&ldpe_privs);
|
zprivs_init(&ldpe_privs);
|
||||||
|
|
||||||
/* listen on ldpd control socket */
|
/* listen on ldpd control socket */
|
||||||
|
Loading…
Reference in New Issue
Block a user