Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5382086yba; Wed, 8 May 2019 12:21:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmcqA1gFyinS/ztvLq1RYpmhmMICL3SS6F0sTfrl6uu/4KGwDZC7FG+4uJAvubHfI5FcDO X-Received: by 2002:a17:902:8c85:: with SMTP id t5mr49975656plo.23.1557343292135; Wed, 08 May 2019 12:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557343292; cv=none; d=google.com; s=arc-20160816; b=cAgHmXlwRidET8aR4hWNSRelagRDQWPUXDBymvGbA/op2lKKWTZoMyHLv5oqOptOr5 KkzB4iNakp16na95f5Mr/y95iDXp/4C5yeAq172OpGG2cOJM86qaXsly0k0/5Ydr6vFt uwBkIEbsadUgwBtod3NikZtqaKizM37BNiMHXNU5MZFrtaITYmsaiL7jrtprZvjrK3t/ QSBRdLAe2E3DL+OAx7qw3ALImLzak9np5ol+OsnFTTm7mKQojr96/JSeqbf25/6awl47 jOYCIJ2axnDoL9BBuJseHWVRmkNirBpzh3l/ews23pmei/xQGgo0xphf/wvU35ijfqpD 7UKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:date:from :dkim-signature; bh=oukS0tWnjhUcgrOB+VdnNDEvlpBoD2u3Ucf9S3+HJLQ=; b=rfAsLcpgckFpqoA76ugf8XEP7knBomaGWpJRJdI9QaqAgAwrj9BGZImZmUt6hCGb9M NQdY7wgRdmxRHKgV3FyEbz+rkvM2TJLsnVjtz8AAGNQXt0ZaGfxecpZTqancMQYVC3ip bOZtvnUaWTVMhp0/SNAWHR05H1/B7S80TT6+85SwQ3aU5Zish3PUtx+vx4jRzHIJYvM6 DP/nAnyR6eDz3ck2/C+DpMFuiMaGmVvsQBk6XbvWHwWxeeORXqlBB7AwAfv9esy6RcrD i/Q9I1sUja2Xe3Bwo98Vgr2+pNID3j5Rf98PxKgay5VjacU340yDbjjSnVH/cECM/8g4 X9tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=T53P9Ez3; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13si23028893pgp.569.2019.05.08.12.20.58; Wed, 08 May 2019 12:21:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=T53P9Ez3; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfEHTD6 (ORCPT + 99 others); Wed, 8 May 2019 15:03:58 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35166 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfEHTD5 (ORCPT ); Wed, 8 May 2019 15:03:57 -0400 Received: by mail-lj1-f194.google.com with SMTP id m20so9217045lji.2 for ; Wed, 08 May 2019 12:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=oukS0tWnjhUcgrOB+VdnNDEvlpBoD2u3Ucf9S3+HJLQ=; b=T53P9Ez33w5PHBxX0aFn5qpWGk5cDVGxj2L7dJzxyaB6GXPaCU4i0m1ezr7moDnDuM NNcVBFd4BPK/S+zVJ9ap/TXCRzWo7MnNiyuyv7V5T1J8mn1UEuhrNM5eJ9KaZGZgYCHw 5nZWH+OaRr7q/hwmZWRpu1RIXxTHlX85jDMr71CHeWuyWpdI+/jny1Xo1w2Oza1Ubhws CiXBKxPJZNTPylczmop6wjaZLhIdAbQewUPx1Vf9VgWnWp6ozZWq4Hl055wSw9zpXPQh 0FC91mdxex2UUHs/awQ5EOYQDy+DfknrMaIrxSC9t98TAJOFjmbUgFBCXsgy9DWH61yW RTVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=oukS0tWnjhUcgrOB+VdnNDEvlpBoD2u3Ucf9S3+HJLQ=; b=LiQNwDSiwlHl6u/KL2dnk3pLJGk6eX4u+tlDSPc+xLPXU1tJ8XSHAjKr28UjixaEYx GdfuChjAcK/qYDq+SvIQcJeA4Z2vaW1qHAc909K3Fu5edNbref07yr6TFjtvG0siXJs9 ImdLnt1pX7d6IrS62X5lnhnCKe3M0DPGsBMfM9y19dD5uEjxh7aI88M6Z+8pw2gCYHvS ogAW+IQR1RiCrLrZBg+giqWv3uqfaLZ9SD04Gt7SXNyUgSJP0GUSlZoS59/pTnyKf5P8 00b2jqwViaFlgdmzrVHsPB8pt6DL0ztPcYH3Gbfjnq17ObZKnjK587Vsf3l+zGazuKdP wy9A== X-Gm-Message-State: APjAAAUDpXOFBbVJ4/5g3Oi7Dn3LfXlpbSkTONmUg6nuDodzTclvcyIh XO0DipWlPGAvmoP9Xd8p66qKMw== X-Received: by 2002:a2e:9d4c:: with SMTP id y12mr2843621ljj.132.1557342235706; Wed, 08 May 2019 12:03:55 -0700 (PDT) Received: from kynes (apn-31-2-19-253.dynamic.gprs.plus.pl. [31.2.19.253]) by smtp.gmail.com with ESMTPSA id x68sm4260362lff.3.2019.05.08.12.03.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 12:03:54 -0700 (PDT) From: "=?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek" X-Google-Original-From: =?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek Date: Wed, 8 May 2019 21:03:52 +0200 To: Brian Gix Cc: linux-bluetooth@vger.kernel.org, inga.stotland@intel.com Subject: Re: [PATCH BlueZ v4] mesh: Add key storage Message-ID: <20190508190352.lsekrwrs3jk7ooc7@kynes> Mail-Followup-To: Brian Gix , linux-bluetooth@vger.kernel.org, inga.stotland@intel.com References: <20190507172701.20726-1-brian.gix@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190507172701.20726-1-brian.gix@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, On 05/07, Brian Gix wrote: > + fd = open(key_file, O_WRONLY | O_CREAT | O_TRUNC); > + if (fd) { I think these should check for fd >= 0 regards -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND