Imported Upstream version 2.4.5p1
[debian/amanda] / client-src / rundump.c
index 26814e6173a93e42a6b087d0f9df47115d319b01..d25f2f3cf0d73123e5c28572d2e5a0af8d788c4c 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: rundump.c,v 1.23.2.3.6.1 2002/10/27 14:31:18 martinea Exp $
+ * $Id: rundump.c,v 1.23.2.3.6.1.2.1 2005/09/20 21:31:52 jrjackson Exp $
  *
  * runs DUMP program as root
  */
@@ -56,18 +56,8 @@ char **argv;
     int i;
     char *e;
 #endif /* ERRMSG */
-    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);
     safe_cd();
 
     set_pname("rundump");