From: Paul Jakma <paulj@alphyra.ie>

Subject: [zebra 19125] vtysh bogus perms check

vtysh checks that the zebra.vty socket uid is == to its own euid, this is
bogus - let the kernel decide whether permissions match, vtysh shouldnt
try second guess. (this becomes noticeable when neither zebra nor vtysh
are run as root :) )
This commit is contained in:
paul 2003-05-21 19:09:31 +00:00
parent a304c1a412
commit 3dec2de3ee

View File

@ -1618,14 +1618,6 @@ vtysh_connect (struct vtysh_client *vclient, char *path)
exit (1);
}
if (euid != s_stat.st_uid
|| !(s_stat.st_mode & S_IWUSR)
|| !(s_stat.st_mode & S_IRUSR))
{
fprintf (stderr, "vtysh_connect(%s): No permission to access socket\n",
path);
exit (1);
}
}
sock = socket (AF_UNIX, SOCK_STREAM, 0);