mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 04:33:18 +00:00
Merge pull request #622 from Jafaral/vtysh-no-user
vtysh: fix a compile error when user/group are disabled
This commit is contained in:
commit
1bab0e1056
@ -2488,6 +2488,7 @@ vtysh_write_config_integrated(void)
|
||||
err++;
|
||||
}
|
||||
|
||||
#ifdef FRR_USER
|
||||
pwentry = getpwnam (FRR_USER);
|
||||
if (pwentry)
|
||||
uid = pwentry->pw_uid;
|
||||
@ -2496,7 +2497,8 @@ vtysh_write_config_integrated(void)
|
||||
printf ("%% Warning: could not look up user \"%s\"\n", FRR_USER);
|
||||
err++;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef FRR_GROUP
|
||||
grentry = getgrnam (FRR_GROUP);
|
||||
if (grentry)
|
||||
gid = grentry->gr_gid;
|
||||
@ -2505,6 +2507,7 @@ vtysh_write_config_integrated(void)
|
||||
printf ("%% Warning: could not look up group \"%s\"\n", FRR_GROUP);
|
||||
err++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!fstat (fd, &st))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user