Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2005 12:50:24 GMT
From:      "Eygene A. Ryabinkin" <freebsd@rea.mbslab.kiae.ru>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/84221: Wrong permissions on /etc/opiekeys
Message-ID:  <200507291250.j6TCoOsL095930@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/84221; it has been noted by GNATS.

From: "Eygene A. Ryabinkin" <freebsd@rea.mbslab.kiae.ru>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: conf/84221: Wrong permissions on /etc/opiekeys
Date: Fri, 29 Jul 2005 16:50:13 +0400

  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?200507291250.j6TCoOsL095930>