From nobody Fri May 3 04:42:08 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1528182716265569.8652190818517; Tue, 5 Jun 2018 00:11:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 85C82783F8; Tue, 5 Jun 2018 07:11:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04C752010CF3; Tue, 5 Jun 2018 07:11:54 +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 0E2CD4CA80; Tue, 5 Jun 2018 07:11:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w557Bovt025447 for ; Tue, 5 Jun 2018 03:11:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id EB8F49B033; Tue, 5 Jun 2018 07:11:50 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E41EB9D7C1 for ; Tue, 5 Jun 2018 07:11:48 +0000 (UTC) Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C4CCC00B8E0 for ; Tue, 5 Jun 2018 07:11:37 +0000 (UTC) Received: by mail-wr0-f177.google.com with SMTP id h10-v6so1126767wrq.8 for ; Tue, 05 Jun 2018 00:11:37 -0700 (PDT) Received: from rst.wireless.abdn.ac.uk (oa-edu-161-167.wireless.abdn.ac.uk. [137.50.161.167]) by smtp.gmail.com with ESMTPSA id n23-v6sm818358wmh.6.2018.06.05.00.11.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 00:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=t/kNNN6z6EjdXxfKexvU9enLga0xhq1pr8LiKkF6Y/w=; b=lFImJsXWIYBuQv+qiRH0xTJID7QmJUNoSgeHx7xUprKpGy4foktiYVsW+4Wp50jZ0/ Roky6bKcs+66JvsJ6IjxaUkdDQGnY7oak9KECHvJfPICC0FJvKAa2v5GWh5ZY6SBCHSM s2FfR46Xf55hQLCnDD1BaVtmH8QpbpJ6khg1H8M6EPSQJ9vNe+mEHClrh/8BlO7KFGSv dm2n1MPt4rj8+5L7UA292jVjVWXwMU8ywdhTZR4o8PhfX3dJYyf/ThOxdzRPYTb9CGxP PMb4jxCr0DO0EEIROnWIhTCxnC+CXAIMmrv6WBVomoWxVFhAf+2lmS09jwg7uyrapk4K 9TnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=t/kNNN6z6EjdXxfKexvU9enLga0xhq1pr8LiKkF6Y/w=; b=QfOvTrMWfQCgMQhfJzIoa4E+WBwGQiQN6fG9vdEQxPR7j3zb8O1mHxOr18rewMHTK4 yB8ms13PSvlsLv9DmUWbRwnHxGC7GiiYfyWtRsgsuMlaL3KUq/dfy17YgdesNmyZqjys TJmie9wjxoiWJH09Ph0aMjSNjtrA+WjcpfxV/eo5wYTi9HczbGsEsBeNUve5fwmIrHfo +M7+bxzVjBjP5kSdLPP8+p5uNM49xjk5OQTNb4cuAPTXckW6Dm4sSnlQtkBdvLLSsr2Z B1rewQG8jxtTN5/L9UZ023MDWcNpyv7Cl44tkAP+P8G4YqIXDRqgz/EpDOGvLbDhqJ0M cNhg== X-Gm-Message-State: APt69E0PCfoCNDXmMqOGM+TGHjRIbsfPMObWTbbSPTpNcmxlEpQGM5BH sCbKRXDMn9dr7ZXePxdRQR9n9fskrC8= X-Google-Smtp-Source: ADUXVKIsxh1hW3VQAh7/poH4HAJkq3rWIFY9AMG6sQ1VvXRGgsD1ebmrjYUNrv+SAWLLhbhI1O03/Q== X-Received: by 2002:adf:c5d2:: with SMTP id v18-v6mr4102004wrg.151.1528182695920; Tue, 05 Jun 2018 00:11:35 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 5 Jun 2018 08:11:33 +0100 Message-Id: <20180605071133.23720-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 05 Jun 2018 07:11:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 05 Jun 2018 07:11:37 +0000 (UTC) for IP:'209.85.128.177' DOMAIN:'mail-wr0-f177.google.com' HELO:'mail-wr0-f177.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.756 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.128.177 mail-wr0-f177.google.com 209.85.128.177 mail-wr0-f177.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCHv2] virFileAccessibleAs: Remove redundant forkRet 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 05 Jun 2018 07:11:55 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The variable forkRet is not used after commit 25f8781 Signed-off-by: Radostin Stoyanov Reviewed-by: J=EF=BF=BDn Tomko --- src/util/virfile.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 523241f64f..a2c4cebb56 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode, { pid_t pid =3D 0; int status, ret =3D 0; - int forkRet =3D 0; gid_t *groups; int ngroups; =20 @@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode, return 0; } =20 - /* child. - * Return positive value here. Parent - * will change it to negative one. */ - - if (forkRet < 0) { - ret =3D errno; - goto childerror; - } - if (virSetUIDGID(uid, gid, groups, ngroups) < 0) { ret =3D errno; goto childerror; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list