]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
install/dracut-install.c: do not ldd directories
authorHarald Hoyer <harald@redhat.com>
Wed, 3 Oct 2012 20:37:23 +0000 (16:37 -0400)
committerHarald Hoyer <harald@redhat.com>
Wed, 3 Oct 2012 20:39:27 +0000 (16:39 -0400)
install/dracut-install.c

index 60a62e8b69e9ba533feb22d398c742b982a88a14..8aa0e2e57ccb05c2bb83ae874371021a387e4e73 100644 (file)
@@ -291,6 +291,9 @@ static int resolve_deps(const char *src)
                 if (strstr(buf, "loader cannot load itself"))
                         break;
 
+                if (strstr(buf, "not regular file"))
+                        break;
+
                 p = strstr(buf, "/");
                 if (p) {
                         int r;
@@ -408,7 +411,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res
         }
 
         if (ret == 0) {
-                if (resolvedeps) {
+                if (resolvedeps && S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
                         log_debug("'%s' already exists, but checking for any deps", fulldstpath);
                         ret = resolve_deps(src);
                 } else