From patchwork Mon Apr 20 09:29:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1273232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33b; helo=mail-wm1-x33b.google.com; envelope-from=swupdate+bncbcxploxj6ikrb7gw6x2akgqemv3n5tq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=o9EGnNfD; dkim-atps=neutral Received: from mail-wm1-x33b.google.com (mail-wm1-x33b.google.com [IPv6:2a00:1450:4864:20::33b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 495Lxq56XFz9sP7 for ; Mon, 20 Apr 2020 19:29:35 +1000 (AEST) Received: by mail-wm1-x33b.google.com with SMTP id f81sf3313161wmf.2 for ; Mon, 20 Apr 2020 02:29:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587374973; cv=pass; d=google.com; s=arc-20160816; b=bjDHd0bEbb+kIxtf9+8y527mmMUygMYajRaGtwY1ouHAkI5veFld2m/kQvENnLaSpQ rwNxDb8TKsD6C8BqYjgiTtfezAaO8Q6xQAGjNitO0aQul4Sr6DrPMyH2CyDsNmfrZoiH ZOElc/GW2no7sLnvNoeKn/WeK5FxxoIGqHtGvdFLlK5vKNG3Jl3QX29GbbngDt0cIL99 loddLJV4xOpV+FFpIPO3pd/LY830+O+qJ4/EQLFCcghGpImF2zLWxwt/j2MvRo6vuCq4 OPs1aBJN/Owi4zmjd+z1XQCWkOY7MIw6ab6XNbRCOE0kJIqybZBL9aA6XXL4bd4+gPz+ /YMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=YDBlmyo7bc1jGOw6EtG3hLqpyUgAjUbB84NPM6kblZw=; b=PLcGUTqURre2Ypo51/x6Uu2u6UhEWClscBV/nc80VZKLgHanbPJgY96K6ynwJGlWEC oUtKfvy3vys4Pk7ENqM1Ma49qri0+FuT18O8e3lFX9ZriLxGyvjtpiRYOJTp9waCGQpM UOrIz0TKciuU7vEIpbbGraCewquJr6DBsGOPwDgxgBjAs57dCLgzG4xOzDIamlr2yVoj VbcN8Wpe7p9XB7Bw7tDiJUhLPA1ov8daeOCad+alWACE1eiBHuHRBFvFSvPpMgxIHx9T gSRHjF4yXfzAfjqwFfjKz77kzb82tgP/627sB1T339xLsQmOodHphevsfTURVhY4FTd3 esjQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=YDBlmyo7bc1jGOw6EtG3hLqpyUgAjUbB84NPM6kblZw=; b=o9EGnNfDMmYXq4C4VURe7YRRozfe+Tjq10zj5QzXMK/pRBlFErjGujcjy6IJ99E1bs wIt2kfvNee/n/LWWKV3xlHWNr2wz19A7UOWw3pPiZ096y79k3gL7RqR9S1LCiuxgjkM7 qy4kC25mPJWe2JNhA/bn5QBQ5IzH46OdrH45t4Lx2dbcYnj1+oJ3bM12v3YSJr4l2eB1 A9hg8wlVyKgjsjSlWB2b6eDWAlVX2lSecZoCjfrFsXfqWadJCkhjxpodIyBV2lMWBFpg E1yo/oyCI6JN0l7p8hLiI9qndGW4Ed2w+SwKflF4aqvQWT6fkZPMp1cUHi7grnwa730B 71gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=YDBlmyo7bc1jGOw6EtG3hLqpyUgAjUbB84NPM6kblZw=; b=b3dP0TE4TXjDfDa37SpOt3WDrPigsyQTrnJffD0xkKtIV7BqVu6oykRXeeYjS9G9tQ 3du3xk0RHedoiQE9aDRJribQDL26JK+mphkVsDdZUpP1ywQSgSKi4HrTLuCJCF6gs3U0 LxTLUaXLbG1TkgqqTFZ8Aj0VCMiEiQKyYQaTCM07DFbtLBOefL13j7zSVDvZUQZnaWX/ qC9lhYlbEIhq90YG0kaHnqCmwGCGlOtf9PK9dpWQ2UJN5ncNvkDRaQTOaMX+whS44hf2 6N9hc8xz37grETRkHlV06v9MbuB4Ea1LbsHoVQXQVQfoHAQUfFOd7aEn/UMZ4yLoV9j/ DYKA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0Pubm0/PH+crVqNzmHnBXJQR0va/1lydFpPieHkbScLv7nFy6jcs0 CgRvDXo3dnRSAuZQd2EJg7A= X-Google-Smtp-Source: APiQypJ4JfdH1sSFc+m6BbCrUj13kGXGxKRezFL2WCpj+KQNQlOZOjBvhvEIeRIv6Aw59G74Io50mg== X-Received: by 2002:a1c:bd89:: with SMTP id n131mr16485921wmf.3.1587374972866; Mon, 20 Apr 2020 02:29:32 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:cd08:: with SMTP id w8ls12098693wrm.5.gmail; Mon, 20 Apr 2020 02:29:32 -0700 (PDT) X-Received: by 2002:adf:f40b:: with SMTP id g11mr18845341wro.178.1587374972267; Mon, 20 Apr 2020 02:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587374972; cv=none; d=google.com; s=arc-20160816; b=LGqztreqtFR0uJFPIsPFWnPbuJ76o/Z8N0Ha1c8SAafbedGgH9aYac5vwrAKVVKhx4 TtJiehAQwG2o3jiJ/nPf7InOgPG38Bx9Pz9Sr+pNbzqXvf54RMQgFqwCfhPkIpWvdpxl uf+HVo+Dodmjdry0Aa+ZNd93Ntulb0QrWm/HXcxg9IdEk735Nx5xLSBHRBsj3wOSyv7C 9L0bwjRB0gZWBnf5nCklAB8HxY0/p9TxSu4BGyYA/65pKTro9wtwdkx+tpauYtsxTKaI TBX9P/7wvjhIUD0xeWyvT9JESgn8ippdHhB41H26qzs+2O5oM2ou1OVU/hXg/mb/MYtq fXcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=GUVGgGlqI2ZKpboztj9ReieIA6DG1ljB8iZYJmeEMHs=; b=lGqwJjjpsz57a/CZyEH9fZ0YLKTh6WesdJXhKBoc6vUeq20/dDjmZqWaMXjM5mkK4K QH++cUAnihM8C32asF9UHsmWx/UAV1oO6VHpjT3d/24DP6//PXZEAQiKNZeCwRtK2L8Q ngUfIH3Acd7MPkJ6CtDNFboonplNOpJoRaWmfSo81t2D9mzLbNZm8dQfnZtDJ4p4BMF6 ppCjmeliwFjBwljnUKWjIQ3lvbnE4EIDlqeaoGcxhCNl4R4TZ0hNMG0dAAbahHPANS9J M261lOHLrI4bKBKyok+UbhvNxYkLNVjhOBuRSFyHzd6smdd9MJGS6su0OiEGXU1n4ICb FXxg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id o9si30044wrp.3.2020.04.20.02.29.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 02:29:32 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 495Lxm0d1gz1rsMZ; Mon, 20 Apr 2020 11:29:32 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 495Lxm0Rw8z1qtwQ; Mon, 20 Apr 2020 11:29:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id qxBX2CYDDyXh; Mon, 20 Apr 2020 11:29:31 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 20 Apr 2020 11:29:31 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 0F4E945405A4; Mon, 20 Apr 2020 11:29:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mlwkcy7ddNzP; Mon, 20 Apr 2020 11:29:28 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id A467F4540297; Mon, 20 Apr 2020 11:29:28 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Fix coverity #292156 Date: Mon, 20 Apr 2020 11:29:25 +0200 Message-Id: <20200420092927.3582-1-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- core/network_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/network_thread.c b/core/network_thread.c index f888d76..0b8e0aa 100644 --- a/core/network_thread.c +++ b/core/network_thread.c @@ -136,7 +136,8 @@ int listener_create(const char *path, int type) return -1; } - chmod(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); + if (chmod(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) < 0) + WARN("chmod cannot be set on socket, error %s", strerror(errno)); } if (type == SOCK_STREAM)