From nobody Tue Feb 10 03:44:26 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=1679656303; cv=none; d=zohomail.com; s=zohoarc; b=E6pl9kiPGf5vsJo66jk8ngYbOxaXA4CmJGK5AcIzc0Sz53geKzl2KXe6XopcMV9EtBFyADm1V0lCt8LKhS4MfcI8LNpxyTlHnmzNaDzXgamOmpzGa4XyPPfcY+uYQTzWHuFcOrCURqNwvogWVwO5jttn7jLzGF8haIURR6GLOGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679656303; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=okOYskCU7PDTjU7hcRoScxEvuz53JfUf4pgLOW/gbl8=; b=YHINo2yY8GeV1I8bp2nMBNj2+JPTjOuGyUvYZjb++ggWai5anpbGjua5QW76FjT6cC6299AxkjKQNPX3Y+DdaUnqBjR8XxMJ2Hbw//hUCsJn3IEIEgf4ZviBjWsyE+XL1Pcz9tGSpXj9I58tCtidSEdjVfsKq7EGlqrF4t1RBr0= 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 167965630387822.428551247676978; Fri, 24 Mar 2023 04:11:43 -0700 (PDT) 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-117-7GBa0bdQOOWYDbt8DmkaNA-1; Fri, 24 Mar 2023 07:11:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFF9938012CB; Fri, 24 Mar 2023 11:11:31 +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 0B47A2027040; Fri, 24 Mar 2023 11:11:31 +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 CADAB1946588; Fri, 24 Mar 2023 11:11:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4CB111946587 for ; Fri, 24 Mar 2023 11:11:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2C4CC40BC798; Fri, 24 Mar 2023 11:11:29 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1B7C40BC797 for ; Fri, 24 Mar 2023 11:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679656297; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=okOYskCU7PDTjU7hcRoScxEvuz53JfUf4pgLOW/gbl8=; b=BxEBxr8/mehlet+sU7FadZ7vovOjB4SzkdpzbjUBuBFZ4X77NG9d9Jd9l82eTRHaMwzBkC RXL9FGg3C8vCILnfgI4vaIaYsSh/jMuppcFeSmzlrmMTapxcTBMS6dt4LEjUyaf7a6Mazh 96XXqI7lQBEsuBPSmhKzbUTCI/zEnTg= X-MC-Unique: 7GBa0bdQOOWYDbt8DmkaNA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] esx: Change the default username when connecting to VCenter Date: Fri, 24 Mar 2023 12:11:23 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.4 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: 1679656305001100001 Content-Type: text/plain; charset="utf-8"; x-default="true" While it's true that the default username is: administrator@${SSO-Domain} in majority of cases the ${SSO-Domain} is "vsphere.local". But our code (and what virsh displays then) says it's just "administrator". This is wrong also from a different POV: the username must contain the suffix no matter what and our default suggests otherwise. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2181234 Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/esx/esx_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 9dc5489411..2443e6e88a 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -701,7 +701,8 @@ esxConnectToVCenter(esxPrivate *priv, if (conn->uri->user) { username =3D g_strdup(conn->uri->user); } else { - if (!(username =3D virAuthGetUsername(conn, auth, "esx", "administ= rator", + if (!(username =3D virAuthGetUsername(conn, auth, "esx", + "administrator@vsphere.local", hostname))) return -1; } --=20 2.39.2