diff options
author | 2015-10-27 00:49:53 +0000 | |
---|---|---|
committer | 2015-10-27 00:49:53 +0000 | |
commit | 0382b3826b068ffc7e91d059e42e647171c76b98 (patch) | |
tree | fd31351e256c82a63bc08c9cfa9c3da32b8cfd9a | |
parent | If a mouse event has no key binding, pass it through to the pane it (diff) | |
download | wireguard-openbsd-0382b3826b068ffc7e91d059e42e647171c76b98.tar.xz wireguard-openbsd-0382b3826b068ffc7e91d059e42e647171c76b98.zip |
avoid de-const warning & shrink; ok dtucker@
-rw-r--r-- | usr.bin/ssh/readconf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 59c16a5d977..b2fe90a0dbf 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.243 2015/10/25 23:14:03 dtucker Exp $ */ +/* $OpenBSD: readconf.c,v 1.244 2015/10/27 00:49:53 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -446,7 +446,7 @@ execute_in_shell(const char *cmd) /* Fork and execute the command. */ if ((pid = fork()) == 0) { - char *argv[4]; + char *argv[] = { shell, "-c", xstrdup(cmd), NULL }; /* Child. Permanently give up superuser privileges. */ permanently_drop_suid(original_real_uid); @@ -460,11 +460,6 @@ execute_in_shell(const char *cmd) close(devnull); closefrom(STDERR_FILENO + 1); - argv[0] = shell; - argv[1] = "-c"; - argv[2] = cmd; - argv[3] = NULL; - execv(argv[0], argv); error("Unable to execute '%.100s': %s", cmd, strerror(errno)); /* Die with signal to make this error apparent to parent. */ |