← Commit list

8416a2d55

Paul Fox
Paul Fox
2006-03-27
SOURCE BUG Duration: 8s

Subject

prevent find from ever descending into an xdev'ed directory.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/find.c+9 -15
@@ -79,6 +79,15 @@ static int exec_opt;
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
{
+#ifdef CONFIG_FEATURE_FIND_XDEV
+ if (S_ISDIR(statbuf->st_mode) && xdev_count) {
+ int i;
+ for (i=0; i<xdev_count; i++) {
+ if (xdev_dev[i] != statbuf->st_dev)
+ return SKIP;
+ }
+ }
+#endif
if (pattern != NULL) {
const char *tmp = strrchr(fileName, '/');
@@ -125,21 +134,6 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
goto no_match;
}
#endif
-#ifdef CONFIG_FEATURE_FIND_XDEV
- if (xdev_count) {
- int i;
- for (i=0; i<xdev_count; i++) {
- if (xdev_dev[i] == statbuf-> st_dev)
- break;
- }
- if (i == xdev_count) {
- if(S_ISDIR(statbuf->st_mode))
- return SKIP;
- else
- goto no_match;
- }
- }
-#endif
#ifdef CONFIG_FEATURE_FIND_NEWER
if (newer_mtime != 0) {
time_t file_age = newer_mtime - statbuf->st_mtime;