From 0d1137f987d78f83e1222ece29a1438a49658d3c Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 24 Sep 2020 17:51:29 -0400 Subject: Implement TLS store Includes hands-free certificate generation and loading --- src/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 93c6e91..8cc5502 100644 --- a/src/util.c +++ b/src/util.c @@ -6,6 +6,7 @@ #include #include #include "util.h" +#include static void posix_dirname(char *path, char *dname) @@ -29,11 +30,11 @@ posix_dirname(char *path, char *dname) int mkdirs(char *path, mode_t mode) { - char dname[PATH_MAX + 1]; - posix_dirname(path, dname); - if (strcmp(dname, "/") == 0) { + if (strcmp(path, "/") == 0 || strcmp(path, ".") == 0) { return 0; } + char dname[PATH_MAX + 1]; + posix_dirname(path, dname); if (mkdirs(dname, mode) != 0) { return -1; } -- cgit v1.2.3