mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 15:44:04 +01:00
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:
parent
bb51c61fdf
commit
279884182f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12728
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user