Package: libc6 Version: 2.3.6-7 Severity: normal nftw to "/" with FTW_CHDIR fails with "no such file or directory"; see the attached example.
#define _GNU_SOURCE #include <error.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <ftw.h>
static int fn(const char *file, const struct stat *sb, int flag, struct FTW *s) { puts(file); file=NULL; sb=NULL; s=NULL; flag=0; return 0; } int main() { if (nftw("/", fn, 0, FTW_CHDIR) < 0) { error(EXIT_FAILURE, errno, "nftw / FTW_CHDIR"); } exit(EXIT_SUCCESS); }