From: djm Date: Wed, 11 Aug 2021 05:20:17 +0000 (+0000) Subject: remove a bunch of %p in format strings; leftovers of debuggings X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=efa52ff8d7c62216c0a914ceecf719f6a8d148f4;p=openbsd remove a bunch of %p in format strings; leftovers of debuggings past. prompted by Michael Forney, ok dtucker@ --- diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index c457720d688..3318e124397 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.227 2021/07/02 05:11:20 dtucker Exp $ */ +/* $OpenBSD: monitor.c,v 1.228 2021/08/11 05:20:17 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -613,8 +613,8 @@ mm_answer_sign(struct ssh *ssh, int sock, struct sshbuf *m) } else fatal_f("no hostkey from index %d", keyid); - debug3_f("%s signature %p(%zu)", is_proof ? "hostkey proof" : "KEX", - signature, siglen); + debug3_f("%s %s signature len=%zu", alg, + is_proof ? "hostkey proof" : "KEX", siglen); sshbuf_reset(m); if ((r = sshbuf_put_string(m, signature, siglen)) != 0) @@ -914,8 +914,6 @@ mm_answer_keyallowed(struct ssh *ssh, int sock, struct sshbuf *m) (r = sshbuf_get_u32(m, &pubkey_auth_attempt)) != 0) fatal_fr(r, "parse"); - debug3_f("key_from_blob: %p", key); - if (key != NULL && authctxt->valid) { /* These should not make it past the privsep child */ if (sshkey_type_plain(key->type) == KEY_RSA && @@ -1185,7 +1183,7 @@ mm_answer_keyverify(struct ssh *ssh, int sock, struct sshbuf *m) ret = sshkey_verify(key, signature, signaturelen, data, datalen, sigalg, ssh->compat, &sig_details); - debug3_f("%s %p signature %s%s%s", auth_method, key, + debug3_f("%s %s signature %s%s%s", auth_method, sshkey_type(key), (ret == 0) ? "verified" : "unverified", (ret != 0) ? ": " : "", (ret != 0) ? ssh_err(ret) : ""); diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index e301dfc9bb6..b0b987139a5 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.328 2021/04/03 06:18:41 djm Exp $ */ +/* $OpenBSD: session.c,v 1.329 2021/08/11 05:20:17 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1464,12 +1464,11 @@ session_dump(void) for (i = 0; i < sessions_nalloc; i++) { Session *s = &sessions[i]; - debug("dump: used %d next_unused %d session %d %p " + debug("dump: used %d next_unused %d session %d " "channel %d pid %ld", s->used, s->next_unused, s->self, - s, s->chanid, (long)s->pid); } diff --git a/usr.bin/ssh/ssh-pkcs11-helper.c b/usr.bin/ssh/ssh-pkcs11-helper.c index 8c8873016a7..5b4f84e8685 100644 --- a/usr.bin/ssh/ssh-pkcs11-helper.c +++ b/usr.bin/ssh/ssh-pkcs11-helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-pkcs11-helper.c,v 1.24 2020/10/18 11:32:02 djm Exp $ */ +/* $OpenBSD: ssh-pkcs11-helper.c,v 1.25 2021/08/11 05:20:17 djm Exp $ */ /* * Copyright (c) 2010 Markus Friedl. All rights reserved. * @@ -89,7 +89,8 @@ lookup_key(struct sshkey *k) struct pkcs11_keyinfo *ki; TAILQ_FOREACH(ki, &pkcs11_keylist, next) { - debug("check %p %s %s", ki, ki->providername, ki->label); + debug("check %s %s %s", sshkey_type(ki->key), + ki->providername, ki->label); if (sshkey_equal(k, ki->key)) return (ki->key); } diff --git a/usr.bin/ssh/ssh-pkcs11.c b/usr.bin/ssh/ssh-pkcs11.c index 6287c66db13..7a91281ca35 100644 --- a/usr.bin/ssh/ssh-pkcs11.c +++ b/usr.bin/ssh/ssh-pkcs11.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-pkcs11.c,v 1.53 2021/06/25 06:30:22 djm Exp $ */ +/* $OpenBSD: ssh-pkcs11.c,v 1.54 2021/08/11 05:20:17 djm Exp $ */ /* * Copyright (c) 2010 Markus Friedl. All rights reserved. * Copyright (c) 2014 Pedro Martelletto. All rights reserved. @@ -101,8 +101,8 @@ pkcs11_provider_finalize(struct pkcs11_provider *p) CK_RV rv; CK_ULONG i; - debug("pkcs11_provider_finalize: %p refcount %d valid %d", - p, p->refcount, p->valid); + debug_f("provider \"%s\" refcount %d valid %d", + p->name, p->refcount, p->valid); if (!p->valid) return; for (i = 0; i < p->nslots; i++) { @@ -127,10 +127,10 @@ pkcs11_provider_finalize(struct pkcs11_provider *p) static void pkcs11_provider_unref(struct pkcs11_provider *p) { - debug("pkcs11_provider_unref: %p refcount %d", p, p->refcount); + debug_f("provider \"%s\" refcount %d", p->name, p->refcount); if (--p->refcount <= 0) { if (p->valid) - error("pkcs11_provider_unref: %p still valid", p); + error_f("provider \"%s\" still valid", p->name); free(p->name); free(p->slotlist); free(p->slotinfo); @@ -158,7 +158,7 @@ pkcs11_provider_lookup(char *provider_id) struct pkcs11_provider *p; TAILQ_FOREACH(p, &pkcs11_providers, next) { - debug("check %p %s", p, p->name); + debug("check provider \"%s\"", p->name); if (!strcmp(provider_id, p->name)) return (p); } @@ -328,8 +328,8 @@ pkcs11_check_obj_bool_attrib(struct pkcs11_key *k11, CK_OBJECT_HANDLE obj, return (-1); } *val = flag != 0; - debug_f("provider %p slot %lu object %lu: attrib %lu = %d", - k11->provider, k11->slotidx, obj, type, *val); + debug_f("provider \"%s\" slot %lu object %lu: attrib %lu = %d", + k11->provider->name, k11->slotidx, obj, type, *val); return (0); } @@ -421,7 +421,7 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, int rval = -1; if ((k11 = RSA_get_ex_data(rsa, rsa_idx)) == NULL) { - error("RSA_get_ex_data failed for rsa %p", rsa); + error("RSA_get_ex_data failed"); return (-1); }