$NetBSD: patch-aj,v 1.1 2003/01/27 23:39:03 ad Exp $

--- dpteng/lockunix.c.orig	Fri Dec 13 14:04:11 2002
+++ dpteng/lockunix.c	Fri Dec 13 14:07:56 2002
@@ -31,6 +31,7 @@
 #include "lockunix.h"
 
 static char Lock[] = "/tmp/%s.LOCK";
+static const int LockMode = 0600;
 extern int errno;
 
 static char *
@@ -73,7 +74,7 @@
 		return (-1);
 	}
 	sprintf (templateBuffer, Template, Name);
-	if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL)) < 0) {
+	if ((fd = open(mktemp (templateBuffer), O_WRONLY|O_CREAT|O_EXCL, LockMode)) < 0) {
 		free (templateBuffer);
 		free (lock);
 		return (-1);
@@ -143,7 +144,7 @@
 
 	if (lock != (char *)NULL) {
 		sprintf (lock, Lock, Name);
-	    if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC)) >= 0) {
+	    if ((fd = open(lock, O_WRONLY|O_CREAT|O_TRUNC, LockMode)) >= 0) {
 			sprintf (buffer, "%d\n", pid);
 			write (fd, buffer, strlen(buffer));
 			close (fd);
