summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/mkdir.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-03-02 09:24:00 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-03-02 09:24:00 +0000
commit3eb6dfaf2c5d574b7111c70db38cc88c1b554da5 (patch)
treeed262c2a65caa375b05e43f803c1f25627f7b8e9 /usr.sbin/rpki-client/mkdir.c
parent4fea0bdb6227f61f816cc9c6ad91fc7048f567aa (diff)
There is no longer the need to mkpathat(), the main process runs now from
the cachedir.
Diffstat (limited to 'usr.sbin/rpki-client/mkdir.c')
-rw-r--r--usr.sbin/rpki-client/mkdir.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/rpki-client/mkdir.c b/usr.sbin/rpki-client/mkdir.c
index e9a349feef6..228b7e3a0f9 100644
--- a/usr.sbin/rpki-client/mkdir.c
+++ b/usr.sbin/rpki-client/mkdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkdir.c,v 1.3 2021/02/22 09:46:05 claudio Exp $ */
+/* $OpenBSD: mkdir.c,v 1.4 2021/03/02 09:23:59 claudio Exp $ */
/*
* Copyright (c) 1983, 1992, 1993
@@ -37,14 +37,13 @@
#include "extern.h"
/*
- * mkpathat -- create directories.
- * dirfd - file descriptor for local directory
+ * mkpath -- create directories.
* path - path
* mode - file mode of terminal directory
* dir_mode - file mode of intermediate directories
*/
int
-mkpathat(int dirfd, const char *dir)
+mkpath(const char *dir)
{
char *path, *slash;
int done;
@@ -60,7 +59,7 @@ mkpathat(int dirfd, const char *dir)
done = (*slash == '\0');
*slash = '\0';
- if (mkdirat(dirfd, path, 0700) == -1 && errno != EEXIST) {
+ if (mkdir(path, 0755) == -1 && errno != EEXIST) {
free(path);
return (-1);
}