diff options
author | 2014-07-21 19:55:33 +0000 | |
---|---|---|
committer | 2014-07-21 19:55:33 +0000 | |
commit | 93bbc9aef64489c62b98ab6e4ddf7ebe33a7385e (patch) | |
tree | ee7dce4746b26ea1c8fea0828e9e7a79d4df6835 | |
parent | use getlist() instead of hand-rolled equivalent, no functional change; (diff) | |
download | wireguard-openbsd-93bbc9aef64489c62b98ab6e4ddf7ebe33a7385e.tar.xz wireguard-openbsd-93bbc9aef64489c62b98ab6e4ddf7ebe33a7385e.zip |
don't try to be clever and name the _PATH_CP exec "mv", since this
breaks the instbin argv[0] mechanism
found by landry, ok guenther
-rw-r--r-- | bin/mv/mv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 23c49fb5f90..c3a5bfb6ce0 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mv.c,v 1.36 2014/05/21 06:23:02 guenther Exp $ */ +/* $OpenBSD: mv.c,v 1.37 2014/07/21 19:55:33 deraadt Exp $ */ /* $NetBSD: mv.c,v 1.9 1995/03/21 09:06:52 cgd Exp $ */ /* @@ -347,7 +347,7 @@ copy(char *from, char *to) pid_t pid; if ((pid = vfork()) == 0) { - execl(_PATH_CP, "mv", "-PRp", "--", from, to, (char *)NULL); + execl(_PATH_CP, "cp", "-PRp", "--", from, to, (char *)NULL); warn("%s", _PATH_CP); _exit(1); } @@ -365,7 +365,7 @@ copy(char *from, char *to) return (1); } if (!(pid = vfork())) { - execl(_PATH_RM, "mv", "-rf", "--", from, (char *)NULL); + execl(_PATH_RM, "cp", "-rf", "--", from, (char *)NULL); warn("%s", _PATH_RM); _exit(1); } |