Message ID | 20170718013334.15393-2-f.fainelli@gmail.com |
---|---|
State | Superseded, archived |
Delegated to: | Florian Fainelli |
Headers | show
Return-Path: <lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i7dtHt3j"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bKttz9Kt"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xBN4G3RTJz9s82 for <incoming@patchwork.ozlabs.org>; Tue, 18 Jul 2017 11:34:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1l3ZtUbTCEDJeyxLgGfnviRSDkrWeMSptVQ0HubDjKc=; b=i7dtHt3jxj39PW L6VCb090VIMr0lpnP6uGnvCFJJyjvDBbUWlji3HoYmWKpk7ipq4NME8xoDQB4CHgoMGQf8svHW+qa 3u+sWIte1FDCtxTab7R4ZogaV1VlJ0C4v/Z/FSK8w8WRXVNPOE6Yxl+fPEA6DNq1vYbsj3JUnRMME wuc0sKiO/hvKD3/6YEmmcR5OIw8wequv9gpD2BYxdExARpaP/nOteJoXlzHNSzqPtV3i2eh/d4Fsc xhgaYorPOtqLmDUkVuZ5+/1xtEIHCQKx4S/Op80n4KdcFeF40/edI8O9ozoV6jibyT628PnKwDQkh +8HZKQxxhRfdUYSiojDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXHOt-0001Jf-H0; Tue, 18 Jul 2017 01:34:11 +0000 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXHOi-00019g-FW for lede-dev@lists.infradead.org; Tue, 18 Jul 2017 01:34:01 +0000 Received: by mail-oi0-x242.google.com with SMTP id d77so780081oig.1 for <lede-dev@lists.infradead.org>; Mon, 17 Jul 2017 18:33:40 -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:in-reply-to:references; bh=6DiGV3hQQsJ9aoYyGqH7EtW6+vgnN+NLlG2mGIGs1zY=; b=bKttz9KtcrF7w6v1jKJKI5UnJe6cS23KhHDSnqQPk6bTXsXAqkapO+qRBwNLzng2pC wAk4v1FcMCdFoPTpjrIRWFLjpd+nD6kn17Y0XHg+F6Xbuu6FDt27ehgYRcC6QbBvWXm4 7MmJUWzdJMkNGPH58M9n61lL8IEkPa00AuCOxBXQHTr+O8gpB4S1AYbxaVI0IolHm2Ft sqVVouVjTiZm09YLaWZvTOUMYRHsP3k6jY8c4AwSMpZvQ7hl8+f080m0J+vXKIvgbLdV A435iX+mZAaBL+YAP/ARnfw642Bpn3VLG6p8Euraa8XPRmdHShVCbTy/gkKphG5Vyo6D dtnQ== 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:in-reply-to :references; bh=6DiGV3hQQsJ9aoYyGqH7EtW6+vgnN+NLlG2mGIGs1zY=; b=AO5dIuKN8/tCUFXaaxsjMgxV2DZHDSDKRD83STmtpw3njuqTqjYIu0vGJCXzrWWNi2 zFFrZynDJMav7NCzAicWPJsfWn598rUiyBOat+Zs/VJ2fZTA/mFPsd5TYhE765A4O5pD hAaynG0dFnMdds9lgi90EOeGIN/am4QgSOjmLkD2p8LE8bub78e1KpYX5Ckuwk58qlCD mz/qAijyC68himwCoCNPa3KE7tz5gZ2YIipzlUAwVYWqBsdJTkX8lzv6kB0/mrHRAelC J1ul/3ZSs+8m16sC9OjzZU1pzQ/WEAA9BzGuRh5VYYPLgRpr+TVStsoKkv5Sha9o6N2k tT8w== X-Gm-Message-State: AIVw112GJ/G4TzCH6qOHj+2CRK7Ym9upGq0aO6NicIH5rwLq0zpQMAYp qp0yDauzVw3YtaQ/f1w= X-Received: by 10.202.104.3 with SMTP id d3mr241179oic.53.1500341619497; Mon, 17 Jul 2017 18:33:39 -0700 (PDT) Received: from cox.net ([2001:470:d:73f:c1a0:bc99:c3f4:47eb]) by smtp.gmail.com with ESMTPSA id d5sm1503461oic.14.2017.07.17.18.33.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 18:33:39 -0700 (PDT) From: Florian Fainelli <f.fainelli@gmail.com> To: lede-dev@lists.infradead.org Date: Mon, 17 Jul 2017 18:33:34 -0700 Message-Id: <20170718013334.15393-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170718013334.15393-1-f.fainelli@gmail.com> References: <20170718013334.15393-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170717_183400_564483_180847CC X-CRM114-Status: UNSURE ( 8.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4003:c06:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH procd v2 2/2] upgraded: Check chroot() return value X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <lede-dev.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/lede-dev/> List-Post: <mailto:lede-dev@lists.infradead.org> List-Help: <mailto:lede-dev-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=subscribe> Cc: Florian Fainelli <f.fainelli@gmail.com>, mschiffer@universe-factory.net, john@phrozen.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Lede-dev" <lede-dev-bounces@lists.infradead.org> Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
diff --git a/upgraded/upgraded.c b/upgraded/upgraded.c index 09c623cf804b..220da7903f92 100644 --- a/upgraded/upgraded.c +++ b/upgraded/upgraded.c @@ -78,7 +78,10 @@ int main(int argc, char **argv) return 1; } - chroot("."); + if (chroot(".") < 0) { + fprintf(stderr, "failed to chroot: %s\n", strerror(errno)); + return 1; + } if (fchdir(fd) == -1) { fprintf(stderr, "failed to chdir to prefix directory: %s\n", strerror(errno));