Eventually all VPN directories from STORAGEDIR is to be migrated into VPN_STORAGEDIR --- vpn/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
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); -- 1.7.11.4 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman