Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37048388
en ru br
ALT Linux repositórios
S:7.94-alt1
5.0: 4.65-alt1.1
4.1: 4.20-alt3
4.0: 4.11-alt1.1
3.0: 3.81-alt1

Group :: Monitoramento
RPM: nmap

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: nmap-5.51-alt-owl-fileexistsandisreadable.patch
Download


--- 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;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009