Patch for vn.jan.88 /usr/tmp file creation

Donald M. Craig dmc at videovax.Tek.COM
Mon Feb 8 17:07:13 AEST 1988


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



More information about the Comp.sources.bugs mailing list