Imported Upstream version 2.4.5p1
[debian/amanda] / common-src / genversion.c
index 65bc6f9ee115d5499e17d32a00459f0d70752087..78becebcb9f9a93e7c3ab2d63a7489a1962b0835 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: genversion.c,v 1.18.4.4.4.1.2.2 2003/10/07 17:10:08 martinea Exp $
+ * $Id: genversion.c,v 1.18.4.4.4.1.2.2.2.1 2005/09/20 21:31:52 jrjackson Exp $
  *
  * dump the current Amanda version info
  */
@@ -79,19 +79,10 @@ int main()
 {
     char line[STR_SIZE], *str = NULL;
     int  linelen, indent;
-    int fd;
     unsigned long malloc_hist_1, malloc_size_1;
     unsigned long malloc_hist_2, malloc_size_2;
 
-    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("genversion");