Merge pull request #622 from Jafaral/vtysh-no-user

vtysh: fix a compile error when user/group are disabled
This commit is contained in:
Donald Sharp 2017-05-26 15:03:59 -04:00 committed by GitHub
commit 1bab0e1056

View File

@ -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))
{