Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37548334
en ru br
Репозитории ALT
S:7.94-alt1
5.1: 5.00-alt2
4.1: 4.20-alt3
4.0: 4.11-alt1.1
3.0: 3.81-alt1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: nmap

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: nmap-5.51-alt-owl-fileexistsandisreadable.patch
Скачать


--- nmap/nbase/nbase_misc.c
+++ nmap/nbase/nbase_misc.c
@@ -734,10 +734,13 @@ int fileexistsandisreadable(const char *pathname) {
 
 #endif
 
-  if (stat(pathname_buf, &st) == -1)
-    status = 0;
-  else if (access(pathname_buf, R_OK) != -1)
-    status = S_ISDIR(st.st_mode) ? 2 : 1;
+  if (access(pathname_buf, R_OK) == 0 && stat(pathname_buf, &st) == 0) {
+    if (S_ISREG(st.st_mode)) {
+    	status = 1;
+    } else if (S_ISDIR(st.st_mode)) {
+      status = 2;
+    }
+  }
 
   free(pathname_buf);
   return status;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin