Skip to content

Commit a6f8cdb

Browse files
committed
use stat, not lstat for filtering, as we want to walk through symlinks
1 parent f524d91 commit a6f8cdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doas.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ parseconfdir(const char *dirpath, int checkperms)
218218
snprintf(pathbuf, sizeof pathbuf, "%s/%s", dirpath, dirent_table[i]->d_name);
219219
free(dirent_table[i]);
220220

221-
if (lstat(pathbuf, &sb) != 0)
222-
err(1, "lstat(\"%s\")", pathbuf);
221+
if (stat(pathbuf, &sb) != 0)
222+
err(1, "stat(\"%s\")", pathbuf);
223223

224224
if ((sb.st_mode & (S_IFMT)) != S_IFREG)
225225
continue;

0 commit comments

Comments
 (0)