blob: 159920b4cb6ab89ad356b9d98389b6ad6d04fa47 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
--- lib/privs.c.orig 2018-02-20 04:24:55.000000000 +0700
+++ lib/privs.c 2024-05-06 19:00:18.907694000 +0700
@@ -717,8 +717,8 @@ zprivs_init(struct zebra_privs_t *zprivs)
if (zprivs->user)
{
- ngroups = sizeof(groups);
- if ( (ngroups = getgrouplist (zprivs->user, zprivs_state.zgid, groups, &ngroups )) < 0 )
+ ngroups = nitems(groups);
+ 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",
|