Imported Upstream version 2.4.5p1
[debian/amanda] / common-src / token.c
index c56c9d199197f769853d5cd8e70d660ee7c9a802..dfe0212b89b090e84f9d24e393aad8ca1308d4c2 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: token.c,v 1.22.8.3 2003/10/22 17:32:33 kovert Exp $
+ * $Id: token.c,v 1.22.8.3.2.2 2005/09/30 19:13:36 martinea Exp $
  *
  * token bashing routines
  */
@@ -408,17 +408,8 @@ int main()
        int r;
        char *sr;
        int i;
-       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("token test");