From nobody Thu Feb 12 18:31:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1770901680; cv=none; d=zohomail.com; s=zohoarc; b=DKH+U2+rXcmBB+L0Nqhk6LsCGn+sfdmT7NL0cJ75invXBliN2GGAXSIy7x0Y/u4YSc7Gc4A1aSr0rL7ecU/EM+i6+PiCX/13q5Isvc48wbJvyqoEfC6kk9bnq00ZuyJR1ndkuFq8GUQGEkoGXIyDScxFbQ+gQ3QDvql/hYQauF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770901680; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=O3n+QCWxPpIV2SwlnCS2bkWl1FlSuZWAHGXiAJ7jc3k=; b=next8BZIq5d3Yj3xtLil9t8qAF5FjZTtsgxdAMjIxJAKsvv/ZreTLeJUWiYYI/gtuc/C/7MDGP3FaYIyVbrJJfiNlX/YH5ON5fXPb91r6qxqkWiF4yPnnLmv9kFOPboIO+oLtjRe7H5LwDg4KajA+JWYjrT0QKaFvIRh5Jrsw8U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1770901680417293.5724111685299; Thu, 12 Feb 2026 05:08:00 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3A13D44FA6; Thu, 12 Feb 2026 08:07:59 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 8C1D641902; Thu, 12 Feb 2026 07:51:38 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 8FA8B3F87A; Thu, 12 Feb 2026 07:50:44 -0500 (EST) Received: from mx1.osci.io (unknown [8.43.85.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A0F0845249 for ; Thu, 12 Feb 2026 07:39:01 -0500 (EST) Received: by mx1.osci.io (Postfix, from userid 995) id C3FB028C7F; Tue, 10 Feb 2026 12:56:58 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mx1.osci.io (Postfix) with ESMTPS id F290F28C83 for ; Tue, 10 Feb 2026 12:56:57 -0500 (EST) Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-288-s_-KKLYzOZ-W6kWP5fyp2Q-1; Tue, 10 Feb 2026 12:56:55 -0500 Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-81f3f3af760so12699866b3a.1 for ; Tue, 10 Feb 2026 09:56:55 -0800 (PST) Received: from armenon-kvm.armenon-thinkpadp16vgen1.bengluru.csb ([49.36.106.234]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824418a70fesm13782658b3a.45.2026.02.10.09.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 09:56:53 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770746217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O3n+QCWxPpIV2SwlnCS2bkWl1FlSuZWAHGXiAJ7jc3k=; b=OmIlEirxfjUuHSpx+ZiMniGF09hG5nazCQmEuSKG2R/O5djmpUpn/9I+bOAYbVk5P4tDfJ J9J/ZRStIjQyVV6ErJPJbXOS1e8C2TTFzSf08kaNjAGSdmMuy4v/1B8zNLAtVZ+1VgQR0u bNj9Dckcpj5DWFgWIIhyLi+tBt4i0ps= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770746217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O3n+QCWxPpIV2SwlnCS2bkWl1FlSuZWAHGXiAJ7jc3k=; b=OmIlEirxfjUuHSpx+ZiMniGF09hG5nazCQmEuSKG2R/O5djmpUpn/9I+bOAYbVk5P4tDfJ J9J/ZRStIjQyVV6ErJPJbXOS1e8C2TTFzSf08kaNjAGSdmMuy4v/1B8zNLAtVZ+1VgQR0u bNj9Dckcpj5DWFgWIIhyLi+tBt4i0ps= X-MC-Unique: s_-KKLYzOZ-W6kWP5fyp2Q-1 X-Mimecast-MFC-AGG-ID: s_-KKLYzOZ-W6kWP5fyp2Q_1770746215 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770746214; x=1771351014; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=O3n+QCWxPpIV2SwlnCS2bkWl1FlSuZWAHGXiAJ7jc3k=; b=iDaKmMeKYV594kJUf1gWLNdhNGKBxxFeWTwugfjrNeLJZCnJUvJgsvSZnOKa70ZMMc INyQumui8JPohNDzK0yFC85uCof07AgoXMMUvrfPPX+YrjFZVm3q1crsdQ8k7sWQgV9Z SyiSdVX+Ocmjx6wFKiKGh5T35DIL4rFKJCgz7lolHZnuzOV6Dur8LdEwmAvvACwXr6/0 uDfQBfyRvBmOPn4gFSHPaUZF1jV8HbL0Fq36LPGk2u0S+DLzp6QomtKtZXN/bAlTyEBa sAk0OoqI5NbwN+HiSQVUHAXAMIVm0wWMO80nbD40ct7OAJw6ZkbrUhi2J/ThOWimooVF 3Vhw== X-Gm-Message-State: AOJu0YyzWmCee+jk4PN4SmSRgYNhhKJS2XNjMGRZ10B/4FYDheWgQufW /fSOQTtCaDpG9hdnCcR8qeBuEdzTPJrlEenjwVrUqLyugGmaLajP+YypNI704gAPKYwVjr7bEvM YsbferrlovFd2ruyV727N8ZF5eoyXYT+WLrUwf1bqaz9Giypgqod9uoCL/LArlUCgkXaG1l9ONr pUDfUM5cZYducPPvvzBaFC/tgcq3Tq5+yqJl3MahXg9g== X-Gm-Gg: AZuq6aJTXG97alq1S/kLDMIAVxaLDDM6QFVyKB6kX67nEOqAE6d+NSjl0wNLbuaVllu 6A8VHvWYHlR3SjcJuFEWyFkep1D8PYMb0NFSqlqqbOnP1hK3XcO+Ig7teLEHvyUVWmPKUE4rGYk 5/QuVO/nUIZcd27SIORqVpSjTppRUGSwfyz0sdvjmVizbD708oSOsaUo0+oVdYsSQmtavaj2lV7 HrjwpepmdMU4q+ca9C/3tKUUlVIerdXa41ON564GsWRa/0CRU5Ik7F9ZGLQP80K8LYzwdjxfHU4 sjFNgEokzz+0uH6DNRzgbIKlJjIEGjWiuCjwMhgcX8XOFvFjB0R672eIVbgB+1/yfrfE3T5z+Pf CXyvTRd6OK14jSFptasqsLBq8YMHN7vom67sLYhRXee3AdnyBHyD/aXQ0VQKA41s0MDDS+A== X-Received: by 2002:a05:6a00:90a6:b0:823:244f:1fac with SMTP id d2e1a72fcca58-82487984688mr2648953b3a.6.1770746214645; Tue, 10 Feb 2026 09:56:54 -0800 (PST) X-Received: by 2002:a05:6a00:90a6:b0:823:244f:1fac with SMTP id d2e1a72fcca58-82487984688mr2648938b3a.6.1770746214199; Tue, 10 Feb 2026 09:56:54 -0800 (PST) To: devel@lists.libvirt.org Subject: [PATCH v6 4/6] secret: Rename virSecretObj structure attribute from base64File to secretValueFile Date: Tue, 10 Feb 2026 23:26:41 +0530 Message-ID: <20260210175643.23351-5-armenon@redhat.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20260210175643.23351-1-armenon@redhat.com> References: <20260210175643.23351-1-armenon@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: D-QfqHq0DcXoiRRGEVFE9hTWIYpCICVfOGyr-bg87Mg_1770746215 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NZEXSOSUMIDZ3K23JIHK7RR42ALJZFSX X-Message-ID-Hash: NZEXSOSUMIDZ3K23JIHK7RR42ALJZFSX X-MailFrom: armenon@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Arun Menon X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Arun Menon via Devel Reply-To: Arun Menon X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1770901686590158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Arun Menon Change the attribute name of _virSecretObj because we want it to have a gen= eric name to indicate that secret values can be stored in it in both base64 and encrypted formats. Signed-off-by: Arun Menon Reviewed-by: Peter Krempa --- src/conf/virsecretobj.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 66270e2751..a3dd7983bb 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -39,7 +39,7 @@ VIR_LOG_INIT("conf.virsecretobj"); struct _virSecretObj { virObjectLockable parent; char *configFile; - char *base64File; + char *secretValueFile; virSecretDef *def; unsigned char *value; /* May be NULL */ size_t value_size; @@ -139,7 +139,7 @@ virSecretObjDispose(void *opaque) g_free(obj->value); } g_free(obj->configFile); - g_free(obj->base64File); + g_free(obj->secretValueFile); } =20 =20 @@ -378,11 +378,11 @@ virSecretObjListAdd(virSecretObjList *secrets, if (!(obj =3D virSecretObjNew())) goto cleanup; =20 - /* Generate the possible configFile and base64File strings + /* Generate the possible configFile and secretValueFile strings * using the configDir, uuidstr, and appropriate suffix */ if (!(obj->configFile =3D virFileBuildPath(configDir, uuidstr, ".x= ml")) || - !(obj->base64File =3D virFileBuildPath(configDir, uuidstr, ".b= ase64"))) + !(obj->secretValueFile =3D virFileBuildPath(configDir, uuidstr= , ".base64"))) goto cleanup; =20 if (virHashAddEntry(secrets->objs, uuidstr, obj) < 0) @@ -656,7 +656,7 @@ virSecretObjDeleteData(virSecretObj *obj) { /* The configFile will already be removed, so secret won't be * loaded again if this fails */ - unlink(obj->base64File); + unlink(obj->secretValueFile); } =20 =20 @@ -691,7 +691,7 @@ virSecretObjSaveData(virSecretObj *obj) =20 base64 =3D g_base64_encode(obj->value, obj->value_size); =20 - if (virFileRewriteStr(obj->base64File, S_IRUSR | S_IWUSR, base64) < 0) + if (virFileRewriteStr(obj->secretValueFile, S_IRUSR | S_IWUSR, base64)= < 0) return -1; =20 return 0; @@ -813,26 +813,26 @@ virSecretLoadValue(virSecretObj *obj) struct stat st; g_autofree char *contents =3D NULL; =20 - if ((fd =3D open(obj->base64File, O_RDONLY)) =3D=3D -1) { + if ((fd =3D open(obj->secretValueFile, O_RDONLY)) =3D=3D -1) { if (errno =3D=3D ENOENT) { ret =3D 0; goto cleanup; } virReportSystemError(errno, _("cannot open '%1$s'"), - obj->base64File); + obj->secretValueFile); goto cleanup; } =20 if (fstat(fd, &st) < 0) { virReportSystemError(errno, _("cannot stat '%1$s'"), - obj->base64File); + obj->secretValueFile); goto cleanup; } =20 if ((size_t)st.st_size !=3D st.st_size) { virReportError(VIR_ERR_INTERNAL_ERROR, _("'%1$s' file does not fit in memory"), - obj->base64File); + obj->secretValueFile); goto cleanup; } =20 @@ -845,7 +845,7 @@ virSecretLoadValue(virSecretObj *obj) =20 if (saferead(fd, contents, st.st_size) !=3D st.st_size) { virReportSystemError(errno, _("cannot read '%1$s'"), - obj->base64File); + obj->secretValueFile); goto cleanup; } contents[st.st_size] =3D '\0'; --=20 2.51.1