mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Create /etc/opiekeys with 0600, not 0644
PR: 84221
This commit is contained in:
parent
87a236caf5
commit
85ca5e684e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148506
@ -14,6 +14,8 @@ you didn't get a copy, you may request one from <license@inner.net>.
|
||||
support. Fixed a debug message typo. Keep going after bogus
|
||||
records. Set read flag.
|
||||
Created by cmetz for OPIE 2.3.
|
||||
|
||||
$FreeBSD$
|
||||
*/
|
||||
#include "opie_cfg.h"
|
||||
|
||||
@ -94,7 +96,7 @@ int __opiereadrec FUNCTION((opie), struct opie *opie)
|
||||
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 */
|
||||
|
@ -13,6 +13,8 @@ you didn't get a copy, you may request one from <license@inner.net>.
|
||||
Modified by cmetz for OPIE 2.31. Removed active attack protection
|
||||
support. Fixed passwd bug.
|
||||
Created by cmetz for OPIE 2.3 from passwd.c.
|
||||
|
||||
$FreeBSD$
|
||||
*/
|
||||
#include "opie_cfg.h"
|
||||
|
||||
@ -65,13 +67,13 @@ int __opiewriterec FUNCTION((opie), struct opie *opie)
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user