Don't allow finger /somefile, only allow filname expansions from

inside /etc/finger.conf

PR:	21704
This commit is contained in:
Brian Somers 2000-10-02 22:27:34 +00:00
parent f234c674c1
commit 7ce8924adb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66563

View File

@ -292,6 +292,16 @@ userlist(argc, argv)
if (!*argv)
goto net;
/*
* Mark any arguments beginning with '/' as invalid so that we
* don't accidently confuse them with expansions from finger.conf
*/
for (p = argv, ip = used; *p; ++p, ++ip)
if (**p == '/') {
*ip = 1;
warnx("%s: no such user", *p);
}
/*
* Traverse the finger alias configuration file of the form
* alias:(user|alias), ignoring comment lines beginning '#'.