[comp.sources.bugs] Patch for vn.jan.88 /usr/tmp file creation

dmc@videovax.Tek.COM (Donald M. Craig) (02/08/88)

While bringing up vn I got "can't open /usr/tmp/vnxxxxxx"

The open call in temp_open() in pagefile.c has only two arguments
but specifies O_CREAT in the flags field.  A creation mode should
therefore follow: I picked 0660.

*** pagefile.c.orig	Sun Feb  7 20:46:21 1988
--- pagefile.c	Sun Feb  7 21:31:33 1988
***************
*** 47,53
  	Lrec = -1;
  	tmpnam (tmpart);
  	Pgsize = sizeof (HEAD) + L_allow * sizeof(BODY);
! 	if ((Tdes = open(tmpart,O_RDWR|O_CREAT)) < 0)
  		printex ("can't open %s",tmpart);
  	unlink (tmpart);
  }

--- 47,53 -----
  	Lrec = -1;
  	tmpnam (tmpart);
  	Pgsize = sizeof (HEAD) + L_allow * sizeof(BODY);
! 	if ((Tdes = open(tmpart,O_RDWR|O_CREAT,0660)) < 0)
  		printex ("can't open %s",tmpart);
  	unlink (tmpart);
  }
---
Don Craig
Tektronix Television Systems