* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: amcheck.c,v 1.50.2.19.2.7.2.20.2.10 2005/04/06 12:32:31 martinea Exp $
+ * $Id: amcheck.c,v 1.50.2.19.2.7.2.20.2.12 2005/10/11 14:50:00 martinea Exp $
*
* checks for common problems in server and clients
*/
pid_t pid;
extern int optind;
int l, n, s;
- int fd;
char *mailto = NULL;
extern char *optarg;
int mailout;
struct passwd *pw;
uid_t uid_me;
- 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("amcheck");
int start_server_check(fd, do_localchk, do_tapechk)
int fd;
+ int do_localchk, do_tapechk;
{
char *errstr, *tapename;
generic_fs_stats_t fs;