Imported Upstream version 2.4.5p1
[debian/amanda] / common-src / statfs.c
index c2b9bd9c23c044f729c30fb090a62b07337e922c..5ab78d9661d022f1bdfbbf96a5ebbf17678c4993 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: statfs.c,v 1.10.4.1 1999/05/23 17:11:18 oliva Exp $
+ * $Id: statfs.c,v 1.10.4.1.8.2 2005/09/30 19:13:36 martinea Exp $
  *
  * a generic statfs-like routine
  */
@@ -161,17 +161,8 @@ int argc;
 char **argv;
 {
     generic_fs_stats_t statbuf;
-    int fd;
-
-    for(fd = 3; fd < FD_SETSIZE; fd++) {
-       /*
-        * Make sure nobody spoofs us with a lot of extra open files
-        * that would cause an open we do to get a very high file
-        * descriptor, which in turn might be used as an index into
-        * an array (e.g. an fd_set).
-        */
-       close(fd);
-    }
+
+    safe_fd(-1, 0);
 
     set_pname(argv[0]);