summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/util.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2005-06-20 07:14:06 +0000
committerotto <otto@openbsd.org>2005-06-20 07:14:06 +0000
commit6fd3743fe6e9bb2da797aa227603f70552d86aae (patch)
treea228dcb2357acdd115194a3c6238270338964485 /usr.bin/patch/util.c
parentK&R -> ANSI (diff)
downloadwireguard-openbsd-6fd3743fe6e9bb2da797aa227603f70552d86aae.tar.xz
wireguard-openbsd-6fd3743fe6e9bb2da797aa227603f70552d86aae.zip
umask juggling not needed; with Lionel Fourquaux.
ok millert@ espie@
Diffstat (limited to 'usr.bin/patch/util.c')
-rw-r--r--usr.bin/patch/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c
index cb3b2f02f07..52e00c6ddf9 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.30 2005/05/16 15:22:46 espie Exp $ */
+/* $OpenBSD: util.c,v 1.31 2005/06/20 07:14:06 otto Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -27,7 +27,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: util.c,v 1.30 2005/05/16 15:22:46 espie Exp $";
+static const char rcsid[] = "$OpenBSD: util.c,v 1.31 2005/06/20 07:14:06 otto Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -307,7 +307,6 @@ void
makedirs(const char *filename, bool striplast)
{
char *tmpbuf;
- mode_t mode, dir_mode;
if ((tmpbuf = strdup(filename)) == NULL)
fatal("out of memory\n");
@@ -318,9 +317,7 @@ makedirs(const char *filename, bool striplast)
return; /* nothing to be done */
*s = '\0';
}
- mode = 0777 & ~umask(0);
- dir_mode = mode | S_IWUSR | S_IXUSR;
- if (mkpath(tmpbuf, mode, dir_mode) != 0)
+ if (mkpath(tmpbuf) != 0)
pfatal("creation of %s failed", tmpbuf);
free(tmpbuf);
}