From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04FBDC43603 for ; Fri, 13 Dec 2019 10:40:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA49E206B7 for ; Fri, 13 Dec 2019 10:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfLMKke (ORCPT ); Fri, 13 Dec 2019 05:40:34 -0500 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:39332 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbfLMKke (ORCPT ); Fri, 13 Dec 2019 05:40:34 -0500 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1ifiN7-0002iP-AK; Fri, 13 Dec 2019 11:40:33 +0100 Date: Fri, 13 Dec 2019 11:40:33 +0100 From: Florian Westphal To: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org, phil@nwl.cc Subject: Re: [PATCH nft] main: enforce options before commands Message-ID: <20191213104033.GQ795@breakpoint.cc> References: <20191213103246.260989-1-pablo@netfilter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191213103246.260989-1-pablo@netfilter.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Pablo Neira Ayuso wrote: > This patch turns on POSIXLY_CORRECT on the getopt parser to enforce > options before commands. Users get a hint in such a case: > > # nft list ruleset -a > Error: syntax error, options must be specified before commands > nft list ruleset -a FWIW i like this better than the attempt to sanitize/escape argv[].