mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-08 11:02:24 +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;
|
const char *errstr;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
if (dent->d_name[0] == '.')
|
||||||
|
continue;
|
||||||
|
|
||||||
fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
|
fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
|
||||||
if (errstr != NULL || fd == dirfd(dirp))
|
if (errstr != NULL || fd == dirfd(dirp))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user