From c12ea67bb3cc692fd9367ae5672b6270bf491c28 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 13 Dec 2004 16:59:26 +0000 Subject: Use file permission 0600 for the link key file --- hcid/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hcid/security.c b/hcid/security.c index 7eb26258..1cb07da4 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -140,7 +140,7 @@ static void save_link_key(struct link_key *key) char sa[18], da[18]; int f, err; - f = open(hcid.key_file, O_RDWR | O_CREAT, 0); + f = open(hcid.key_file, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); if (f < 0) { syslog(LOG_ERR, "Link key database open failed. %s(%d)", strerror(errno), errno); -- cgit