From nobody Sun Feb 8 21:52:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678464703; cv=none; d=zohomail.com; s=zohoarc; b=DyTY5tWygsN8ZW4j73jx0pWVfTEkpo8ZNmFd8p54nZaulfFIr/J2EiT9ZXOFdpwqAqyo/dkqzuroMmuc/vHuII9zVdzCn065vi/gSNPhtXyTC1vYgr12Pm99zTPo0MqQngLCwST/YDiCFEU6akl2cqtLX8blx+M+DItJaNsioec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464703; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NmpmCPpZp+Wz2JeqJGqgYq079Io2+K/+qRMcH3w1E/I=; b=nlBDDPdOShiXPqG0hYgcpEh0jMmsQvaejPjE1X2jSdcSRYTgmdQrZVed4HAHwY9V1NEMi+SqXGAmFTn8dyB9k+iPpSFmc24BOum5tu107snE2wLYfWkuurqpDDsC/kNgiKRx0VWvf1M8Z13NmLu+5Ds5td6LP/LGlOa13uOv23E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678464703315717.7980727227049; Fri, 10 Mar 2023 08:11:43 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-GUTNtJVtNzim-2SxNuwm_A-1; Fri, 10 Mar 2023 11:11:37 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27BCF29A9D51; Fri, 10 Mar 2023 16:10:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AFFC40C1106; Fri, 10 Mar 2023 16:10:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ECCF11946A54; Fri, 10 Mar 2023 16:10:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9709C1946A6F for ; Fri, 10 Mar 2023 16:10:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8C7B51121315; Fri, 10 Mar 2023 16:10:57 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE77D1121318 for ; Fri, 10 Mar 2023 16:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464702; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NmpmCPpZp+Wz2JeqJGqgYq079Io2+K/+qRMcH3w1E/I=; b=B9/ttISzL+WuVbyjRvm9DZeVOOxV45VkZ2JigfTlU/IJuZzmu2WGFg+9P2QrnwtKMfCoDP YFJEESjqaiDlOsAK1XmMKM8OUkumNTowOGniahvtAvNW33yi5nt0KQO0rTCVg3MLuZOBlS 66bw+AJQ9HG36Gx4srrZd0IuX78x4Ls= X-MC-Unique: GUTNtJVtNzim-2SxNuwm_A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 34/51] rpc: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:50 +0100 Message-Id: <8a10c3baea307c788714f035546fd48316e9fbcb.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678464705181100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/rpc/gendispatch.pl | 10 ++--- src/rpc/virkeepalive.c | 2 +- src/rpc/virnetclient.c | 4 +- src/rpc/virnetclientprogram.c | 26 ++++++------ src/rpc/virnetclientstream.c | 6 +-- src/rpc/virnetdaemon.c | 6 +-- src/rpc/virnetlibsshsession.c | 57 ++++++++++++------------- src/rpc/virnetmessage.c | 21 +++++----- src/rpc/virnetsaslcontext.c | 38 ++++++++--------- src/rpc/virnetserver.c | 2 +- src/rpc/virnetserverclient.c | 4 +- src/rpc/virnetserverprogram.c | 12 +++--- src/rpc/virnetsocket.c | 42 +++++++++---------- src/rpc/virnetsshsession.c | 59 ++++++++++++-------------- src/rpc/virnettlscontext.c | 78 +++++++++++++++++------------------ 15 files changed, 178 insertions(+), 189 deletions(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index b186849606..e791d2c75c 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -1178,7 +1178,7 @@ elsif ($mode eq "server") { if ($modern_ret_as_list) { print " if (nresults > $single_ret_list_max_define) {\n"; print " virReportError(VIR_ERR_INTERNAL_ERROR,\n"; - print " _(\"Too many ${single_ret_list_e= rror_msg_type}s '%d' for limit '%d'\"),\n"; + print " _(\"Too many ${single_ret_list_e= rror_msg_type}s '%1\$d' for limit '%2\$d'\"),\n"; print " nresults, $single_ret_list_max_d= efine);\n"; print " goto cleanup;\n"; print " }\n"; @@ -1845,7 +1845,7 @@ elsif ($mode eq "client") { print "\n"; print " if ($args_check->{arg} > $args_check->{limit}) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"%s length greater than maxim= um: %d > %d\"),\n"; + print " _(\"%1\$s length greater than ma= ximum: %2\$d > %3\$d\"),\n"; print " $args_check->{name}, (int)$args_= check->{arg}, $args_check->{limit});\n"; print " goto done;\n"; print " }\n"; @@ -1855,7 +1855,7 @@ elsif ($mode eq "client") { print "\n"; print " if ($single_ret_list_max_var > $single_ret_list_max= _define) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %d > %d,\"\n"; + print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %1\$d > %2\$d,\"\n"; print " \"in parameter '$single_ret_li= st_name' for 'vir$call->{ProcName}'\"),\n"; print " $single_ret_list_max_var, $singl= e_ret_list_max_define);\n"; print " goto done;\n"; @@ -1917,7 +1917,7 @@ elsif ($mode eq "client") { $modern_ret_as_list) { print " if (ret.$single_ret_list_name.${single_ret_list_nam= e}_len > $single_ret_list_max_var) {\n"; print " virReportError(VIR_ERR_RPC,\n"; - print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %d > %d,\"\n"; + print " _(\"too many remote ${single_ret= _list_error_msg_type}s: %1\$d > %2\$d,\"\n"; print " \"in parameter '$single_ret_li= st_name' for 'vir$call->{ProcName}'\"),\n"; print " ret.$single_ret_list_name.${sing= le_ret_list_name}_len, $single_ret_list_max_var);\n"; print " goto cleanup;\n"; @@ -2219,7 +2219,7 @@ elsif ($mode eq "client") { if ($action eq "Ensure") { print " if (rv =3D=3D 0)\n"; print " virReportError(VIR_ERR_ACCESS_D= ENIED,\n"; - print" _(\"'%s' denied = access\"), conn->driver->name);\n"; + print" _(\"'%1\$s' deni= ed access\"), conn->driver->name);\n"; print " return $fail;\n"; } else { print " virResetLastError();\n"; diff --git a/src/rpc/virkeepalive.c b/src/rpc/virkeepalive.c index 434cc2c7c9..d96bd347ad 100644 --- a/src/rpc/virkeepalive.c +++ b/src/rpc/virkeepalive.c @@ -249,7 +249,7 @@ virKeepAliveStart(virKeepAlive *ka, /* Guard against overflow */ if (interval > INT_MAX / 1000) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("keepalive interval %d too large"), interval); + _("keepalive interval %1$d too large"), interva= l); goto cleanup; } ka->interval =3D interval; diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 1202b0f30c..df2958935b 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1138,7 +1138,7 @@ virNetClientCallDispatchReply(virNetClient *client) =20 if (!thecall) { virReportError(VIR_ERR_RPC, - _("no call waiting for reply with prog %d vers %d s= erial %d"), + _("no call waiting for reply with prog %1$d vers %2= $d serial %3$d"), client->msg.header.prog, client->msg.header.vers, c= lient->msg.header.serial); return -1; } @@ -1327,7 +1327,7 @@ virNetClientCallDispatch(virNetClient *client) case VIR_NET_CALL_WITH_FDS: default: virReportError(VIR_ERR_RPC, - _("got unexpected RPC call prog %d vers %d proc %d = type %d"), + _("got unexpected RPC call prog %1$d vers %2$d proc= %3$d type %4$d"), client->msg.header.prog, client->msg.header.vers, client->msg.header.proc, client->msg.header.type); return -1; diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c index b93c495347..abc8e6798a 100644 --- a/src/rpc/virnetclientprogram.c +++ b/src/rpc/virnetclientprogram.c @@ -216,25 +216,25 @@ int virNetClientProgramDispatch(virNetClientProgram *= prog, =20 /* Check version, etc. */ if (msg->header.prog !=3D prog->program) { - VIR_ERROR(_("program mismatch in event (actual 0x%x, expected 0x%x= )"), + VIR_ERROR(_("program mismatch in event (actual 0x%1$x, expected 0x= %2$x)"), msg->header.prog, prog->program); return -1; } =20 if (msg->header.vers !=3D prog->version) { - VIR_ERROR(_("version mismatch in event (actual 0x%x, expected 0x%x= )"), + VIR_ERROR(_("version mismatch in event (actual 0x%1$x, expected 0x= %2$x)"), msg->header.vers, prog->version); return -1; } =20 if (msg->header.status !=3D VIR_NET_OK) { - VIR_ERROR(_("status mismatch in event (actual 0x%x, expected 0x%x)= "), + VIR_ERROR(_("status mismatch in event (actual 0x%1$x, expected 0x%= 2$x)"), msg->header.status, VIR_NET_OK); return -1; } =20 if (msg->header.type !=3D VIR_NET_MESSAGE) { - VIR_ERROR(_("type mismatch in event (actual 0x%x, expected 0x%x)"), + VIR_ERROR(_("type mismatch in event (actual 0x%1$x, expected 0x%2$= x)"), msg->header.type, VIR_NET_MESSAGE); return -1; } @@ -242,7 +242,7 @@ int virNetClientProgramDispatch(virNetClientProgram *pr= og, event =3D virNetClientProgramGetEvent(prog, msg->header.proc); =20 if (!event) { - VIR_ERROR(_("No event expected with procedure 0x%x"), + VIR_ERROR(_("No event expected with procedure 0x%1$x"), msg->header.proc); return -1; } @@ -295,13 +295,13 @@ int virNetClientProgramCall(virNetClientProgram *prog, for (i =3D 0; i < msg->nfds; i++) { if ((msg->fds[i] =3D dup(outfds[i])) < 0) { virReportSystemError(errno, - _("Cannot duplicate FD %d"), + _("Cannot duplicate FD %1$d"), outfds[i]); goto error; } if (virSetInherit(msg->fds[i], false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), msg->fds[i]); goto error; } @@ -327,18 +327,18 @@ int virNetClientProgramCall(virNetClientProgram *prog, if (msg->header.type !=3D VIR_NET_REPLY && msg->header.type !=3D VIR_NET_REPLY_WITH_FDS) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message type %d"), msg->header.type); + _("Unexpected message type %1$d"), msg->header.type= ); goto error; } if (msg->header.proc !=3D proc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message proc %d !=3D %d"), + _("Unexpected message proc %1$d !=3D %2$d"), msg->header.proc, proc); goto error; } if (msg->header.serial !=3D serial) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected message serial %d !=3D %d"), + _("Unexpected message serial %1$d !=3D %2$d"), msg->header.serial, serial); goto error; } @@ -354,13 +354,13 @@ int virNetClientProgramCall(virNetClientProgram *prog, for (i =3D 0; i < *ninfds; i++) { if (((*infds)[i] =3D dup(msg->fds[i])) < 0) { virReportSystemError(errno, - _("Cannot duplicate FD %d"), + _("Cannot duplicate FD %1$d"), msg->fds[i]); goto error; } if (virSetInherit((*infds)[i], false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"= ), (*infds)[i]); goto error; } @@ -378,7 +378,7 @@ int virNetClientProgramCall(virNetClientProgram *prog, case VIR_NET_CONTINUE: default: virReportError(VIR_ERR_RPC, - _("Unexpected message status %d"), msg->header.stat= us); + _("Unexpected message status %1$d"), msg->header.st= atus); goto error; } =20 diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c index e0e3178111..21e9332134 100644 --- a/src/rpc/virnetclientstream.c +++ b/src/rpc/virnetclientstream.c @@ -417,7 +417,7 @@ virNetClientStreamSetHole(virNetClientStream *st, /* Shouldn't happen, But it's better to safe than sorry. */ if (st->holeLength) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unprocessed hole of size %lld already in the que= ue"), + _("unprocessed hole of size %1$lld already in the q= ueue"), st->holeLength); return -1; } @@ -462,7 +462,7 @@ virNetClientStreamHandleHole(virNetClient *client, =20 if (msg->header.type !=3D VIR_NET_STREAM_HOLE) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid message prog=3D%d type=3D%d serial=3D%u = proc=3D%d"), + _("Invalid message prog=3D%1$d type=3D%2$d serial= =3D%3$u proc=3D%4$d"), msg->header.prog, msg->header.type, msg->header.serial, @@ -851,7 +851,7 @@ int virNetClientStreamInData(virNetClientStream *st, st->holeLength =3D 0; } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid message prog=3D%d type=3D%d serial=3D%u = proc=3D%d"), + _("Invalid message prog=3D%1$d type=3D%2$d serial= =3D%3$u proc=3D%4$d"), msg->header.prog, msg->header.type, msg->header.serial, diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c index c4f5bbdce5..1292faa078 100644 --- a/src/rpc/virnetdaemon.c +++ b/src/rpc/virnetdaemon.c @@ -194,7 +194,7 @@ virNetDaemonGetServer(virNetDaemon *dmn, =20 if (!srv) { virReportError(VIR_ERR_NO_SERVER, - _("No server named '%s'"), serverName); + _("No server named '%1$s'"), serverName); } =20 return srv; @@ -324,7 +324,7 @@ virNetDaemonNewPostExecRestart(virJSONValue *object, size_t n =3D virJSONValueArraySize(servers); if (n > nDefServerNames) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Server count %zd greater than default name c= ount %zu"), + _("Server count %1$zd greater than default name= count %2$zu"), n, nDefServerNames); goto error; } @@ -646,7 +646,7 @@ virNetDaemonSignalEvent(int watch, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected signal received: %d"), siginfo.si_signo); + _("Unexpected signal received: %1$d"), siginfo.si_signo= ); =20 cleanup: virObjectUnlock(dmn); diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index bba37210df..e71a79d0fb 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -261,10 +261,8 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) =20 /* host key verification failed */ virReportError(VIR_ERR_AUTH_FAILED, - _("!!! SSH HOST KEY VERIFICATION FAILED !!!: " - "Identity of host '%s:%d' differs from stored ide= ntity. " - "Please verify the new host key '%s' to avoid pos= sible " - "man in the middle attack. The key is stored in '= %s'."), + _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identi= ty of host '%1$s:%2$d' differs from stored identity. " + "Please verify the new host key '%3$s' to avoid p= ossible man in the middle attack. The key is stored in '%4$s'."), sess->hostname, sess->port, keyhashstr, sess->knownHostsFile); =20 @@ -290,7 +288,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (!keyhashstr) return -1; =20 - prompt =3D g_strdup_printf(_("Accept SSH host key with hash '%= s' for " "host '%s:%d' (%s/%s)?"), + prompt =3D g_strdup_printf(_("Accept SSH host key with hash '%= 1$s' for host '%2$s:%3$d' (%4$s/%5$s)?"), keyhashstr, sess->hostname, sess->por= t, "y", "n"); =20 if (!(cred =3D virAuthAskCredential(sess->cred, prompt, true))= ) { @@ -301,7 +299,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (!cred->result || STRCASENEQ(cred->result, "y")) { virReportError(VIR_ERR_LIBSSH, - _("SSH host key for '%s' (%s) was not accep= ted"), + _("SSH host key for '%1$s' (%2$s) was not a= ccepted"), sess->hostname, keyhashstr); ssh_string_free_char(keyhashstr); return -1; @@ -314,7 +312,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) if (ssh_session_update_known_hosts(sess->session) < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to write known_host file '%s': %s= "), + _("failed to write known_host file '%1$s': = %2$s"), sess->knownHostsFile, errmsg); return -1; @@ -326,7 +324,7 @@ virNetLibsshCheckHostKey(virNetLibsshSession *sess) case SSH_SERVER_ERROR: errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to validate SSH host key: %s"), + _("failed to validate SSH host key: %1$s"), errmsg); return -1; =20 @@ -395,14 +393,13 @@ virNetLibsshImportPrivkey(virNetLibsshSession *sess, sess, &key); if (ret =3D=3D SSH_EOF) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while reading private key '%s'"), + _("error while reading private key '%1$s'"), priv->filename); return SSH_AUTH_ERROR; } else if (ret =3D=3D SSH_ERROR) { if (virGetLastErrorCode() =3D=3D VIR_ERR_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while opening private key '%s', wrong " - "passphrase?"), + _("error while opening private key '%1$s', wron= g passphrase?"), priv->filename); } return SSH_AUTH_ERROR; @@ -435,7 +432,7 @@ virNetLibsshAuthenticatePrivkey(virNetLibsshSession *se= ss, ret =3D ssh_pki_import_pubkey_file(tmp, &public_key); if (ret =3D=3D SSH_ERROR) { virReportError(VIR_ERR_AUTH_FAILED, - _("error while reading public key '%s'"), + _("error while reading public key '%1$s'"), tmp); err =3D SSH_AUTH_ERROR; goto error; @@ -449,8 +446,7 @@ virNetLibsshAuthenticatePrivkey(virNetLibsshSession *se= ss, ret =3D ssh_pki_export_privkey_to_pubkey(private_key, &public_key); if (ret =3D=3D SSH_ERROR) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot export the public key from the " - "private key '%s'"), + _("cannot export the public key from the privat= e key '%1$s'"), priv->filename); err =3D SSH_AUTH_ERROR; goto error; @@ -535,7 +531,7 @@ virNetLibsshAuthenticatePassword(virNetLibsshSession *s= ess) g_autoptr(virConnectCredential) cred =3D NULL; g_autofree char *prompt =3D NULL; =20 - prompt =3D g_strdup_printf(_("Enter %s's password for %s"), + prompt =3D g_strdup_printf(_("Enter %1$s's password for %2$s"), sess->username, sess->hostname); =20 if (!(cred =3D virAuthAskCredential(sess->cred, prompt, false))) @@ -552,7 +548,7 @@ virNetLibsshAuthenticatePassword(virNetLibsshSession *s= ess) error: errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); return rc; } =20 @@ -632,7 +628,7 @@ virNetLibsshAuthenticateKeyboardInteractive(virNetLibss= hSession *sess, cred->result) < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); return SSH_AUTH_ERROR; } =20 @@ -649,7 +645,7 @@ virNetLibsshAuthenticateKeyboardInteractive(virNetLibss= hSession *sess, /* error path */ errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); } =20 return ret; @@ -679,7 +675,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (ret =3D=3D SSH_AUTH_ERROR) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("Failed to authenticate as 'none': %s"), + _("Failed to authenticate as 'none': %1$s"), errmsg); return -1; } @@ -708,7 +704,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (ret =3D=3D SSH_AUTH_ERROR) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to authenticate using agent: %s"), + _("failed to authenticate using agent: %1$s= "), errmsg); } break; @@ -736,7 +732,7 @@ virNetLibsshAuthenticate(virNetLibsshSession *sess) if (sess->nauths =3D=3D 1) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to authenticate: %s"), + _("failed to authenticate: %1$s"), errmsg); } else if (no_method && !auth_failed) { virReportError(VIR_ERR_AUTH_FAILED, "%s", @@ -761,7 +757,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (!sess->channel) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to create libssh channel: %s"), + _("failed to create libssh channel: %1$s"), errmsg); return -1; } @@ -769,7 +765,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (ssh_channel_open_session(sess->channel) !=3D SSH_OK) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to open ssh channel: %s"), + _("failed to open ssh channel: %1$s"), errmsg); return -1; } @@ -777,7 +773,7 @@ virNetLibsshOpenChannel(virNetLibsshSession *sess) if (ssh_channel_request_exec(sess->channel, sess->channelCommand) !=3D= SSH_OK) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("failed to execute command '%s': %s"), + _("failed to execute command '%1$s': %2$s"), sess->channelCommand, errmsg); return -1; @@ -1058,7 +1054,7 @@ virNetLibsshSessionConnect(virNetLibsshSession *sess, if (ret < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_NO_CONNECT, - _("SSH session handshake failed: %s"), + _("SSH session handshake failed: %1$s"), errmsg); goto error; } @@ -1103,8 +1099,7 @@ virNetLibsshChannelRead(virNetLibsshSession *sess, if (sess->state !=3D VIR_NET_LIBSSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated " - "with non-zero code: %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_LIBSSH, "%s", @@ -1189,7 +1184,7 @@ virNetLibsshChannelRead(virNetLibsshSession *sess, eof: if (ssh_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_LIBSSH, - _("Remote command terminated with non-zero code= : %d"), + _("Remote command terminated with non-zero code= : %1$d"), ssh_channel_get_exit_status(sess->channel)); sess->channelCommandReturnValue =3D ssh_channel_get_exit_statu= s(sess->channel); sess->state =3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE; @@ -1224,7 +1219,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, if (sess->state !=3D VIR_NET_LIBSSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_LIBSSH, "%s", @@ -1236,7 +1231,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, if (ssh_channel_is_eof(sess->channel)) { if (ssh_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_LIBSSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), ssh_channel_get_exit_status(sess->channel)); sess->state =3D VIR_NET_LIBSSH_STATE_ERROR_REMOTE; sess->channelCommandReturnValue =3D ssh_channel_get_exit_statu= s(sess->channel); @@ -1261,7 +1256,7 @@ virNetLibsshChannelWrite(virNetLibsshSession *sess, sess->state =3D VIR_NET_LIBSSH_STATE_ERROR; msg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, - _("write failed: %s"), msg); + _("write failed: %1$s"), msg); } =20 cleanup: diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c index c9698fb263..50cc335fd6 100644 --- a/src/rpc/virnetmessage.c +++ b/src/rpc/virnetmessage.c @@ -141,7 +141,7 @@ int virNetMessageDecodeLength(virNetMessage *msg) =20 if (len < VIR_NET_MESSAGE_LEN_MAX) { virReportError(VIR_ERR_RPC, - _("packet %d bytes received from server too small, = want %d"), + _("packet %1$d bytes received from server too small= , want %2$d"), len, VIR_NET_MESSAGE_LEN_MAX); goto cleanup; } @@ -151,7 +151,7 @@ int virNetMessageDecodeLength(virNetMessage *msg) =20 if (len > VIR_NET_MESSAGE_MAX) { virReportError(VIR_ERR_RPC, - _("packet %d bytes received from server too large, = want %d"), + _("packet %1$d bytes received from server too large= , want %2$d"), len, VIR_NET_MESSAGE_MAX); goto cleanup; } @@ -287,7 +287,7 @@ int virNetMessageEncodeNumFDs(virNetMessage *msg) =20 if (numFDs > VIR_NET_MESSAGE_NUM_FDS_MAX) { virReportError(VIR_ERR_RPC, - _("Too many FDs to send %d, expected %d maximum"), + _("Too many FDs to send %1$d, expected %2$d maximum= "), numFDs, VIR_NET_MESSAGE_NUM_FDS_MAX); goto cleanup; } @@ -325,7 +325,7 @@ int virNetMessageDecodeNumFDs(virNetMessage *msg) =20 if (numFDs > VIR_NET_MESSAGE_NUM_FDS_MAX) { virReportError(VIR_ERR_RPC, - _("Received too many FDs %d, expected %d maximum"), + _("Received too many FDs %1$d, expected %2$d maximu= m"), numFDs, VIR_NET_MESSAGE_NUM_FDS_MAX); goto cleanup; } @@ -457,8 +457,7 @@ int virNetMessageEncodePayloadRaw(virNetMessage *msg, if ((msg->bufferOffset + len) > (VIR_NET_MESSAGE_MAX + VIR_NET_MESSAGE_LEN_MAX)) { virReportError(VIR_ERR_RPC, - _("Stream data too long to send " - "(%zu bytes needed, %zu bytes available)"= ), + _("Stream data too long to send (%1$zu byte= s needed, %2$zu bytes available)"), len, VIR_NET_MESSAGE_MAX + VIR_NET_MESSAGE_LEN_MAX - @@ -549,20 +548,20 @@ int virNetMessageDupFD(virNetMessage *msg, =20 if (slot >=3D msg->nfds) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No FD available at slot %zu"), slot); + _("No FD available at slot %1$zu"), slot); return -1; } =20 if ((fd =3D dup(msg->fds[slot])) < 0) { virReportSystemError(errno, - _("Unable to duplicate FD %d"), + _("Unable to duplicate FD %1$d"), msg->fds[slot]); return -1; } if (virSetInherit(fd, false) < 0) { VIR_FORCE_CLOSE(fd); virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), fd); return -1; } @@ -576,14 +575,14 @@ int virNetMessageAddFD(virNetMessage *msg, =20 if ((newfd =3D dup(fd)) < 0) { virReportSystemError(errno, - _("Unable to duplicate FD %d"), + _("Unable to duplicate FD %1$d"), fd); goto error; } =20 if (virSetInherit(newfd, false) < 0) { virReportSystemError(errno, - _("Cannot set close-on-exec %d"), + _("Cannot set close-on-exec %1$d"), newfd); goto error; } diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index dbf777cfa3..7151225cc3 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -78,7 +78,7 @@ static int virNetSASLContextClientOnceInit(void) int err =3D sasl_client_init(NULL); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("failed to initialize SASL library: %d (%s)"), + _("failed to initialize SASL library: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -94,7 +94,7 @@ static int virNetSASLContextServerOnceInit(void) int err =3D sasl_server_init(NULL, "libvirt"); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("failed to initialize SASL library: %d (%s)"), + _("failed to initialize SASL library: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -162,7 +162,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContext *c= txt, } =20 /* Denied */ - VIR_ERROR(_("SASL client identity '%s' not allowed by ACL"), identity); + VIR_ERROR(_("SASL client identity '%1$s' not allowed by ACL"), identit= y); =20 /* This is the most common error: make it informative. */ virReportError(VIR_ERR_SYSTEM_ERROR, "%s", @@ -206,7 +206,7 @@ virNetSASLSession *virNetSASLSessionNewClient(virNetSAS= LContext *ctxt G_GNUC_UNU &sasl->conn); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to create SASL client context: %d (%s)"), + _("Failed to create SASL client context: %1$d (%2$s= )"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -243,7 +243,7 @@ virNetSASLSession *virNetSASLSessionNewServer(virNetSAS= LContext *ctxt G_GNUC_UNU &sasl->conn); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to create SASL client context: %d (%s)"), + _("Failed to create SASL client context: %1$d (%2$s= )"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -265,7 +265,7 @@ int virNetSASLSessionExtKeySize(virNetSASLSession *sasl, err =3D sasl_setprop(sasl->conn, SASL_SSF_EXTERNAL, &ssf); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot set external SSF %d (%s)"), + _("cannot set external SSF %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -286,7 +286,7 @@ const char *virNetSASLSessionGetIdentity(virNetSASLSess= ion *sasl) err =3D sasl_getprop(sasl->conn, SASL_USERNAME, &val); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot query SASL username on connection %d (%s)= "), + _("cannot query SASL username on connection %1$d (%= 2$s)"), err, sasl_errstring(err, NULL, NULL)); val =3D NULL; goto cleanup; @@ -314,7 +314,7 @@ int virNetSASLSessionGetKeySize(virNetSASLSession *sasl) err =3D sasl_getprop(sasl->conn, SASL_SSF, &val); if (err !=3D SASL_OK) { virReportError(VIR_ERR_AUTH_FAILED, - _("cannot query SASL ssf on connection %d (%s)"), + _("cannot query SASL ssf on connection %1$d (%2$s)"= ), err, sasl_errstring(err, NULL, NULL)); ssf =3D -1; goto cleanup; @@ -350,7 +350,7 @@ int virNetSASLSessionSecProps(virNetSASLSession *sasl, err =3D sasl_setprop(sasl->conn, SASL_SEC_PROPS, &secprops); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot set security props %d (%s)"), + _("cannot set security props %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -374,7 +374,7 @@ static int virNetSASLSessionUpdateBufSize(virNetSASLSes= sion *sasl) err =3D sasl_getprop(sasl->conn, SASL_MAXOUTBUF, &u.ptr); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot get security props %d (%s)"), + _("cannot get security props %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); return -1; } @@ -402,7 +402,7 @@ char *virNetSASLSessionListMechanisms(virNetSASLSession= *sasl) NULL); if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot list SASL mechanisms %d (%s)"), + _("cannot list SASL mechanisms %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); goto cleanup; } @@ -458,7 +458,7 @@ int virNetSASLSessionClientStart(virNetSASLSession *sas= l, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -507,7 +507,7 @@ int virNetSASLSessionClientStep(virNetSASLSession *sasl, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to step SASL negotiation: %d (%s)"), + _("Failed to step SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -553,7 +553,7 @@ int virNetSASLSessionServerStart(virNetSASLSession *sas= l, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -598,7 +598,7 @@ int virNetSASLSessionServerStep(virNetSASLSession *sasl, break; default: virReportError(VIR_ERR_AUTH_FAILED, - _("Failed to start SASL negotiation: %d (%s)"), + _("Failed to start SASL negotiation: %1$d (%2$s)"), err, sasl_errdetail(sasl->conn)); break; } @@ -631,7 +631,7 @@ ssize_t virNetSASLSessionEncode(virNetSASLSession *sasl, virObjectLock(sasl); if (inputLen > sasl->maxbufsize) { virReportSystemError(EINVAL, - _("SASL data length %zu too long, max %zu"), + _("SASL data length %1$zu too long, max %2$zu= "), inputLen, sasl->maxbufsize); goto cleanup; } @@ -645,7 +645,7 @@ ssize_t virNetSASLSessionEncode(virNetSASLSession *sasl, =20 if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to encode SASL data: %d (%s)"), + _("failed to encode SASL data: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } @@ -670,7 +670,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSession *sasl, virObjectLock(sasl); if (inputLen > sasl->maxbufsize) { virReportSystemError(EINVAL, - _("SASL data length %zu too long, max %zu"), + _("SASL data length %1$zu too long, max %2$zu= "), inputLen, sasl->maxbufsize); goto cleanup; } @@ -683,7 +683,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSession *sasl, *outputlen =3D outlen; if (err !=3D SASL_OK) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to decode SASL data: %d (%s)"), + _("failed to decode SASL data: %1$d (%2$s)"), err, sasl_errstring(err, NULL, NULL)); goto cleanup; } diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index e97dfe8136..7233629f22 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -1110,7 +1110,7 @@ virNetServerGetClient(virNetServer *srv, return virObjectRef(client); } =20 - virReportError(VIR_ERR_NO_CLIENT, _("No client with matching ID '%llu'= "), id); + virReportError(VIR_ERR_NO_CLIENT, _("No client with matching ID '%1$ll= u'"), id); return NULL; } =20 diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index bdb3552c5d..c0c018b6be 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -1116,7 +1116,7 @@ static ssize_t virNetServerClientRead(virNetServerCli= ent *client) =20 if (client->rx->bufferLength <=3D client->rx->bufferOffset) { virReportError(VIR_ERR_RPC, - _("unexpected zero/negative length request %lld"), + _("unexpected zero/negative length request %1$lld"), (long long int)(client->rx->bufferLength - client->= rx->bufferOffset)); client->wantClose =3D true; return -1; @@ -1289,7 +1289,7 @@ static ssize_t virNetServerClientWrite(virNetServerCl= ient *client) =20 if (client->tx->bufferLength < client->tx->bufferOffset) { virReportError(VIR_ERR_RPC, - _("unexpected zero/negative length request %lld"), + _("unexpected zero/negative length request %1$lld"), (long long int)(client->tx->bufferLength - client->= tx->bufferOffset)); client->wantClose =3D true; return -1; diff --git a/src/rpc/virnetserverprogram.c b/src/rpc/virnetserverprogram.c index 58b6a278ca..2cce188a09 100644 --- a/src/rpc/virnetserverprogram.c +++ b/src/rpc/virnetserverprogram.c @@ -232,7 +232,7 @@ int virNetServerProgramUnknownError(virNetServerClient = *client, virNetMessageError rerr; =20 virReportError(VIR_ERR_RPC, - _("Cannot find program %d version %d"), req->prog, req-= >vers); + _("Cannot find program %1$d version %2$d"), req->prog, = req->vers); =20 memset(&rerr, 0, sizeof(rerr)); return virNetServerProgramSendError(req->prog, @@ -284,14 +284,14 @@ int virNetServerProgramDispatch(virNetServerProgram *= prog, /* Check version, etc. */ if (msg->header.prog !=3D prog->program) { virReportError(VIR_ERR_RPC, - _("program mismatch (actual %x, expected %x)"), + _("program mismatch (actual %1$x, expected %2$x)"), msg->header.prog, prog->program); goto error; } =20 if (msg->header.vers !=3D prog->version) { virReportError(VIR_ERR_RPC, - _("version mismatch (actual %x, expected %x)"), + _("version mismatch (actual %1$x, expected %2$x)"), msg->header.vers, prog->version); goto error; } @@ -323,7 +323,7 @@ int virNetServerProgramDispatch(virNetServerProgram *pr= og, case VIR_NET_STREAM_HOLE: default: virReportError(VIR_ERR_RPC, - _("Unexpected message type %u"), + _("Unexpected message type %1$u"), msg->header.type); goto error; } @@ -377,7 +377,7 @@ virNetServerProgramDispatchCall(virNetServerProgram *pr= og, =20 if (msg->header.status !=3D VIR_NET_OK) { virReportError(VIR_ERR_RPC, - _("Unexpected message status %u"), + _("Unexpected message status %1$u"), msg->header.status); goto error; } @@ -386,7 +386,7 @@ virNetServerProgramDispatchCall(virNetServerProgram *pr= og, =20 if (!dispatcher) { virReportError(VIR_ERR_RPC, - _("unknown procedure: %d"), + _("unknown procedure: %1$d"), msg->header.proc); goto error; } diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index b248ce24dc..910fb8dd67 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -162,7 +162,7 @@ virNetSocketCheckProtocolByLookup(const char *address, gaierr =3D=3D EAI_NONAME) { } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Cannot resolve %s address: %s"), + _("Cannot resolve %1$s address: %2$s"), address, gai_strerror(gaierr)); return -1; @@ -346,7 +346,7 @@ int virNetSocketNewListenTCP(const char *nodename, e =3D getaddrinfo(nodename, service, &hints, &ai); if (e !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to resolve address '%s' service '%s': %s"= ), + _("Unable to resolve address '%1$s' service '%2$s':= %3$s"), nodename, service, gai_strerror(e)); return -1; } @@ -495,7 +495,7 @@ int virNetSocketNewListenUNIX(const char *path, addr.data.un.sun_family =3D AF_UNIX; if (virStrcpyStatic(addr.data.un.sun_path, path) < 0) { virReportSystemError(ENAMETOOLONG, - _("Path %s too long for unix socket"), path); + _("Path %1$s too long for unix socket"), path= ); goto error; } if (addr.data.un.sun_path[0] =3D=3D '@') @@ -508,7 +508,7 @@ int virNetSocketNewListenUNIX(const char *path, if (bind(fd, &addr.data.sa, addr.len) < 0) { umask(oldmask); virReportSystemError(errno, - _("Failed to bind socket to '%s'"), + _("Failed to bind socket to '%1$s'"), path); goto error; } @@ -519,7 +519,7 @@ int virNetSocketNewListenUNIX(const char *path, */ if (grp !=3D 0 && chown(path, user, grp)) { virReportSystemError(errno, - _("Failed to change ownership of '%s' to %d:%= d"), + _("Failed to change ownership of '%1$s' to %2= $d:%3$d"), path, (int)user, (int)grp); goto error; } @@ -598,7 +598,7 @@ int virNetSocketNewConnectTCP(const char *nodename, e =3D getaddrinfo(nodename, service, &hints, &ai); if (e !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to resolve address '%s' service '%s': %s"= ), + _("Unable to resolve address '%1$s' service '%2$s':= %3$s"), nodename, service, gai_strerror(e)); return -1; } @@ -625,7 +625,7 @@ int virNetSocketNewConnectTCP(const char *nodename, =20 if (fd =3D=3D -1) { virReportSystemError(savedErrno, - _("unable to connect to server at '%s:%s'"), + _("unable to connect to server at '%1$s:%2$s'= "), nodename, service); goto error; } @@ -685,7 +685,7 @@ int virNetSocketNewConnectUNIX(const char *path, =20 if (g_mkdir_with_parents(rundir, 0700) < 0) { virReportSystemError(errno, - _("Cannot create user runtime directory '= %s'"), + _("Cannot create user runtime directory '= %1$s'"), rundir); goto cleanup; } @@ -694,12 +694,12 @@ int virNetSocketNewConnectUNIX(const char *path, =20 if ((lockfd =3D open(lockpath, O_RDWR | O_CREAT, 0600)) < 0 || virSetCloseExec(lockfd) < 0) { - virReportSystemError(errno, _("Unable to create lock '%s'"), l= ockpath); + virReportSystemError(errno, _("Unable to create lock '%1$s'"),= lockpath); goto cleanup; } =20 if (virFileLock(lockfd, false, 0, 1, true) < 0) { - virReportSystemError(errno, _("Unable to lock '%s'"), lockpath= ); + virReportSystemError(errno, _("Unable to lock '%1$s'"), lockpa= th); goto cleanup; } } @@ -711,7 +711,7 @@ int virNetSocketNewConnectUNIX(const char *path, =20 remoteAddr.data.un.sun_family =3D AF_UNIX; if (virStrcpyStatic(remoteAddr.data.un.sun_path, path) < 0) { - virReportSystemError(ENOMEM, _("Path %s too long for unix socket")= , path); + virReportSystemError(ENOMEM, _("Path %1$s too long for unix socket= "), path); goto cleanup; } if (remoteAddr.data.un.sun_path[0] =3D=3D '@') @@ -728,7 +728,7 @@ int virNetSocketNewConnectUNIX(const char *path, if (!spawnDaemonPath || retries =3D=3D 0 || (errno !=3D ENOENT && errno !=3D ECONNREFUSED)) { - virReportSystemError(errno, _("Failed to connect socket to '%s= '"), + virReportSystemError(errno, _("Failed to connect socket to '%1= $s'"), path); goto cleanup; } @@ -924,7 +924,7 @@ virNetSocketNewConnectLibSSH2(const char *host, verify =3D VIR_NET_SSH_HOSTKEY_VERIFY_NORMAL; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid host key verification method: '%s'"), + _("Invalid host key verification method: '%1$s'"), knownHostsVerify); goto error; } @@ -955,7 +955,7 @@ virNetSocketNewConnectLibSSH2(const char *host, ret =3D virNetSSHSessionAuthAddAgentAuth(sess); } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid authentication method: '%s'"), + _("Invalid authentication method: '%1$s'"), authMethod); ret =3D -1; goto error; @@ -1050,7 +1050,7 @@ virNetSocketNewConnectLibssh(const char *host, verify =3D VIR_NET_LIBSSH_HOSTKEY_VERIFY_NORMAL; } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid host key verification method: '%s'"), + _("Invalid host key verification method: '%1$s'"), knownHostsVerify); goto error; } @@ -1080,7 +1080,7 @@ virNetSocketNewConnectLibssh(const char *host, ret =3D virNetLibsshSessionAuthAddAgentAuth(sess); } else { virReportError(VIR_ERR_INVALID_ARG, - _("Invalid authentication method: '%s'"), + _("Invalid authentication method: '%1$s'"), authMethod); ret =3D -1; goto error; @@ -1259,14 +1259,14 @@ virJSONValue *virNetSocketPreExecRestart(virNetSock= et *sock) =20 if (virSetInherit(sock->fd, true) < 0) { virReportSystemError(errno, - _("Cannot disable close-on-exec flag on socke= t %d"), + _("Cannot disable close-on-exec flag on socke= t %1$d"), sock->fd); goto error; } if (sock->errfd !=3D -1 && virSetInherit(sock->errfd, true) < 0) { virReportSystemError(errno, - _("Cannot disable close-on-exec flag on pipe = %d"), + _("Cannot disable close-on-exec flag on pipe = %1$d"), sock->errfd); goto error; } @@ -1764,7 +1764,7 @@ static ssize_t virNetSocketReadWire(virNetSocket *soc= k, char *buf, size_t len) if (ret < 0) { if (errout) virReportSystemError(errno, - _("Cannot recv data: %s"), errout); + _("Cannot recv data: %1$s"), errout); else virReportSystemError(errno, "%s", _("Cannot recv data")); @@ -1778,7 +1778,7 @@ static ssize_t virNetSocketReadWire(virNetSocket *soc= k, char *buf, size_t len) } else { if (errout) virReportSystemError(EIO, - _("End of file while reading data: %s= "), + _("End of file while reading data: %1= $s"), errout); else virReportSystemError(EIO, "%s", @@ -1985,7 +1985,7 @@ int virNetSocketSendFD(virNetSocket *sock, int fd) ret =3D 0; else virReportSystemError(errno, - _("Failed to send file descriptor %d"), + _("Failed to send file descriptor %1$d"), fd); goto cleanup; } diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index a3dd60f5a3..7bf27c161a 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -286,7 +286,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) if (!key) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("Failed to retrieve ssh host key: %s"), + _("Failed to retrieve ssh host key: %1$s"), errmsg); return -1; } @@ -346,7 +346,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) keyhashstr =3D virBufferContentAndReset(&buff); =20 askKey.type =3D VIR_CRED_ECHOPROMPT; - askKey.prompt =3D g_strdup_printf(_("Accept SSH host key with = hash '%s' for " "host '%s:%d' (%s/%s)?"), + askKey.prompt =3D g_strdup_printf(_("Accept SSH host key with = hash '%1$s' for host '%2$s:%3$d' (%4$s/%5$s)?"), keyhashstr, sess->hostname, se= ss->port, "y", "n"); =20 if (sess->cred->cb(&askKey, 1, sess->cred->cbdata)) { @@ -365,7 +365,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) if (!askKey.result || STRCASENEQ(askKey.result, "y")) { virReportError(VIR_ERR_SSH, - _("SSH host key for '%s' (%s) was not accep= ted"), + _("SSH host key for '%1$s' (%2$s) was not a= ccepted"), sess->hostname, keyhashstr); VIR_FREE(keyhashstr); VIR_FREE(askKey.result); @@ -427,7 +427,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) NULL) < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("unable to add SSH host key for host '%s': %s= "), + _("unable to add SSH host key for host '%1$s': = %2$s"), hostnameStr, errmsg); VIR_FREE(hostnameStr); return -1; @@ -442,7 +442,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) LIBSSH2_KNOWNHOST_FILE_OPENSSH) <= 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0= ); virReportError(VIR_ERR_SSH, - _("failed to write known_host file '%s': %s= "), + _("failed to write known_host file '%1$s': = %2$s"), sess->knownHostsFile, errmsg); return -1; @@ -458,10 +458,8 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) case LIBSSH2_KNOWNHOST_CHECK_MISMATCH: /* host key verification failed */ virReportError(VIR_ERR_AUTH_FAILED, - _("!!! SSH HOST KEY VERIFICATION FAILED !!!: " - "Identity of host '%s:%d' differs from stored ide= ntity. " - "Please verify the new host key '%s' to avoid pos= sible " - "man in the middle attack. The key is stored in '= %s'."), + _("!!! SSH HOST KEY VERIFICATION FAILED !!!: Identi= ty of host '%1$s:%2$d' differs from stored identity. " + "Please verify the new host key '%3$s' to avoid p= ossible man in the middle attack. The key is stored in '%4$s'."), sess->hostname, sess->port, knownHostEntry->key, sess->knownHostsFile); return -1; @@ -469,7 +467,7 @@ virNetSSHCheckHostKey(virNetSSHSession *sess) case LIBSSH2_KNOWNHOST_CHECK_FAILURE: libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to validate SSH host key: %s"), + _("failed to validate SSH host key: %1$s"), errmsg); return -1; =20 @@ -525,7 +523,7 @@ virNetSSHAuthenticateAgent(virNetSSHSession *sess) VIR_WARNINGS_RESET libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("failed to authenticate using SSH agent: %s"), + _("failed to authenticate using SSH agent: %1$s= "), errmsg); return -1; } @@ -549,7 +547,7 @@ virNetSSHAuthenticateAgent(virNetSSHSession *sess) =20 libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("failed to authenticate using SSH agent: %s"), + _("failed to authenticate using SSH agent: %1$s"), errmsg); return -1; } @@ -586,8 +584,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, VIR_WARNINGS_RESET libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication with private key '%s' " - "has failed: %s"), + _("authentication with private key '%1$s' has faile= d: %2$s"), priv->filename, errmsg); return 1; /* auth failed */ } @@ -617,7 +614,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, return -1; } =20 - retr_passphrase.prompt =3D g_strdup_printf(_("Passphrase for key '%s'"= ), + retr_passphrase.prompt =3D g_strdup_printf(_("Passphrase for key '%1$s= '"), priv->filename); =20 if (sess->cred->cb(&retr_passphrase, 1, sess->cred->cbdata)) { @@ -643,8 +640,7 @@ virNetSSHAuthenticatePrivkey(virNetSSHSession *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication with private key '%s' " - "has failed: %s"), + _("authentication with private key '%1$s' has faile= d: %2$s"), priv->filename, errmsg); =20 VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR @@ -709,7 +705,7 @@ virNetSSHAuthenticatePassword(virNetSSHSession *sess) /* error path */ libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("authentication failed: %s"), errmsg); + _("authentication failed: %1$s"), errmsg); =20 /* determine exist status */ if (rc =3D=3D LIBSSH2_ERROR_AUTHENTICATION_FAILED) @@ -781,14 +777,14 @@ virNetSSHAuthenticateKeyboardInteractive(virNetSSHSes= sion *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("keyboard interactive authentication failed: = %s"), + _("keyboard interactive authentication failed: = %1$s"), errmsg); return -1; } } libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_AUTH_FAILED, - _("keyboard interactive authentication failed: %s"), + _("keyboard interactive authentication failed: %1$s"), errmsg); return 1; } @@ -824,7 +820,7 @@ virNetSSHAuthenticate(virNetSSHSession *sess) =20 libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("couldn't retrieve authentication methods list: %= s"), + _("couldn't retrieve authentication methods list: %= 1$s"), errmsg); return -1; } @@ -895,7 +891,7 @@ virNetSSHOpenChannel(virNetSSHSession *sess) if (!sess->channel) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to open ssh channel: %s"), + _("failed to open ssh channel: %1$s"), errmsg); return -1; } @@ -903,7 +899,7 @@ virNetSSHOpenChannel(virNetSSHSession *sess) if (libssh2_channel_exec(sess->channel, sess->channelCommand) !=3D 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_SSH, - _("failed to execute command '%s': %s"), + _("failed to execute command '%1$s': %2$s"), sess->channelCommand, errmsg); return -1; @@ -1080,13 +1076,13 @@ virNetSSHSessionSetHostKeyVerification(virNetSSHSes= sion *sess, LIBSSH2_KNOWNHOST_FILE_OPENSSH)= < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0= ); virReportError(VIR_ERR_SSH, - _("unable to load knownhosts file '%s': %s"= ), + _("unable to load knownhosts file '%1$s': %= 2$s"), hostsfile, errmsg); goto error; } } else if (!(flags & VIR_NET_SSH_HOSTKEY_FILE_CREATE)) { virReportError(VIR_ERR_SSH, - _("known hosts file '%s' does not exist"), + _("known hosts file '%1$s' does not exist"), hostsfile); goto error; } @@ -1186,7 +1182,7 @@ virNetSSHSessionConnect(virNetSSHSession *sess, if (ret < 0) { libssh2_session_last_error(sess->session, &errmsg, NULL, 0); virReportError(VIR_ERR_NO_CONNECT, - _("SSH session handshake failed: %s"), + _("SSH session handshake failed: %1$s"), errmsg); goto error; } @@ -1231,8 +1227,7 @@ virNetSSHChannelRead(virNetSSHSession *sess, if (sess->state !=3D VIR_NET_SSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_SSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_SSH, - _("Remote program terminated " - "with non-zero code: %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_SSH, "%s", @@ -1307,7 +1302,7 @@ virNetSSHChannelRead(virNetSSHSession *sess, if (libssh2_channel_eof(sess->channel)) { if (libssh2_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_SSH, - _("Remote command terminated with non-zero code= : %d"), + _("Remote command terminated with non-zero code= : %1$d"), libssh2_channel_get_exit_status(sess->channel)); sess->channelCommandReturnValue =3D libssh2_channel_get_exit_s= tatus(sess->channel); sess->state =3D VIR_NET_SSH_STATE_ERROR_REMOTE; @@ -1342,7 +1337,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, if (sess->state !=3D VIR_NET_SSH_STATE_HANDSHAKE_COMPLETE) { if (sess->state =3D=3D VIR_NET_SSH_STATE_ERROR_REMOTE) virReportError(VIR_ERR_SSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), sess->channelCommandReturnValue); else virReportError(VIR_ERR_SSH, "%s", @@ -1354,7 +1349,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, if (libssh2_channel_eof(sess->channel)) { if (libssh2_channel_get_exit_status(sess->channel)) { virReportError(VIR_ERR_SSH, - _("Remote program terminated with non-zero code= : %d"), + _("Remote program terminated with non-zero code= : %1$d"), libssh2_channel_get_exit_status(sess->channel)); sess->state =3D VIR_NET_SSH_STATE_ERROR_REMOTE; sess->channelCommandReturnValue =3D libssh2_channel_get_exit_s= tatus(sess->channel); @@ -1379,7 +1374,7 @@ virNetSSHChannelWrite(virNetSSHSession *sess, sess->state =3D VIR_NET_SSH_STATE_ERROR; libssh2_session_last_error(sess->session, &msg, NULL, 0); virReportError(VIR_ERR_SSH, - _("write failed: %s"), msg); + _("write failed: %1$s"), msg); } =20 cleanup: diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index cfd26f0701..f72597ee80 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -103,7 +103,7 @@ virNetTLSContextCheckCertFile(const char *type, const c= har *file, bool allowMiss return 1; =20 virReportSystemError(errno, - _("Cannot read %s '%s'"), + _("Cannot read %1$s '%2$s'"), type, file); return -1; } @@ -134,10 +134,10 @@ static int virNetTLSContextCheckCertTimes(gnutls_x509= _crt_t cert, if (gnutls_x509_crt_get_expiration_time(cert) < now) { virReportError(VIR_ERR_SYSTEM_ERROR, (isCA ? - _("The CA certificate %s has expired") : + _("The CA certificate %1$s has expired") : (isServer ? - _("The server certificate %s has expired") : - _("The client certificate %s has expired"))), + _("The server certificate %1$s has expired") : + _("The client certificate %1$s has expired"))), certFile); return -1; } @@ -145,10 +145,10 @@ static int virNetTLSContextCheckCertTimes(gnutls_x509= _crt_t cert, if (gnutls_x509_crt_get_activation_time(cert) > now) { virReportError(VIR_ERR_SYSTEM_ERROR, (isCA ? - _("The CA certificate %s is not yet active") : + _("The CA certificate %1$s is not yet active") : (isServer ? - _("The server certificate %s is not yet active") : - _("The client certificate %s is not yet active"))= ), + _("The server certificate %1$s is not yet active"= ) : + _("The client certificate %1$s is not yet active"= ))), certFile); return -1; } @@ -170,28 +170,28 @@ static int virNetTLSContextCheckCertBasicConstraints(= gnutls_x509_crt_t cert, if (status > 0) { /* It is a CA cert */ if (!isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("The certificate %s basic constraints show a = CA, but we need one for a server") : - _("The certificate %s basic constraints show a = CA, but we need one for a client"), + _("The certificate %1$s basic constraints show = a CA, but we need one for a server") : + _("The certificate %1$s basic constraints show = a CA, but we need one for a client"), certFile); return -1; } } else if (status =3D=3D 0) { /* It is not a CA cert */ if (isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("The certificate %s basic constraints do not = show a CA"), + _("The certificate %1$s basic constraints do no= t show a CA"), certFile); return -1; } } else if (status =3D=3D GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { /* M= issing basicConstraints */ if (isCA) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("The certificate %s is missing basic constrai= nts for a CA"), + _("The certificate %1$s is missing basic constr= aints for a CA"), certFile); return -1; } } else { /* General error */ virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s basic constraints= %s"), + _("Unable to query certificate %1$s basic constrain= ts %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -217,7 +217,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, GNUTLS_KEY_DIGITAL_SIGNATURE|GNUTLS_KEY_KEY_ENCIPHERMENT; } else { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key usage %s"= ), + _("Unable to query certificate %1$s key usage %= 2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -227,7 +227,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_KEY_CERT_SIGN)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit cer= tificate signing"), + _("Certificate %1$s usage does not permit c= ertificate signing"), certFile); return -1; } else { @@ -239,7 +239,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_DIGITAL_SIGNATURE)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit dig= ital signature"), + _("Certificate %1$s usage does not permit d= igital signature"), certFile); return -1; } else { @@ -250,7 +250,7 @@ static int virNetTLSContextCheckCertKeyUsage(gnutls_x50= 9_crt_t cert, if (!(usage & GNUTLS_KEY_KEY_ENCIPHERMENT)) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s usage does not permit key= encipherment"), + _("Certificate %1$s usage does not permit k= ey encipherment"), certFile); return -1; } else { @@ -291,7 +291,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, } if (status !=3D GNUTLS_E_SHORT_MEMORY_BUFFER) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key purpose %= s"), + _("Unable to query certificate %1$s key purpose= %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -301,7 +301,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (status < 0) { VIR_FREE(buffer); virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to query certificate %s key purpose %= s"), + _("Unable to query certificate %1$s key purpose= %2$s"), certFile, gnutls_strerror(status)); return -1; } @@ -324,7 +324,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (!allowServer) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s purpose does not allow us= e for with a TLS server"), + _("Certificate %1$s purpose does not allow = use for with a TLS server"), certFile); return -1; } else { @@ -336,7 +336,7 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, if (!allowClient) { if (critical) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate %s purpose does not allow us= e for with a TLS client"), + _("Certificate %1$s purpose does not allow = use for with a TLS client"), certFile); return -1; } else { @@ -389,7 +389,7 @@ virNetTLSContextCheckCertDN(gnutls_x509_crt_t cert, if (hostname && !gnutls_x509_crt_check_hostname(cert, hostname)) { virReportError(VIR_ERR_RPC, - _("Certificate %s owner does not match the hostname= %s"), + _("Certificate %1$s owner does not match the hostna= me %2$s"), certFile, hostname); return -1; } @@ -438,8 +438,8 @@ static int virNetTLSContextCheckCertPair(gnutls_x509_cr= t_t cert, NULL, 0, 0, &status) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("Unable to verify server certificate %s against C= A certificate %s") : - _("Unable to verify client certificate %s against C= A certificate %s"), + _("Unable to verify server certificate %1$s against= CA certificate %2$s") : + _("Unable to verify client certificate %1$s against= CA certificate %2$s"), certFile, cacertFile); return -1; } @@ -460,7 +460,7 @@ static int virNetTLSContextCheckCertPair(gnutls_x509_cr= t_t cert, reason =3D _("The certificate uses an insecure algorithm"); =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Our own certificate %s failed validation against= %s: %s"), + _("Our own certificate %1$s failed validation again= st %2$s: %3$s"), certFile, cacertFile, reason); return -1; } @@ -494,8 +494,8 @@ static gnutls_x509_crt_t virNetTLSContextLoadCertFromFi= le(const char *certFile, =20 if (gnutls_x509_crt_import(cert, &data, GNUTLS_X509_FMT_PEM) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, isServer ? - _("Unable to import server certificate %s") : - _("Unable to import client certificate %s"), + _("Unable to import server certificate %1$s") : + _("Unable to import client certificate %1$s"), certFile); goto cleanup; } @@ -529,7 +529,7 @@ static int virNetTLSContextLoadCACertListFromFile(const= char *certFile, =20 if (gnutls_x509_crt_list_import(certs, &certMax, &data, GNUTLS_X509_FM= T_PEM, 0) < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to import CA certificate list %s"), + _("Unable to import CA certificate list %1$s"), certFile); return -1; } @@ -602,7 +602,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 CA certificate: %s: %s"), + _("Unable to set x509 CA certificate: %1$s: %2$= s"), cacert, gnutls_strerror(err)); return -1; } @@ -620,7 +620,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM= ); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 certificate revocatio= n list: %s: %s"), + _("Unable to set x509 certificate revocatio= n list: %1$s: %2$s"), cacrl, gnutls_strerror(err)); return -1; } @@ -645,7 +645,7 @@ static int virNetTLSContextLoadCredentials(virNetTLSCon= text *ctxt, GNUTLS_X509_FMT_PEM); if (err < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to set x509 key and certificate: = %s, %s: %s"), + _("Unable to set x509 key and certificate: = %1$s, %2$s: %3$s"), key, cert, gnutls_strerror(err)); return -1; } @@ -690,7 +690,7 @@ static virNetTLSContext *virNetTLSContextNew(const char= *cacert, ctxt->x509cred =3D NULL; =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to allocate x509 credentials: %s"), + _("Unable to allocate x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -896,7 +896,7 @@ int virNetTLSContextReloadForServer(virNetTLSContext *c= txt, err =3D gnutls_certificate_allocate_credentials(&ctxt->x509cred); if (err) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to allocate x509 credentials: %s"), + _("Unable to allocate x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -946,7 +946,7 @@ static int virNetTLSContextValidCertificate(virNetTLSCo= ntext *ctxt, =20 if ((ret =3D gnutls_certificate_verify_peers2(sess->session, &status))= < 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Unable to verify TLS peer: %s"), + _("Unable to verify TLS peer: %1$s"), gnutls_strerror(ret)); goto authdeny; } @@ -967,7 +967,7 @@ static int virNetTLSContextValidCertificate(virNetTLSCo= ntext *ctxt, reason =3D _("The certificate uses an insecure algorithm"); =20 virReportError(VIR_ERR_SYSTEM_ERROR, - _("Certificate failed validation: %s"), + _("Certificate failed validation: %1$s"), reason); goto authdeny; } @@ -1016,7 +1016,7 @@ static int virNetTLSContextValidCertificate(virNetTLS= Context *ctxt, } if (ret !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to get certificate %s distinguish= ed name: %s"), + _("Failed to get certificate %1$s distingui= shed name: %2$s"), "[session]", gnutls_strerror(ret)); goto authfail; } @@ -1160,7 +1160,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, if ((err =3D gnutls_init(&sess->session, ctxt->isServer ? GNUTLS_SERVER : GNUTLS_CLIENT)= ) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to initialize TLS session: %s"), + _("Failed to initialize TLS session: %1$s"), gnutls_strerror(err)); goto error; } @@ -1174,7 +1174,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, priority, NULL)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed to set TLS session priority to %s: %s"), + _("Failed to set TLS session priority to %1$s: %2$s= "), priority, gnutls_strerror(err)); goto error; } @@ -1183,7 +1183,7 @@ virNetTLSSession *virNetTLSSessionNew(virNetTLSContex= t *ctxt, GNUTLS_CRD_CERTIFICATE, ctxt->x509cred)) !=3D 0) { virReportError(VIR_ERR_SYSTEM_ERROR, - _("Failed set TLS x509 credentials: %s"), + _("Failed set TLS x509 credentials: %1$s"), gnutls_strerror(err)); goto error; } @@ -1313,7 +1313,7 @@ int virNetTLSSessionHandshake(virNetTLSSession *sess) #endif =20 virReportError(VIR_ERR_AUTH_FAILED, - _("TLS handshake failed %s"), + _("TLS handshake failed %1$s"), gnutls_strerror(ret)); ret =3D -1; =20 --=20 2.39.2