Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+2006-09-24 Theodore Tso <tytso@mit.edu>
+
+ * devno.c (scan_dir): Don't follow symlinks when recursively
+ searching directories under /dev.
+
2006-09-17 Karel Zak <kzak@redhat.com>
* probe.c (probe_fat): Fix problem with empty FAT label.
if (stat(path, &st) < 0)
continue;
- if (S_ISDIR(st.st_mode))
- add_to_dirlist(path, list);
- else if (S_ISBLK(st.st_mode) && st.st_rdev == devno) {
+ if (S_ISBLK(st.st_mode) && st.st_rdev == devno) {
*devname = blkid_strdup(path);
DBG(DEBUG_DEVNO,
printf("found 0x%llx at %s (%p)\n", (long long)devno,
path, *devname));
break;
}
+ if (S_ISDIR(st.st_mode) && !lstat(path, &st) &&
+ S_ISDIR(st.st_mode))
+ add_to_dirlist(path, list);
}
closedir(dir);
return;