mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the situation. One can exercise this bug by referring a dangling link with something like */the-link. Approved by: re (scottl) Submitted by: Simon 'corecode' Schubert [corecode fs ei tum de] Obtained from: NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly rev. 1.6) MFC After: 3 days
This commit is contained in:
parent
a617a18a23
commit
0e3e87bd43
1 changed files with 1 additions and 1 deletions
|
|
@ -1162,7 +1162,7 @@ expmeta(char *enddir, char *name)
|
|||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
if (metaflag == 0 || stat(expdir, &statb) >= 0)
|
||||
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
|
||||
addfname(expdir);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue