mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 03:33:43 +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");
|
||||
|
||||
if (!retain_mode) {
|
||||
if (!retain_mode)
|
||||
bgp_terminate();
|
||||
if (bgpd_privs.user) /* NULL if skip_runas flag set */
|
||||
zprivs_terminate(&bgpd_privs);
|
||||
}
|
||||
|
||||
bgp_exit(0);
|
||||
|
||||
|
@ -856,7 +856,9 @@ void zprivs_terminate(struct zebra_privs_t *zprivs)
|
||||
}
|
||||
|
||||
#ifdef HAVE_CAPABILITIES
|
||||
zprivs_caps_terminate();
|
||||
if (zprivs->user || zprivs->group || zprivs->cap_num_p
|
||||
|| zprivs->cap_num_i)
|
||||
zprivs_caps_terminate();
|
||||
#else /* !HAVE_CAPABILITIES */
|
||||
/* only change uid if we don't have the correct one */
|
||||
if ((zprivs_state.zuid) && (zprivs_state.zsuid != zprivs_state.zuid)) {
|
||||
|
Loading…
Reference in New Issue
Block a user