Fix the bug which allowed people to avoid the "-s" (secure) bug.

Now, "finger" is invoked with "--" before the first network supplied
argument, so the "--" and "-l" hacks will be stopped.
This commit is contained in:
Peter Wemm 1995-12-10 15:07:12 +00:00
parent bb51c61fdf
commit 279884182f

View File

@ -107,10 +107,11 @@ main(argc, argv)
exit(1);
comp = &av[1];
for (lp = line, ap = &av[2];;) {
av[2] = "--";
for (lp = line, ap = &av[3];;) {
*ap = strtok(lp, " \t\r\n");
if (!*ap) {
if (secure && ap == &av[2]) {
if (secure && ap == &av[3]) {
puts("must provide username\r\n");
exit(1);
}