summaryrefslogtreecommitdiffstats
path: root/libexec/fingerd
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-10 15:07:12 +0000
committerpeter <peter@FreeBSD.org>1995-12-10 15:07:12 +0000
commitd8249966c8ccdec59d2d62956cf45f88b1aa48d5 (patch)
tree765c1165bd7bd0aa1bf5a58585daf3372416a0fc /libexec/fingerd
parent17cc71f8269d2cf5b9fd22a6cc01f516a21e86f1 (diff)
downloadFreeBSD-src-d8249966c8ccdec59d2d62956cf45f88b1aa48d5.zip
FreeBSD-src-d8249966c8ccdec59d2d62956cf45f88b1aa48d5.tar.gz
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.
Diffstat (limited to 'libexec/fingerd')
-rw-r--r--libexec/fingerd/fingerd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c
index 7f88bf4..cbba164 100644
--- a/libexec/fingerd/fingerd.c
+++ b/libexec/fingerd/fingerd.c
@@ -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);
}
OpenPOWER on IntegriCloud