-/* $OpenBSD: channels.c,v 1.449 2025/09/15 04:39:58 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.450 2025/09/25 06:23:19 jsg Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* host/port_to_connect.
*/
permission_set_add(ssh, who, where,
- local ? host : 0, local ? port : 0,
+ local ? host : NULL, local ? port : 0,
local ? NULL : host, NULL, local ? 0 : port, NULL);
pset->all_permitted = 0;
}
-/* $OpenBSD: clientloop.c,v 1.414 2025/08/18 03:43:01 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.415 2025/09/25 06:23:19 jsg Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
char *ifname = NULL;
if (tun_mode == SSH_TUNMODE_NO)
- return 0;
+ return NULL;
debug("Requesting tun unit %d in mode %d", local_tun, tun_mode);
-/* $OpenBSD: scp.c,v 1.267 2025/09/24 00:51:28 jsg Exp $ */
+/* $OpenBSD: scp.c,v 1.268 2025/09/25 06:23:19 jsg Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
}
/* Did we actually get any matches back from the glob? */
- if (g.gl_matchc == 0 && g.gl_pathc == 1 && g.gl_pathv[0] != 0) {
+ if (g.gl_matchc == 0 && g.gl_pathc == 1 && g.gl_pathv[0] != NULL) {
/*
* If nothing matched but a path returned, then it's probably
* a GLOB_NOCHECK result. Check whether the unglobbed path
}
/* Did we actually get any matches back from the glob? */
- if (g.gl_matchc == 0 && g.gl_pathc == 1 && g.gl_pathv[0] != 0) {
+ if (g.gl_matchc == 0 && g.gl_pathc == 1 && g.gl_pathv[0] != NULL) {
/*
* If nothing matched but a path returned, then it's probably
* a GLOB_NOCHECK result. Check whether the unglobbed path
if (fstat(fd, &stb) == -1) {
run_err("fstat: %s", strerror(errno));
- return (0);
+ return (NULL);
}
size = ROUNDUP(stb.st_blksize, blksize);
if (size == 0)
-/* $OpenBSD: serverloop.c,v 1.243 2025/08/18 03:43:01 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.244 2025/09/25 06:23:19 jsg Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
int r, ndx, success = 0;
const u_char *blob;
const char *sigalg, *kex_rsa_sigalg = NULL;
- u_char *sig = 0;
+ u_char *sig = NULL;
size_t blen, slen;
if ((resp = sshbuf_new()) == NULL || (sigbuf = sshbuf_new()) == NULL)
-/* $OpenBSD: sftp.c,v 1.242 2025/09/15 04:49:00 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.243 2025/09/25 06:23:19 jsg Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
} else {
if ((r = argv_split(sftp_direct, &tmp, &cpp, 1)) != 0)
fatal_r(r, "Parse -D arguments");
- if (cpp[0] == 0)
+ if (cpp[0] == NULL)
fatal("No sftp server specified via -D");
connect_to_server(cpp[0], cpp, &in, &out);
argv_free(cpp, tmp);
-/* $OpenBSD: ssh-pkcs11.c,v 1.70 2025/09/24 00:51:28 jsg Exp $ */
+/* $OpenBSD: ssh-pkcs11.c,v 1.71 2025/09/25 06:23:19 jsg Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
const u_char *oid;
if (sigp != NULL)
- *sigp = 0;
+ *sigp = NULL;
if (lenp != NULL)
*lenp = 0;
int hashalg, ret = -1, r, siglen;
if (sigp != NULL)
- *sigp = 0;
+ *sigp = NULL;
if (lenp != NULL)
*lenp = 0;
int ret = -1;
if (sigp != NULL)
- *sigp = 0;
+ *sigp = NULL;
if (lenp != NULL)
*lenp = 0;
-/* $OpenBSD: sshconnect.c,v 1.375 2025/09/15 04:49:41 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.376 2025/09/25 06:23:19 jsg Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
char **system_hostfiles, u_int num_system_hostfiles,
char ***names, u_int *nnames)
{
- struct find_by_key_ctx ctx = {0, 0, 0, 0, 0};
+ struct find_by_key_ctx ctx = {NULL, NULL, NULL, NULL, 0};
u_int i;
*names = NULL;
-/* $OpenBSD: sshsig.c,v 1.39 2025/09/15 04:52:41 djm Exp $ */
+/* $OpenBSD: sshsig.c,v 1.40 2025/09/25 06:23:19 jsg Exp $ */
/*
* Copyright (c) 2019 Google LLC
*
if (ret == 0) {
if (nprincipals == 0)
ret = SSH_ERR_KEY_NOT_FOUND;
- if (nprincipalsp != 0)
+ if (nprincipalsp != NULL)
*nprincipalsp = nprincipals;
if (principalsp != NULL) {
*principalsp = principals;