From nobody Mon Apr 29 08:03:34 2024 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=1677693969; cv=none; d=zohomail.com; s=zohoarc; b=PjRKB9sX3EWl0aQGT9Sd+dw8pFKlmaz8dSsI7+CLET9attzbPqPxSlpoxYuPbB1c5xhSTu+Jq0o3w6+JrgK/UI85YUozNnc83fNRCdTqJsBjYWSR06v1GsqR1MYfqwWCPXOTheKtM9wBpnK1VxaWcVDRCwYocbRr/wmHtqYAKOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677693969; 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=UsSP2fljlfh6gwiFAagFKDtXD5WclhhWuGc9vyAu3nI=; b=loT1/nqhngH4LJuphkeECKQVObagOshyCiyFHgSn1o+q6jeXSoQI+30dYJm8zKwayVXDwVmaPHXtXTgcl+T4SaNlEp+Czdq1m7ibCsPnZrJrv2B1cHZafwFF9ZqNc6VeM9dl52FXPLNU/PHiM9Q0YVmVqi40C5YriBHYQN4660s= 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 1677693969868643.8067006410583; Wed, 1 Mar 2023 10:06:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-59-GzM2kT4DPGqU68zDqiZAyw-1; Wed, 01 Mar 2023 13:06:05 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 327A1888BEF; Wed, 1 Mar 2023 18:05:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E5E8492B00; Wed, 1 Mar 2023 18:05:01 +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 664BC19465A4; Wed, 1 Mar 2023 18:05:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3219B1946589 for ; Wed, 1 Mar 2023 18:04:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6200A35454; Wed, 1 Mar 2023 18:04:44 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.144]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB49E18EC1 for ; Wed, 1 Mar 2023 18:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677693968; 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=UsSP2fljlfh6gwiFAagFKDtXD5WclhhWuGc9vyAu3nI=; b=Kq3efoCvnTb7PGF+tIEeCTVbklPNFbHd3HdsUfeVhU2Jqh7QOQSO/ZiIRcCNWLYlzHUPEp r4kcD7i1xmT48rIfal9Wet9cSFvhRfMq/AE0U7Rc9wY+zaaxjmJeUr3bib+pbniIZYGbmK vz++mTQF8c+cYuFmHBZ1K3jkar5S8Ro= X-MC-Unique: GzM2kT4DPGqU68zDqiZAyw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Remove duplicate user/group lookup Date: Wed, 1 Mar 2023 19:04:42 +0100 Message-Id: <20230301180442.605690-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.10 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: 1677693971956100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Commit 068efae5b1a9 created a copy of this code instead of simply moving it. Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/qemu/qemu_conf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index a831783d75..680832742c 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -173,12 +173,6 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool privi= leged, cfg->memoryBackingDir =3D g_strdup_printf("%s/ram", cfg->libDir); cfg->swtpmStorageDir =3D g_strdup_printf("%s/lib/libvirt/swtpm", LOCALSTATEDIR); - if (!virDoesUserExist("tss") || - virGetUserID("tss", &cfg->swtpm_user) < 0) - cfg->swtpm_user =3D 0; /* fall back to root */ - if (!virDoesGroupExist("tss") || - virGetGroupID("tss", &cfg->swtpm_group) < 0) - cfg->swtpm_group =3D 0; /* fall back to root */ } else { g_autofree char *rundir =3D NULL; g_autofree char *cachedir =3D NULL; --=20 2.39.2