aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
diff options
context:
space:
mode:
authorpacien2024-01-20 00:20:12 +0100
committerpacien2024-01-20 00:20:12 +0100
commit94f3a07b20019a7d412bb1b5caa4f5ce153732a9 (patch)
treed27823422dad159b9a57c064b28ca64d1af1cf78 /app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
parentb5fe5e49e0d3cc2b7c53af23b7a4e7d3c4491be1 (diff)
downloadtincapp-94f3a07b20019a7d412bb1b5caa4f5ce153732a9.tar.gz
config: make all generated files accessible to the user
Permissions mode 0600 was preventing even the user from accessing the configuration files. This makes the permissions more open. The private key files should nevertheless be protected from other apps by the permissions on the parent directory. Password protection for the private key is also recommended in general. GitHub: fixes #122
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt')
-rw-r--r--app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt b/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
index 7d534e6..e8d9ad6 100644
--- a/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
+++ b/app/src/main/java/org/pacien/tincapp/utils/TincKeyring.kt
@@ -1,6 +1,6 @@
1/* 1/*
2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon 2 * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
3 * Copyright (C) 2017-2020 Pacien TRAN-GIRARD 3 * Copyright (C) 2017-2024 Pacien TRAN-GIRARD
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -49,10 +49,4 @@ object TincKeyring {
49 file.makePrivate() 49 file.makePrivate()
50 return file 50 return file
51 } 51 }
52
53 private fun File.makePrivate() {
54 this.setExecutable(false, false)
55 this.setReadable(true, true)
56 this.setWritable(true, true)
57 }
58} 52}