15 lines
594 B
Text
15 lines
594 B
Text
lib: fix usage of getgrouplist() in *BSD
|
|
https://github.com/FRRouting/frr/pull/312
|
|
|
|
Index: lib/privs.c
|
|
--- lib/privs.c.orig
|
|
+++ lib/privs.c
|
|
@@ -718,7 +718,7 @@ zprivs_init(struct zebra_privs_t *zprivs)
|
|
if (zprivs->user)
|
|
{
|
|
ngroups = sizeof(groups);
|
|
- if ( (ngroups = getgrouplist (zprivs->user, zprivs_state.zgid, groups, &ngroups )) < 0 )
|
|
+ if ( (getgrouplist (zprivs->user, zprivs_state.zgid, groups, &ngroups )) < 0 )
|
|
{
|
|
/* cant use log.h here as it depends on vty */
|
|
fprintf (stderr, "privs_init: could not getgrouplist for user %s\n",
|