mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-07 17:52:34 +01:00
closefrom: Ignore files starting with dot when scanning /proc/self/fd
Signed-off-by: Guillem Jover <guillem@hadrons.org>
This commit is contained in:
parent
9cbd935d92
commit
ee63bca525
@ -153,6 +153,9 @@ closefrom_procfs(int lowfd)
|
||||
const char *errstr;
|
||||
int fd;
|
||||
|
||||
if (dent->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
|
||||
if (errstr != NULL || fd == dirfd(dirp))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user