diff options
author | 2005-05-16 15:22:46 +0000 | |
---|---|---|
committer | 2005-05-16 15:22:46 +0000 | |
commit | a6dfabdaf3b05339c1127747778b7c5117a0b905 (patch) | |
tree | 45dc328673fdc53bdfe80f55e38b843b131c3594 /usr.bin/patch/util.h | |
parent | Mention no more PT_[GS]ETFPREGS on m88k. (diff) | |
download | wireguard-openbsd-a6dfabdaf3b05339c1127747778b7c5117a0b905.tar.xz wireguard-openbsd-a6dfabdaf3b05339c1127747778b7c5117a0b905.zip |
Do not call out mkdir -p, but reuse the code from mkdir(1).
Removes the possibility of nasty stuff happening thanks to unquoted
arguments in system(1).
Also plug a small memory leak.
Problems noticed by Lionel Fourquaud.
okay millert@, deraadt@
Diffstat (limited to 'usr.bin/patch/util.h')
-rw-r--r-- | usr.bin/patch/util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/patch/util.h b/usr.bin/patch/util.h index bffa571fcb1..b86358e0e55 100644 --- a/usr.bin/patch/util.h +++ b/usr.bin/patch/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.13 2004/08/05 21:47:24 deraadt Exp $ */ +/* $OpenBSD: util.h,v 1.14 2005/05/16 15:22:46 espie Exp $ */ /* * patch - a program to apply diffs to original files @@ -45,3 +45,6 @@ void ignore_signals(void); void makedirs(const char *, bool); void version(void); void my_exit(int) __attribute__((noreturn)); + +/* in mkpath.c */ +extern int mkpath(char *, mode_t, mode_t); |