summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmcc@openbsd.org <mmcc@openbsd.org>2015-12-11 00:20:04 +0000
committerDamien Miller <djm@mindrot.org>2015-12-11 13:23:14 +1100
commit94141b7ade24afceeb6762a3f99e09e47a6c42b6 (patch)
tree720e72d7eecee12f095144e7d469f3d20c2051c5
parentd59ce08811bf94111c2f442184cf7d1257ffae24 (diff)
upstream commit
Pass (char *)NULL rather than (char *)0 to execl and execlp. ok dtucker@ Upstream-ID: 56c955106cbddba86c3dd9bbf786ac0d1b361492
-rw-r--r--readpass.c4
-rw-r--r--ssh-pkcs11-client.c4
-rw-r--r--sshconnect2.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/readpass.c b/readpass.c
index 869d86425..05c8cac1c 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readpass.c,v 1.50 2014/02/02 03:44:31 djm Exp $ */ 1/* $OpenBSD: readpass.c,v 1.51 2015/12/11 00:20:04 mmcc Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -76,7 +76,7 @@ ssh_askpass(char *askpass, const char *msg)
76 close(p[0]); 76 close(p[0]);
77 if (dup2(p[1], STDOUT_FILENO) < 0) 77 if (dup2(p[1], STDOUT_FILENO) < 0)
78 fatal("ssh_askpass: dup2: %s", strerror(errno)); 78 fatal("ssh_askpass: dup2: %s", strerror(errno));
79 execlp(askpass, askpass, msg, (char *) 0); 79 execlp(askpass, askpass, msg, (char *)NULL);
80 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno)); 80 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno));
81 } 81 }
82 close(p[1]); 82 close(p[1]);
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index 8c74864aa..fac0167e6 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11-client.c,v 1.5 2014/06/24 01:13:21 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11-client.c,v 1.6 2015/12/11 00:20:04 mmcc Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * 4 *
@@ -173,7 +173,7 @@ pkcs11_start_helper(void)
173 close(pair[0]); 173 close(pair[0]);
174 close(pair[1]); 174 close(pair[1]);
175 execlp(_PATH_SSH_PKCS11_HELPER, _PATH_SSH_PKCS11_HELPER, 175 execlp(_PATH_SSH_PKCS11_HELPER, _PATH_SSH_PKCS11_HELPER,
176 (char *) 0); 176 (char *)NULL);
177 fprintf(stderr, "exec: %s: %s\n", _PATH_SSH_PKCS11_HELPER, 177 fprintf(stderr, "exec: %s: %s\n", _PATH_SSH_PKCS11_HELPER,
178 strerror(errno)); 178 strerror(errno));
179 _exit(1); 179 _exit(1);
diff --git a/sshconnect2.c b/sshconnect2.c
index 3c5afe507..98b67e73e 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.232 2015/12/10 17:08:40 mmcc Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.233 2015/12/11 00:20:04 mmcc Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1622,7 +1622,7 @@ ssh_keysign(struct sshkey *key, u_char **sigp, size_t *lenp,
1622 closefrom(sock + 1); 1622 closefrom(sock + 1);
1623 debug3("%s: [child] pid=%ld, exec %s", 1623 debug3("%s: [child] pid=%ld, exec %s",
1624 __func__, (long)getpid(), _PATH_SSH_KEY_SIGN); 1624 __func__, (long)getpid(), _PATH_SSH_KEY_SIGN);
1625 execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *) 0); 1625 execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *)NULL);
1626 fatal("%s: exec(%s): %s", __func__, _PATH_SSH_KEY_SIGN, 1626 fatal("%s: exec(%s): %s", __func__, _PATH_SSH_KEY_SIGN,
1627 strerror(errno)); 1627 strerror(errno));
1628 } 1628 }