X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Famflock.c;h=528f7782eee66cf7c74f948618d6343f22be8781;hb=2df780bff19c457b0debb7adc29972a0bc2a5dc2;hp=d27a857691088640d66a397baee9837442bc2054;hpb=0de2ad0a86685398621fb8ffa6990c029681bb3a;p=debian%2Famanda diff --git a/common-src/amflock.c b/common-src/amflock.c index d27a857..528f778 100644 --- a/common-src/amflock.c +++ b/common-src/amflock.c @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: amflock.c,v 1.17.4.6.6.1 2003/10/22 17:43:33 martinea Exp $ + * $Id: amflock.c,v 1.17.4.6.6.1.2.2 2005/10/06 17:26:36 martinea Exp $ * * file locking routines, put here to hide the system dependant stuff * from the rest of the code @@ -414,16 +414,6 @@ main() char *resn = "test"; 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); - } - unlink(filen); if ((lockfd = open(filen, O_RDONLY|O_CREAT|O_EXCL, 0600)) == -1) { perror (filen);