summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-02-18 15:23:44 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 10:23:42 (GMT)
commit6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7 (patch)
treea514b1cedf40dbaaa319781c9c94eac001cdeae7 /vpn
parent81d634c07e52949490a98494a6f494eba198aa3b (diff)
downloadconnman-6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7.zip
connman-6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7.tar.gz
connman-6edb1ddf1f7abe0f397b14ecd45a44c9cc07cde7.tar.bz2
main: Create VPN_STORAGEDIR when starting up
Eventually all VPN directories from STORAGEDIR is to be migrated into VPN_STORAGEDIR
Diffstat (limited to 'vpn')
-rw-r--r--vpn/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vpn/main.c b/vpn/main.c
index 8fd830c..d72fa74 100644
--- a/vpn/main.c
+++ b/vpn/main.c
@@ -273,12 +273,22 @@ int main(int argc, char *argv[])
perror("Failed to create state directory");
}
+ /*
+ * At some point the VPN stuff is migrated into VPN_STORAGEDIR
+ * and this mkdir() call can be removed.
+ */
if (mkdir(STORAGEDIR, S_IRUSR | S_IWUSR | S_IXUSR |
S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0) {
if (errno != EEXIST)
perror("Failed to create storage directory");
}
+ if (mkdir(VPN_STORAGEDIR, S_IRUSR | S_IWUSR | S_IXUSR |
+ S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0) {
+ if (errno != EEXIST)
+ perror("Failed to create VPN storage directory");
+ }
+
umask(0077);
main_loop = g_main_loop_new(NULL, FALSE);