From 816036f142ecd284c12bb3685ae316a68d2ef190 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Sun, 18 Oct 2020 11:32:01 +0000 Subject: upstream: use the new variant log macros instead of prepending __func__ and appending ssh_err(r) manually; ok markus@ OpenBSD-Commit-ID: 1f14b80bcfa85414b2a1a6ff714fb5362687ace8 --- auth-options.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'auth-options.c') diff --git a/auth-options.c b/auth-options.c index 98afdf5f..55b2e9b4 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.93 2020/08/27 01:07:09 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.94 2020/10/18 11:32:01 djm Exp $ */ /* * Copyright (c) 2018 Damien Miller * @@ -79,7 +79,7 @@ cert_option_list(struct sshauthopt *opts, struct sshbuf *oblob, int r, ret = -1, found; if ((c = sshbuf_fromb(oblob)) == NULL) { - error("%s: sshbuf_fromb failed", __func__); + error_f("sshbuf_fromb failed"); goto out; } @@ -88,8 +88,7 @@ cert_option_list(struct sshauthopt *opts, struct sshbuf *oblob, data = NULL; if ((r = sshbuf_get_cstring(c, &name, NULL)) != 0 || (r = sshbuf_froms(c, &data)) != 0) { - error("Unable to parse certificate options: %s", - ssh_err(r)); + error_r(r, "Unable to parse certificate options"); goto out; } debug3("found certificate option \"%.100s\" len %zu", @@ -125,8 +124,8 @@ cert_option_list(struct sshauthopt *opts, struct sshbuf *oblob, } else if (strcmp(name, "force-command") == 0) { if ((r = sshbuf_get_cstring(data, &command, NULL)) != 0) { - error("Unable to parse \"%s\" " - "section: %s", name, ssh_err(r)); + error_r(r, "Unable to parse \"%s\" " + "section", name); goto out; } if (opts->force_command != NULL) { @@ -140,8 +139,8 @@ cert_option_list(struct sshauthopt *opts, struct sshbuf *oblob, } else if (strcmp(name, "source-address") == 0) { if ((r = sshbuf_get_cstring(data, &allowed, NULL)) != 0) { - error("Unable to parse \"%s\" " - "section: %s", name, ssh_err(r)); + error_r(r, "Unable to parse \"%s\" " + "section", name); goto out; } if (opts->required_from_host_cert != NULL) { -- cgit v1.2.1