mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:46:45 +00:00
Merge pull request #1021 from opensourcerouting/privs-terminate
zprivs terminate
This commit is contained in:
commit
16e07d14e8
@ -140,11 +140,8 @@ __attribute__((__noreturn__)) void sigint(void)
|
|||||||
{
|
{
|
||||||
zlog_notice("Terminating on signal");
|
zlog_notice("Terminating on signal");
|
||||||
|
|
||||||
if (!retain_mode) {
|
if (!retain_mode)
|
||||||
bgp_terminate();
|
bgp_terminate();
|
||||||
if (bgpd_privs.user) /* NULL if skip_runas flag set */
|
|
||||||
zprivs_terminate(&bgpd_privs);
|
|
||||||
}
|
|
||||||
|
|
||||||
bgp_exit(0);
|
bgp_exit(0);
|
||||||
|
|
||||||
|
@ -856,6 +856,8 @@ void zprivs_terminate(struct zebra_privs_t *zprivs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_CAPABILITIES
|
#ifdef HAVE_CAPABILITIES
|
||||||
|
if (zprivs->user || zprivs->group || zprivs->cap_num_p
|
||||||
|
|| zprivs->cap_num_i)
|
||||||
zprivs_caps_terminate();
|
zprivs_caps_terminate();
|
||||||
#else /* !HAVE_CAPABILITIES */
|
#else /* !HAVE_CAPABILITIES */
|
||||||
/* only change uid if we don't have the correct one */
|
/* only change uid if we don't have the correct one */
|
||||||
|
Loading…
Reference in New Issue
Block a user