X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtape.c;h=3465e7ffdb958923e3f4c6b59a087b59d3632975;hb=2df780bff19c457b0debb7adc29972a0bc2a5dc2;hp=9c0f7f5a960e969aa64495335cbf0948b7e160bf;hpb=0de2ad0a86685398621fb8ffa6990c029681bb3a;p=debian%2Famanda diff --git a/server-src/amtape.c b/server-src/amtape.c index 9c0f7f5..3465e7f 100644 --- a/server-src/amtape.c +++ b/server-src/amtape.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: amtape.c,v 1.22.2.6.4.5.2.4 2003/11/25 12:21:08 martinea Exp $ + * $Id: amtape.c,v 1.22.2.6.4.5.2.4.2.1 2005/09/20 21:31:52 jrjackson Exp $ * * tape changer interface program */ @@ -91,23 +91,13 @@ char **argv; char *argv0 = argv[0]; unsigned long malloc_hist_1, malloc_size_1; unsigned long malloc_hist_2, malloc_size_2; - int fd; int have_changer; uid_t uid_me; uid_t uid_dumpuser; char *dumpuser; struct passwd *pw; - 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("amtape");