diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-04-27 13:56:15 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-06-05 17:24:32 +0200 |
commit | 6bbf78cf5278c2b011bcb4f22fd92dbefd113e0e (patch) | |
tree | 3f950247603bf8e0e62ae4572df8458c8efe0282 /ldpd | |
parent | ldpd: fix bug when changing the transport address (diff) | |
download | frr-6bbf78cf5278c2b011bcb4f22fd92dbefd113e0e.tar.xz frr-6bbf78cf5278c2b011bcb4f22fd92dbefd113e0e.zip |
ldpd: fix issues detected by Coverity Scan
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd')
-rw-r--r-- | ldpd/lde.c | 10 | ||||
-rw-r--r-- | ldpd/ldpe.c | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c index e5d140283..0cfc02d5b 100644 --- a/ldpd/lde.c +++ b/ldpd/lde.c @@ -80,10 +80,6 @@ static zebra_capabilities_t _caps_p [] = 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) .vty_group = VTY_GROUP, #endif @@ -185,10 +181,8 @@ void lde_init(struct ldpd_init *init) { /* drop privileges */ - if (init->user) - lde_privs.user = init->user; - if (init->group) - lde_privs.group = init->group; + lde_privs.user = init->user; + lde_privs.group = init->group; zprivs_init(&lde_privs); #ifdef HAVE_PLEDGE diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c index 20cc9f744..017eec250 100644 --- a/ldpd/ldpe.c +++ b/ldpd/ldpe.c @@ -66,10 +66,6 @@ static zebra_capabilities_t _caps_p [] = struct zebra_privs_t ldpe_privs = { -#if defined(FRR_USER) && defined(FRR_GROUP) - .user = FRR_USER, - .group = FRR_GROUP, -#endif #if defined(VTY_GROUP) .vty_group = VTY_GROUP, #endif @@ -143,10 +139,8 @@ void ldpe_init(struct ldpd_init *init) { /* drop privileges */ - if (init->user) - ldpe_privs.user = init->user; - if (init->group) - ldpe_privs.group = init->group; + ldpe_privs.user = init->user; + ldpe_privs.group = init->group; zprivs_init(&ldpe_privs); /* listen on ldpd control socket */ |