From nobody Thu May 2 19:29:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542125084543960.4195879080273; Tue, 13 Nov 2018 08:04:44 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0EFC30DDBA5; Tue, 13 Nov 2018 16:04:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B83D1001914; Tue, 13 Nov 2018 16:04:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2432E181A133; Tue, 13 Nov 2018 16:04:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wADFtLhd004738 for ; Tue, 13 Nov 2018 10:55:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 410305D965; Tue, 13 Nov 2018 15:55:21 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB3F05D9D6 for ; Tue, 13 Nov 2018 15:55:20 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 13 Nov 2018 16:55:17 +0100 Message-Id: <24093ed93b81d186f461a480e713f376c6c6c6e2.1542124460.git.mprivozn@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Don't mask error X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 13 Nov 2018 16:04:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In 4674fc6afd6 I've implemented transactions for selinux driver. Well, now that I am working in this area I've notice a subtle bug: @ret is initialized to 0 instead of -1. Facepalm. Signed-off-by: Michal Privoznik Reviewed-by: Marc Hartmayer --- I wonder how this could survive this long (~2y) not being noticed. src/security/security_selinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinu= x.c index 467d1e6bfe..c09404f6f8 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1091,7 +1091,7 @@ virSecuritySELinuxTransactionCommit(virSecurityManage= rPtr mgr ATTRIBUTE_UNUSED, pid_t pid) { virSecuritySELinuxContextListPtr list; - int ret =3D 0; + int ret =3D -1; =20 list =3D virThreadLocalGet(&contextList); if (!list) --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list