diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-07-21 19:55:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-07-21 19:55:34 +0000 |
commit | b92391d41da70468d8c8981fe2bb0ab559498995 (patch) | |
tree | 24796efa89052fa82cb8c75253a5ce1e5ddbb4d9 /bin/mv | |
parent | b2f9a23e0d8d6adf4e9f77170644813a768c44de (diff) |
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
Diffstat (limited to 'bin/mv')
-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); } |