--- ../qmail-1.03.orig/qmail-local.c	Mon Jun 15 12:53:16 1998
+++ qmail-local.c	Sun Jul 16 16:19:04 2000
@@ -1,5 +1,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <fcntl.h>
 #include "readwrite.h"
 #include "sig.h"
 #include "env.h"
@@ -128,6 +129,9 @@
  if (close(fd) == -1) goto fail; /* NFS dorks */
 
  if (link(fntmptph,fnnewtph) == -1) goto fail;
+ if ((fd = open(fnnewtph, O_RDONLY)) < 0 ||
+     fsync(fd) < 0 || close(fd) < 0) goto fail;
+   
    /* if it was error_exist, almost certainly successful; i hate NFS */
  tryunlinktmp(); _exit(0);
 
--- ../qmail-1.03.orig/qmail-queue.c	Mon Jun 15 12:53:16 1998
+++ qmail-queue.c	Sun Jul 16 16:19:33 2000
@@ -1,5 +1,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <fcntl.h>
 #include "readwrite.h"
 #include "sig.h"
 #include "exit.h"
@@ -155,6 +156,7 @@
 {
  unsigned int len;
  char ch;
+ int fd;
 
  sig_blocknone();
  umask(033);
@@ -183,6 +185,7 @@
  todofn = fnnum("todo/",0);
  intdfn = fnnum("intd/",0);
 
  if (link(pidfn,messfn) == -1) die(64);
+ if ((fd = open(messfn, O_RDONLY)) < 0 || fsync(fd) < 0 || close(fd) < 0) die(64);
  if (unlink(pidfn) == -1) die(63);
  flagmademess = 1;
@@ -248,6 +250,8 @@
  if (fsync(intdfd) == -1) die_write();
 
  if (link(intdfn,todofn) == -1) die(66);
+ if ((fd = open(todofn, O_RDONLY)) < 0 ||
+     fsync(fd) < 0 || close(fd) < 0) die(66); 
 
  triggerpull();
  die(0);
