Imported Upstream version 2.4.5p1
[debian/amanda] / client-src / sendbackup.c
index fd71862517aa81e17977217e612c718874066f47..e8050448a6544d6b2f298187ac0d835b233fd17d 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /* 
- * $Id: sendbackup.c,v 1.44.2.9.4.4.2.16 2004/01/14 12:59:12 martinea Exp $
+ * $Id: sendbackup.c,v 1.44.2.9.4.4.2.16.2.1 2005/09/20 21:31:52 jrjackson Exp $
  *
  * common code for the sendbackup-* programs.
  */
@@ -152,22 +152,14 @@ char **argv;
     int ch;
     unsigned long malloc_hist_1, malloc_size_1;
     unsigned long malloc_hist_2, malloc_size_2;
-    int fd;
 
     /* initialize */
 
-    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).
-        */
 #ifdef KRB4_SECURITY
-       if (fd != KEY_PIPE)     /* XXX interface needs to be fixed */
+    safe_fd(KEY_PIPE, 1);              /* XXX interface needs to be fixed */
+#else
+    safe_fd(-1, 0);
 #endif
-               close(fd);
-    }
 
     safe_cd();