From nobody Thu May 2 07:28:39 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 1528182436966390.18199096081435; Tue, 5 Jun 2018 00:07:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4433830C168A; Tue, 5 Jun 2018 07:07:15 +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 10F8916C6C; Tue, 5 Jun 2018 07:07:15 +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 9C7A21800C9D; Tue, 5 Jun 2018 07:07:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5577CG5024970 for ; Tue, 5 Jun 2018 03:07:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7DCFA60F82; Tue, 5 Jun 2018 07:07:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7210160BE0 for ; Tue, 5 Jun 2018 07:07:06 +0000 (UTC) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) (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 3D7C3295C83 for ; Tue, 5 Jun 2018 07:06:55 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id l41-v6so1115875wre.7 for ; Tue, 05 Jun 2018 00:06:55 -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 c11-v6sm28746655wri.49.2018.06.05.00.06.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 00:06:52 -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=seYK78APN0HnU1cD50Tp5jnCLla82FSk7+GlW/FoxcU=; b=rZ1T6sY0YRjHqhhwDWsiuafOH5TrvN/Vujkuhi82n8RPPFb7Yi1pw07BFimuD5m8y+ vQu534IhEfYL41NHXW8EvRj60cRmBCUwN6fnophZMj+JC9TMBYB6gNAYk8xpEBD4GbsW G38/KgWsEtRjnA/0qf25Qgo/aR3QjBWZWwzqvPNbZ2wSAuCghNAnMqjDiqeihZdF7K/H 29QztRLrChhxgEVRXiMYCF0FDxF1CdcZ/a6PvKsmtM0IepAyyO842KKFnJElP1tFzVsM QzUBuyWzyWdtDDIoPxWaHF80oK99mjDWoWZ68dy9tXh/+x7rwF/rS3LHYlgasRYbNS+9 29ew== 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=seYK78APN0HnU1cD50Tp5jnCLla82FSk7+GlW/FoxcU=; b=QFUFQaIAOR3iHlAeVXhaFe2OKs+3W3cXYCui724bghL12QwtKK5LMgH2QOWZEF5XQh rKiiI0AY9ops8baXhy0D0hdYXsyyPG9OpbIphhetVzld7NThO+aQRsxlzj93hPzznGk+ 5un4A4qkWTvQdxp4aSZnzFccE9AkLIgh2KuZxvV+y4j+BSanrFeHK7dpFlDodtllfL9m BMvtPbn3vf+2E3JOczq09EMzOgK4hoHQrOQEu+4u7t+g4JiQ/ClZ2JjOMk032kNi2xij yM2z9GukH5+MvgewRwxmaeSIK5INgLD1DhUjP5iC80BKt90eEG/c73XkI++YwsoQx2w1 tLww== X-Gm-Message-State: ALKqPwcAPYWJGfMrtnnlnKhBPDGlApJHB4LabuLsKWvzpjq/E6pTiQVu 6Dbg4ICUNJr2MdbAaeqjx16ngvK8 X-Google-Smtp-Source: ADUXVKJnbqffWXkh4mJVBzUzx1KQ9Uo5dtDAlrTp5Jvs9WrAkJobA/24E2oo3d2oSP+raEPKdkRfEQ== X-Received: by 2002:adf:9025:: with SMTP id h34-v6mr19818535wrh.123.1528182413706; Tue, 05 Jun 2018 00:06:53 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 5 Jun 2018 08:06:51 +0100 Message-Id: <20180605070651.22471-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 05 Jun 2018 07:06:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 05 Jun 2018 07:06:55 +0000 (UTC) for IP:'209.85.128.195' DOMAIN:'mail-wr0-f195.google.com' HELO:'mail-wr0-f195.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.195 mail-wr0-f195.google.com 209.85.128.195 mail-wr0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCH] 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 05 Jun 2018 07:07:15 +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 forkRest is not used after commit 25f8781 https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021= e21cfb60d4f0L1861 Signed-off-by: Radostin Stoyanov --- 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