From patchwork Tue Oct 4 03:51:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 2801 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id EOM0AMJJPGPgFgAAIUCqbw (envelope-from ) for ; Tue, 04 Oct 2022 10:57:06 -0400 Received: from proxy13.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id EIGDO8FJPGNYSQAAvGGmqA (envelope-from ) for ; Tue, 04 Oct 2022 10:57:05 -0400 Received: from smtp7.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.ord1d.rsapps.net with LMTPS id QN9dAMBJPGM1FAAAgjf6aA (envelope-from ) for ; Tue, 04 Oct 2022 10:57:04 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp7.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: 39b98d30-43f4-11ed-bfdf-525400d0c497-1-1 Received: from [216.105.38.7] ([216.105.38.7:60770] helo=lists.sourceforge.net) by smtp7.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 5D/DF-20244-6C84C336; Tue, 04 Oct 2022 10:52:54 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1ofjH9-0004H2-RF; Tue, 04 Oct 2022 14:52:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ofjH6-0004GZ-Cy for openvpn-devel@lists.sourceforge.net; Tue, 04 Oct 2022 14:52:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PbsLH/w1wvR7e8odErhItrKOPViKJ7PnrNQ+bgJjZmo=; b=V2RHp3ri49uVx1HlqqBothTrjo XmF7vtsR63n01tUZa7WVIOdJwam8yebnSF+FR6y5hgAwQroi+FWdlOOYcU03JyasdJEuaV23K5FwW xpkh96mqWFo5Fc8Qq8aoURPVidhAe6xxDrL6kQRSIg9ZdJC2GoPXR+gksN8EuGKymfWQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=PbsLH/w1wvR7e8odErhItrKOPViKJ7PnrNQ+bgJjZmo=; b=a dsa2j1p5Vu6pcUQKOVgr4gBj1TltKimPzb9bg47dBIuNv9wNWf+UudKmvVfzgwEw2OyEJKLWMSlpo 3qAZaGThs0LsUG2m6jULrtpcLE1mfELw1zhrStNiDOfTE9sWRXZGXLNRMH+EPymqV73N0Ta86Ovok NN4P2dlv27irf7bw=; Received: from vmail1.greenie.net ([195.30.8.66]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1ofjH0-00CUGq-NZ for openvpn-devel@lists.sourceforge.net; Tue, 04 Oct 2022 14:52:00 +0000 Received: from fbsd14.ov.greenie.net (fbsd14.ov.greenie.net [IPv6:2001:608:0:814:0:0:fb00:14]) by vmail1.greenie.net (8.17.1/8.16.1) with ESMTPS id 294EpgFe009763 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL) for ; Tue, 4 Oct 2022 16:51:43 +0200 (CEST) Received: from fbsd14.ov.greenie.net (localhost [127.0.0.1]) by fbsd14.ov.greenie.net (8.16.1/8.16.1) with ESMTPS id 294Epgwu019100 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 4 Oct 2022 16:51:42 +0200 (CEST) (envelope-from gert@fbsd14.ov.greenie.net) Received: (from gert@localhost) by fbsd14.ov.greenie.net (8.16.1/8.16.1/Submit) id 294EpgQB019099 for openvpn-devel@lists.sourceforge.net; Tue, 4 Oct 2022 16:51:42 +0200 (CEST) (envelope-from gert) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 4 Oct 2022 16:51:42 +0200 Message-Id: <20221004145142.19091-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (vmail1.greenie.net [IPv6:2001:608:1:995a:20c:29ff:feb8:10eb]); Tue, 04 Oct 2022 16:51:43 +0200 (CEST) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: FreeBSD 14 clang complains about this: init.c:3530:13: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] platform_group_get(c->options.groupname, &c0->platform_state_group) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] Content analysis details: (-2.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.30.8.66 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different X-Headers-End: 1ofjH0-00CUGq-NZ Subject: [Openvpn-devel] [PATCH] use boolean '||' to join two bools, not bitwise '|' X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox FreeBSD 14 clang complains about this: init.c:3530:13: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] platform_group_get(c->options.groupname, &c0->platform_state_group) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ init.c:3530:13: note: cast one or both operands to int to silence this warning 1 warning generated. .. so do what it wants us to do. Signed-off-by: Gert Doering Acked-by: Antonio Quartulli --- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 03416844..c88c0915 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3528,7 +3528,7 @@ do_init_first_time(struct context *c) /* get user and/or group that we want to setuid/setgid to */ c0->uid_gid_specified = platform_group_get(c->options.groupname, &c0->platform_state_group) - |platform_user_get(c->options.username, &c0->platform_state_user); + || platform_user_get(c->options.username, &c0->platform_state_user); /* perform postponed chdir if --daemon */ if (c->did_we_daemonize && c->options.cd_dir == NULL)