Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2005 16:50:13 +0400
From:      "Eygene A. Ryabinkin" <freebsd@rea.mbslab.kiae.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: conf/84221: Wrong permissions on /etc/opiekeys
Message-ID:  <20050729125013.GC812@rea.mbslab.kiae.ru>
In-Reply-To: <200507281300.j6SD0Oce030737@freefall.freebsd.org>
References:  <20050728125522.1C67FBB60@rea.mbslab.kiae.ru> <200507281300.j6SD0Oce030737@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 The patch follows: (for /usr/src/contrib/opie)
 Thanks to Andrey Chernov for his commit to the -CURRENT.

--- libopie/readrec.c.orig	Fri Jul 29 16:40:21 2005
+++ libopie/readrec.c	Fri Jul 29 16:40:36 2005
@@ -94,7 +94,7 @@
   FILE *f = NULL;
   int rval = -1;
 
-  if (!(f = __opieopen(KEY_FILE, 0, 0644))) {
+  if (!(f = __opieopen(KEY_FILE, 0, 0600))) {
 #if DEBUG
     syslog(LOG_DEBUG, "__opiereadrec: __opieopen(KEY_FILE..) failed!");
 #endif /* DEBUG */
--- libopie/writerec.c.orig	Fri Jul 29 16:40:11 2005
+++ libopie/writerec.c	Fri Jul 29 16:40:59 2005
@@ -65,13 +65,13 @@
 
   switch(i) {
   case 0:
-    if (!(f = __opieopen(KEY_FILE, 1, 0644)))
+    if (!(f = __opieopen(KEY_FILE, 1, 0600)))
       return -1;
     if (fseek(f, opie->opie_recstart, SEEK_SET))
       return -1;
     break;
   case 1:
-    if (!(f = __opieopen(KEY_FILE, 2, 0644)))
+    if (!(f = __opieopen(KEY_FILE, 2, 0600)))
       return -1;
     break;
   default:
--- Makefile.in.orig	Fri Jul 29 16:45:26 2005
+++ Makefile.in	Fri Jul 29 16:44:13 2005
@@ -237,7 +237,7 @@
 	@echo "Making sure OPIE database file exists";
 	@touch $(KEY_FILE)
 	@echo "Changing permissions of OPIE database file"
-	@chmod 0644 $(KEY_FILE)
+	@chmod 0600 $(KEY_FILE)
 	@echo "Changing ownership of OPIE database file"
 	@$(CHOWN) $(OWNER) $(KEY_FILE)
 	@chgrp $(GROUP) $(KEY_FILE)
-- 
 rea



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050729125013.GC812>