Don't allow finger /somefile, only allow filname expansions from
inside /etc/finger.conf PR: 21704
This commit is contained in:
parent
f234c674c1
commit
7ce8924adb
|
@ -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 '#'.
|
||||
|
|
Loading…
Reference in New Issue