* 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
*/
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]);