X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Fdriver.c;h=345f3f931d2ba14d5e07e58b205c13d4fca2d26e;hb=2df780bff19c457b0debb7adc29972a0bc2a5dc2;hp=248eb218c9aa9e253b2f35ec3f599b88728dcc0f;hpb=0de2ad0a86685398621fb8ffa6990c029681bb3a;p=debian%2Famanda diff --git a/server-src/driver.c b/server-src/driver.c index 248eb21..345f3f9 100644 --- a/server-src/driver.c +++ b/server-src/driver.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: driver.c,v 1.58.2.31.2.8.2.20.2.14 2005/02/09 18:12:31 martinea Exp $ + * $Id: driver.c,v 1.58.2.31.2.8.2.20.2.16 2005/09/20 21:31:52 jrjackson Exp $ * * controlling process for the Amanda backup system */ @@ -55,7 +55,7 @@ unsigned long total_disksize; char *dumper_program; int inparallel; int nodump = 0; -long tape_length, tape_left = 0; +unsigned long tape_length, tape_left = 0; int conf_taperalgo; am_host_t *flushhost = NULL; @@ -147,15 +147,7 @@ int main(main_argc, main_argv) char *conf_tapetype; tapetype_t *tape; - 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); setvbuf(stdout, (char *)NULL, _IOLBF, 0); setvbuf(stderr, (char *)NULL, _IOLBF, 0);