From patchwork Sat Feb 8 13:47:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1235278 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::240; helo=mail-lj1-x240.google.com; envelope-from=swupdate+bncbcxploxj6ikrbx7x7lyqkgqeofz72qi@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=ls8Q0unp; dkim-atps=neutral Received: from mail-lj1-x240.google.com (mail-lj1-x240.google.com [IPv6:2a00:1450:4864:20::240]) (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 48FD4L58KCz9sRK for ; Sun, 9 Feb 2020 00:47:14 +1100 (AEDT) Received: by mail-lj1-x240.google.com with SMTP id k25sf700747lji.4 for ; Sat, 08 Feb 2020 05:47:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581169632; cv=pass; d=google.com; s=arc-20160816; b=rDRxxQ1OsqJx/itFOhJCv8uhy3UC71crzgyhlh0ENDCVcMJTHIRcTjru6BQ9UAjgju EYjiJlPaV/YcyNgeYwHnEIoIoCbstSbF8OtCB4MRaFFyNzZfV8Eh0EPORsCjIdzNQCK4 8NoWt36tuqR/PDz6wPDVOB1MUxO+afvxFIWASopqy2cY1A4lMFMKqVtrqqxSuBr/50Dq efVevvHb8Lnm+HDqQLtCzxmB4uQSbjuhoqDIzAZZUxF8AuBmYbMDwVfzR3jopi70nHr3 fJPOFUE5eI787PXs9f5KxcRlu2Yjzgh3qk1linKgiaZc6D+wSAIhhet5607ohlHQKrwk xEIg== 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=yO0yDA3GjjYtl8hgMjUUUIwDj3J66ODvPPqLfSgaC6w=; b=T2dleCc6I6N13elbFoQLbfDeGbyPeybVYcHiRlYXmPYVXYaa76xudN5HuWsVZogVTh wH39zAPHIbEknOB5bgiAidYb3py1pMFCLEUUNqYDBw05YpMbZGht/sppeblv0ZE2wBXH 5hIJtdW1WpnpL0H329FICEhNtYoKsjtwrTuCFjpyHj/HB9eKtQ8ytKFobVefDqja3XM4 HUM0X6LVhXmmSQGpfbQ41DNTJaNC6VGQGAkgaBJpurBugj+nxq+1rAreHb2+bAcvD9mc TGmqatjtMW0gWuvmeZUjp3chySEB+sS/ufAX7paFVFKJ+pnIr+nUbWnquuoXrVhP9Wxr C/Yw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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=yO0yDA3GjjYtl8hgMjUUUIwDj3J66ODvPPqLfSgaC6w=; b=ls8Q0unplp2PXlJh86LkITx4r4yuCGWk1BcKbThdkjZe4qbcMP3vlkskaWDjRCsOKC 69vPe2wSvCSGNcUNwIz6uWNNoh01aEkXB3oIbHhqsoPGGNxOClXioirTKkCn0FksYIT4 WoFtyzaENjiYwM7mFrALSf6HWng/xszY7tCtSrMSWX/aXoRqfHixCvQ3muC0ziqPS1JI g3NDtF/B0GA1y4EmxLw/jeKqYRjlNEP9wGGN8xr0QknkrPZO3rxBrw7Glrhdla9CCMaL sdqDclFBPHpBMgQTa1GZaGDGuj1a/sgkMdfcDIU45985mlQ7OF29uLCxn+Cpu8UehnUR U3sw== 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=yO0yDA3GjjYtl8hgMjUUUIwDj3J66ODvPPqLfSgaC6w=; b=g8nswBlPSnCUmXWKd8HPZEStGAlFY0oHTbvi/Ezbhbj4hbnPxpsQjNqnaIMVi8McWc XQBgC93SVatYwmn2mKHzfyrngrM4Nrjk+N58iqRp05pYE+QUGqdQcqzOwSAadEcEYMba 0fDVY/f7zeld8slYM/rEJ557jU21O6tmIFWOXm7MoFtJRRtPyvlh1IzZQRi1p0PHy2eV MLamN2k1c8CPDy73rr7H2J6uBsnq0lGvW0TqRT7XRyevfGlTTUMOzDam4WaolluDQM7n QjRsVlc9erXVlFjIPjev1nUdt6wmOz/bRS+fOLG2RouYA7jgsWW6ngdtqxZaUNR/gYg9 8Rcw== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAWRC8l4KQjCQ62vJIxxR0lZb6Zar6DmhNZO6awKUHWUgy6W84OB I6BL6VmnBILirwRvxl0/enw= X-Google-Smtp-Source: APXvYqy2RN77LbdhAsiBgdWLtSj94PWnuYQJGW2RasZnGXe/OEL2B9kHUusb3jraKtCXdDJMp9AtNg== X-Received: by 2002:ac2:5f74:: with SMTP id c20mr2062785lfc.15.1581169631906; Sat, 08 Feb 2020 05:47:11 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:9516:: with SMTP id f22ls415766ljh.2.gmail; Sat, 08 Feb 2020 05:47:10 -0800 (PST) X-Received: by 2002:a05:651c:40c:: with SMTP id 12mr2740023lja.147.1581169630909; Sat, 08 Feb 2020 05:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581169630; cv=none; d=google.com; s=arc-20160816; b=sUD0PbQ0lRiPfGf1mfKnwuBQxkEspbkr2BTyE4XJ8RoPaaYjEmh3voovRl+1GLklYZ 0OH7c8niLWF2n/dqCcbLlK/SDlqvR/gE3NmrYkQUW5x69YFXiEgFbvayLH0vrvTDRdgd 5f7GfYtOCsy0KcmLB1jJKVzn+naXkU0MzPJ7i0icRz1hbYiKqoqiSgdv5b4aX1vUQpmB WkTDvHYhM+NZYr/jDOuACCmLp7YnBGcxcK2+X+GNXeAGlaKYDHb4YxdgJPkI8+vFxMRd 6gruvWGe0bLwXKXinajmgvbdUBmoqxkjL82g7s8pkskxdtO3ZbMxqTdS78TCN5F1llm0 2kmg== 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=WviH+YcTa5dZMmIQH6+M/7y4ZNUF0IoAuAMh0zSNw9k=; b=C8uYse7UOq/qhXhZOIbnsHiOy0VGPTil08JLfx6t4OsPNiXk680IbWLW7Ezk+WRupb sLSpJYkM8dHE6EgpLvEbHX2SZcMXVDXKDJ2AW7Y6sKJeDk/IlUEyQ398Abt4QjiyriiB wIkvf3VnK0F+BZpDN/fy/cHsVKbLW3YNa4cYW7bGqoelUYyQV9Z+bp5Z4wO5RjyfkzFH 6T6DPSmVlZGcA0I4O0PmSsNEQ9USZAl+hlq35G9WL7/HJgy8w3jXJI1l8s1A/NB151cC Ay4Fl0Sf2fW8KPxyh7cNZlBsice+4DlBtXyK/LYla4tIqpowpM+pJxdwWwW/bGdv/au2 fQHw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id h8si135641ljj.3.2020.02.08.05.47.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Feb 2020 05:47:10 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48FD4G4799z1qqkS; Sat, 8 Feb 2020 14:47:10 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48FD4G3q6wz1rVvc; Sat, 8 Feb 2020 14:47:10 +0100 (CET) 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 iawWM7HxPjIS; Sat, 8 Feb 2020 14:47:09 +0100 (CET) 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; Sat, 8 Feb 2020 14:47:09 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 6A9904540663; Sat, 8 Feb 2020 14:47:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id WEWcOznKipQi; Sat, 8 Feb 2020 14:47:07 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:2001:a61:60cb:9d01:4102:a8ec:5d26:4c4b]) by babic.homelinux.org (Postfix) with ESMTP id C9ECA45403AC; Sat, 8 Feb 2020 14:47:07 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 1/4] server_general: do not raise error in case of unrecognized option Date: Sat, 8 Feb 2020 14:47:02 +0100 Message-Id: <20200208134705.6547-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: 212.18.0.9 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: , This allows to have a two-stage parsing of the command line parameters with general parameters parsed by the suricatta module. Each stage cannot raise an error because it is not responsible for all parameters, but just for a part of them. Signed-off-by: Stefano Babic --- suricatta/server_general.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/suricatta/server_general.c b/suricatta/server_general.c index 5f91931..f20d433 100644 --- a/suricatta/server_general.c +++ b/suricatta/server_general.c @@ -604,6 +604,7 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) /* reset to optind=1 to parse suricatta's argument vector */ optind = 1; + opterr = 0; while ((choice = getopt_long(argc, argv, "u:l:r:w:p:", long_options, NULL)) != -1) { switch (choice) { @@ -626,9 +627,10 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) channel_data_defaults.retry_sleep = (unsigned int)strtoul(optarg, NULL, 10); break; + /* Ignore not recognized options, they can be already parsed by the caller */ case '?': default: - return SERVER_EINIT; + break; } } From patchwork Sat Feb 8 13:47:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1235279 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::43c; helo=mail-wr1-x43c.google.com; envelope-from=swupdate+bncbcxploxj6ikrbx7x7lyqkgqeofz72qi@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=YOP/2Brg; dkim-atps=neutral Received: from mail-wr1-x43c.google.com (mail-wr1-x43c.google.com [IPv6:2a00:1450:4864:20::43c]) (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 48FD4M2yJBz9sRR for ; Sun, 9 Feb 2020 00:47:15 +1100 (AEDT) Received: by mail-wr1-x43c.google.com with SMTP id d8sf1436781wrq.12 for ; Sat, 08 Feb 2020 05:47:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581169632; cv=pass; d=google.com; s=arc-20160816; b=c7LvwTVd5p+9Jxwh8d402ha9OvRBEMZsuBh3litopcZzQgz7LbSFgFjqX4A7wYDJKQ 4GJxDfIzgOo+IUtIsewI5hLDYjIXbrLk6qaP6PTmuO6CECsvIv8qv1XTisSH+QPnng1e ySS+5KX1ANCZ6GPZtyeEQ4oh9EEmRUkn6+EYCnLz4XG66K3IkacSiIBaBZAxrMOZFBpm ZMqmbbG3b9t6fdkClpo8a+1VRtU87H9Q6d8inNZeRwTri/UBWk7Zu5z6/+rmUBQwIOEG U2gKsf4kOARPHYuWj9wHDa+cgUz/RrZRATlJo4FfFIX43ITfosFBnvC9tmXuhcwSGOKa g4Xw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=loH+EBaeOJrpwBy/+NuOY9Iis/lXA8QFLg07SItkrMQ=; b=isH/oEqdvbTdW7CNDg7gWK0dA1Xysw2HTvFKumZFbZ90NpCHn/b1Jbqz+CISOGzlC8 RMb1Fro8SKSqhnzzB5x2U2/y5R8WjcGn1hmLjGD7sS40INpdP2mOulsrxHiENskAMJE1 53Hmv3imUkEiyFopYsCy3Dzorqq1ZojZwKKnemPoin+ZAYGKO3En6d4QdpPEW3CJyuOp pqj+S+qAsI+U9qW8wDIHYJlXS6pwczTcD28m1J0oDC42o/o0gZInS9Wn+H5qZlZL8gqe axCx1NmTpy8BqnT+0xNfoRYLbKlZA4ADKgz1U5viMv0WsBMTcqvo7xg/iQOnx2lMOTo1 Gtxw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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:in-reply-to:references :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=loH+EBaeOJrpwBy/+NuOY9Iis/lXA8QFLg07SItkrMQ=; b=YOP/2BrglxATDMVt6xSbAS7Cf69m+uaB0Tdk2H7IimGa8jCuiYfFF70RKxo3Opo6Js BXbdnVukpQuDFhbjGqNgrL+/7M7ZPZJY48gXrBgDi2t/gkJGDlsR52aLSzWCKirkxf8/ 0g++eQXGnLtDrwX2j/Yee+Vznh68tNnxtsSSU0tSRkF0Bjx4gepDXJTMF+1c45Hmu/4t 8eOmlHhh9W69Iw7+/k4zROzP2E9K3PqHzG925PLR272EBFswYr9qn9omdDdOfFkw33pX MAFim8qkGL34vJhymCNAspooRCMi73HmfMawXvVqIctR8MJS3O+lCW3hpnMvS82uiIRU cp0w== 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 :in-reply-to:references: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=loH+EBaeOJrpwBy/+NuOY9Iis/lXA8QFLg07SItkrMQ=; b=llHXJnADolOiIkuPiqHyfQ8/RsjFR3wTYQeNuMc6nllh5nPDUJxLehqWnFQy5G6nLn ec5etnVvEub3Nssi7O2Ha5jFMH/Hl/3kZlVLLnYvKbRMDwFjPSMIIQjXPydl39UgeHzC uKclvvPAkp2dExpBvIxCg6XV67rqWkARhvCTqnLjHg21BMK6cDRWG1ViLr/XInssZdQU x1Pv0kGINGkvUDISTPCjwfq3StRFTTT53ofS5UyA5iRSZggnhjyjE0+4ATCLxqQor5xK ePXKz6vohW6LqVmkZnro84bb/pqzSaEbdp73r6DzoIN808+Zc2ZzAC7+Jl/X4jB9nC4F d3Rg== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAUslSC+OFULEPEHv6BFCEs1eD8zAjycNxotYv/KpP55KH7w6kz1 k2SXqbYE63DJ4+TDjGsMoCk= X-Google-Smtp-Source: APXvYqwxwscK5P5TFiIWLiOilYdMn+Bez4tlzzIaacSEarlIfbS4OHnjKcU6wWIhGdfM5jxeeqofjg== X-Received: by 2002:a05:6000:108e:: with SMTP id y14mr5632952wrw.338.1581169632250; Sat, 08 Feb 2020 05:47:12 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a7b:c452:: with SMTP id l18ls10313392wmi.1.canary-gmail; Sat, 08 Feb 2020 05:47:11 -0800 (PST) X-Received: by 2002:a1c:7c18:: with SMTP id x24mr4788339wmc.185.1581169631444; Sat, 08 Feb 2020 05:47:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581169631; cv=none; d=google.com; s=arc-20160816; b=SDfrCOo37SXlClq5dM5/QFBil7j9raD0GitPTxXWQcouBXpitGOrDj4xEu35heH0pi IER2sRMRzCJ3kFjf7tckBuc3FX22O3TBxLzTo42+8kObVKZva0pz4a6P1rSXjNW9cAWo ornloUPoijEP3yITshY6X8Pz1kSqqh7c4r9XkWVvHyELd2ZdXPTruiFCkqSDNI87MYr3 6N/cd3UWb9adiHUfhjixXnGgW17iymLbXApnQxekku1KdZHzTP570mLe13rll8xLorao 6QuKngpzP+d82GH78eL/jLuENYWNJsOE5bWhKWI8aW5nLaYtPp8lr7z9PIjqyhOzRBuw R8GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=31x/7iP5dj8nxFKiEmJCbBmKVDg1MZ2lSDeacbB+Rf0=; b=IxpeVqZECqKqmtG/Jkpejdiq22DP+taqjbFVA2X8LJA1sTK7qNwTNlsZHzWXDZZKKW OXhkYET/TOPU+8Jz8jmDEvnxlvh431jqI8tUmGJFaHamZqJl6oCwtS8Oqxgn95CvoH53 3CGUpigxmGgsW2ySmUlBt3Dt3cn+3NE4/qDjK8TlMPfORERC5bchzyxarvPm8fi2mUXR 1PpUjjiUSJtoWO+N5u35kKvdaXoWda7aICvFpfd2OBJ6w49fnygXEiGh2DgLfN8vZs7k Jttqb5IFQcOVZ0X6CSKJ1HaqRQMuJEYPTbzNiTtpYdpWH3thlBUPo3am8arTCW1mELAd dNiw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id y185si634713wmg.0.2020.02.08.05.47.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Feb 2020 05:47:11 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48FD4H1dtRz1rW6N; Sat, 8 Feb 2020 14:47:11 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48FD4H1Vvvz1rVvc; Sat, 8 Feb 2020 14:47:11 +0100 (CET) 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 ygaaW3nBJYZP; Sat, 8 Feb 2020 14:47:10 +0100 (CET) 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; Sat, 8 Feb 2020 14:47:10 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id F3A0745403AC; Sat, 8 Feb 2020 14:47:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id qjmo5ZFVsNas; Sat, 8 Feb 2020 14:47:08 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:2001:a61:60cb:9d01:4102:a8ec:5d26:4c4b]) by babic.homelinux.org (Postfix) with ESMTP id F064145404F9; Sat, 8 Feb 2020 14:47:07 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 2/4] server_hawkbit: do not raise error in case of unrecognized option Date: Sat, 8 Feb 2020 14:47:03 +0100 Message-Id: <20200208134705.6547-2-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200208134705.6547-1-sbabic@denx.de> References: <20200208134705.6547-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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: , This allows to have a two-stage parsing of the command line parameters with general parameters parsed by the suricatta module. Each stage cannot raise an error because it is not responsible for all parameters, but just for a part of them. Signed-off-by: Stefano Babic --- suricatta/server_hawkbit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 55aa419..65edb8e 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1519,6 +1519,7 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) /* reset to optind=1 to parse suricatta's argument vector */ optind = 1; + opterr = 0; while ((choice = getopt_long(argc, argv, "t:i:c:u:p:xr:y::w:k:g:", long_options, NULL)) != -1) { switch (choice) { @@ -1595,9 +1596,9 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) channel_data_defaults.retry_sleep = (unsigned int)strtoul(optarg, NULL, 10); break; + /* Ignore not recognized options, they can be already parsed by the caller */ case '?': - default: - return SERVER_EINIT; + break; } } From patchwork Sat Feb 8 13:47:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1235280 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::240; helo=mail-lj1-x240.google.com; envelope-from=swupdate+bncbcxploxj6ikrbyxx7lyqkgqedsbdaea@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=kJkQ1U5M; dkim-atps=neutral Received: from mail-lj1-x240.google.com (mail-lj1-x240.google.com [IPv6:2a00:1450:4864:20::240]) (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 48FD4P4QD6z9sRK for ; Sun, 9 Feb 2020 00:47:17 +1100 (AEDT) Received: by mail-lj1-x240.google.com with SMTP id s25sf696555ljm.9 for ; Sat, 08 Feb 2020 05:47:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581169635; cv=pass; d=google.com; s=arc-20160816; b=XJnkYK8eyYBo5xXDghRVxA0uuQ5NuiowbscDzSaz/J36qMmqUG6QBi9LhWKSF30TeF 2DaCgpB/7CAiAyXb2ct/1YdxQGYXxP2vRiI/OA3xKri0DZk6jwOi22YcvRF0IclbyFdx RzM+yBH5L0tP12+TPKViYphvLZyFQxrKrlx+aKHUnsVeD13hzMoFGsop0tuov3V6URSO kfU3U7k5a91LWiXt2VQhbqXdm/nsBe76LeZqD95SoMQIEA0cctwpJ48ebi8pwL8GcZ6T raftbp5ZCfZa+Ovv5bfmABtCdOh6dtx+9Oo+h3cq2cieJ+1GsyfVapw2wrzeFP09013t XnHg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=xTRQq+gkMQn3ZyIH4ha2UCSDQDHQKoobUDE6mZk1Eos=; b=O9ZICaUFXFggXACKWTqUQXB1Tdoh/xh1csl/KolxSDyL3TiobIcsLTgeBWBbxc6x9/ O/XdiXjD217cSCRVLl27rrJmR5v1UAKroq5H5ZvE7QS/NgJtaqnm3gB2UT+2wEty5+6N WBE8x9dzLol+AQ54yLYyxQ5J6CbMQE0oKWZDa/L/MlNNtm2/Bk3oJbHxCheAh65Pfcyj 3RrM+r5iVq4VPmNpyyYgprqdRas6VUiqGoqrhqy4pOwXQqUz+So1my4VnVTX3SxA7Tv9 rkfM50d7HpRgNUNstPh73uIGq9Ub+Njs4d5g510f7Bql1e6zBU7/3HGur5cs2Zfd7wqw 3EWQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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:in-reply-to:references :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=xTRQq+gkMQn3ZyIH4ha2UCSDQDHQKoobUDE6mZk1Eos=; b=kJkQ1U5MJyMEMq6qE31yH3P9Ppl/L2L+xAsKN1saP9IUnE4omUkAY1REUhmzKvNgIZ 5jBkNckIiHXb+AFGoEYF5C8/CdscJECA1sMNy3rPNMj3WmMaNRhAI4URXtfEENOEEsPl fnJrpD9VQQIEnOqeUDQF0tbj9iO6jc7iIQwK/3PXSi4YhvfMETTEHIDvvzslq9Ca2Uou iKLXxpCr4GUifnlJVQg71jo8aOI+TWkUpnFAWzmZGVsToEbHeJgxUcxYU8+uRke2fD8x Ejqr7m6lOjJy8ZDYcrsGu0mIXZleeFpqlDm4lMz7VwV2icSVeln23dJU/dtlyCZkzw80 4XnQ== 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 :in-reply-to:references: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=xTRQq+gkMQn3ZyIH4ha2UCSDQDHQKoobUDE6mZk1Eos=; b=bkypA6EZxZeC8TsQ7xRL6DrqPZYtSu6KFs+QzhWf1scUfC+snSNNEySbr/zLzoqvM2 K3fZYFIBjpkKb7shYLnhqsSFPp/jp1of2fWslvjjKSYJFUrzAmg32z6KK53tFqQHCfKS 8KblVSL0FOpq6N0JE8la124CeVpkd+GebiEQn/dlITTQZER/mFtkoavYbZQSTxodbJgx rwBXuzNyEQaXedhx0JDoJP3PFkU0nQKk/+JEQU+0jDIjyWstx83NIWYrUKZCrUOiliEs i6eTJZypdDPDQ4TjmsNu7Dm1cjNn4sTG7yGxOBuhLglWXgp53ou7jGByzyJxWvBL9ajQ ztXQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAWiiUvgt/GLSDmDV5Y2gcTYkqJDzvF4Y9u3lVF/FMHmJzxpSaqa Smn9f/vaZKLDmKnsP2MnkKA= X-Google-Smtp-Source: APXvYqwhyvGEYLGdDhDjRZm+GLhQynW+gKk1o8ck5A3GzYI6/jDwSfXkWfuzokiCDpEfaDx6IWUdlQ== X-Received: by 2002:ac2:4214:: with SMTP id y20mr2049500lfh.214.1581169634845; Sat, 08 Feb 2020 05:47:14 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:8790:: with SMTP id n16ls408624lji.7.gmail; Sat, 08 Feb 2020 05:47:13 -0800 (PST) X-Received: by 2002:a2e:b4e7:: with SMTP id s7mr2866254ljm.58.1581169633877; Sat, 08 Feb 2020 05:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581169633; cv=none; d=google.com; s=arc-20160816; b=bYLOXkn/4DDrE0yj/8CfXcJ0WAovrvNPLTaSXgnTtJrnF86eQ/NDBKJdeGz7kZXCrI oWtbUTRjQajWTKxvEiuXEZ3/Yvz3BmY9R140RiTkxb9VfZH3x2ii4GNvD1bYi7OzeWHM FZRVdpKhzZtaK0/TZTiErR3NM8tu57fLdb24785J/cCUUrwyKRyww+Xux3/tgP68A5Od 4pf2TFfCG6KyuCO1oGm9zUWW7d3JJqqh6hSqeHf2+wwfdjVUSluH9JuiXMBr6ANMvyRp usy/NSVvaiFc9DaFVCZBz4ktqdpS/1yTRZFpcZy0e8/yrvhFMqsNufO6wgzK/faPblVo vkeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=r7vNZv5a4pey89usV53IkPwz26EpaPY5tYVIif49ZWc=; b=lxnb02YnrVWtVAMIVs4ZRJEK/8TYtMPW+3+QPicz2ZCZ65NhY1Qjkj3UTmObDOppPL xYHDNIhi14WxZkg/Rl7vQk9FVm6B6d0aBs/pTdq6NwV/G8nCIs6hC3caXZBOgtiYIXyH gyK/kwunWQxFr+pvJJHypqVWGTbEJSB6ubiz92N58chOQf1j+wNtgQSJwFAaYz8scU09 yXFIS4nsWfTOCffSuEYfvyw+Rn6mOgf/BtpW7oUqZjxiD0CV/wVNHgc80Z23jcxMAxkC ZNsi2CvCJC3HbsKDEIccXtAoEEKegwdN6K5LzFOtsR7AQ6EAnaxekH31n9c0axwL4fzV bskA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id h8si135649ljj.3.2020.02.08.05.47.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Feb 2020 05:47:13 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48FD4K2hVPz1qqkS; Sat, 8 Feb 2020 14:47:13 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48FD4K2VzMz1rVvc; Sat, 8 Feb 2020 14:47:13 +0100 (CET) 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 x7oFExV4bXHg; Sat, 8 Feb 2020 14:47:12 +0100 (CET) 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; Sat, 8 Feb 2020 14:47:12 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id E5C6345403AC; Sat, 8 Feb 2020 14:47:12 +0100 (CET) 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 8feeSU0uHy2X; Sat, 8 Feb 2020 14:47:10 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:2001:a61:60cb:9d01:4102:a8ec:5d26:4c4b]) by babic.homelinux.org (Postfix) with ESMTP id 16A684540514; Sat, 8 Feb 2020 14:47:08 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 3/4] suricatta: add enable / disable at startup Date: Sat, 8 Feb 2020 14:47:04 +0100 Message-Id: <20200208134705.6547-3-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200208134705.6547-1-sbabic@denx.de> References: <20200208134705.6547-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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: , For systems without a fixed network connection, it makes sense that the connection to a backend server is done on demand. Command line for suricatta can contain -e (enable, default) or -d (disable). If disabled, suricatta does not try to connect to the backend server when the polling timer elapses. Behavior can be changed at runtime without restarting SWUpdate via IPC. Signed-off-by: Stefano Babic --- suricatta/server_general.c | 1 - suricatta/server_hawkbit.c | 1 - suricatta/suricatta.c | 66 +++++++++++++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 3 deletions(-) diff --git a/suricatta/server_general.c b/suricatta/server_general.c index f20d433..87cc016 100644 --- a/suricatta/server_general.c +++ b/suricatta/server_general.c @@ -495,7 +495,6 @@ void server_print_help(void) { fprintf( stderr, - "\tsuricatta (server: general) arguments (mandatory arguments are marked with '*'):\n" "\t -u, --url * Host and port of the server instance, " "e.g., localhost:8080\n" "\t -p, --polldelay Delay in seconds between two hawkBit " diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 65edb8e..fc5d932 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1426,7 +1426,6 @@ void server_print_help(void) { fprintf( stderr, - "\tsuricatta arguments (mandatory arguments are marked with '*'):\n" "\t -t, --tenant * Set hawkBit tenant ID for this device.\n" "\t -u, --url * Host and port of the hawkBit instance, " "e.g., localhost:8080\n" diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c index 78c1783..cb7c799 100644 --- a/suricatta/suricatta.c +++ b/suricatta/suricatta.c @@ -13,18 +13,30 @@ #include #include #include +#include #include #include "pctl.h" #include "suricatta/suricatta.h" #include "suricatta/server.h" #include "suricatta_private.h" #include "parselib.h" +#include "swupdate_settings.h" #include static bool enable = true; +static struct option long_options[] = { + {"enable", no_argument, NULL, 'e'}, + {"disable", no_argument, NULL, 'd'}, + {NULL, 0, NULL, 0}}; void suricatta_print_help(void) { + fprintf( + stderr, + "\tsuricatta arguments (mandatory arguments are marked with '*'):\n" + "\t -e, --enable Daemon enabled at startup (default).\n" + "\t -d, --disable Daemon disabled at startup.\n" + ); server.help(); } @@ -88,6 +100,14 @@ static server_op_res_t suricatta_ipc(int fd, time_t *seconds) return result; } +static int suricatta_settings(void *elem, void __attribute__ ((__unused__)) *data) +{ + get_field(LIBCFG_PARSER, elem, "enable", + &enable); + + return 0; +} + int suricatta_wait(int seconds) { fd_set readfds; @@ -119,14 +139,58 @@ int start_suricatta(const char *cfgfname, int argc, char *argv[]) int action_id; sigset_t sigpipe_mask; sigset_t saved_mask; + int choice = 0; + char **serverargv; sigemptyset(&sigpipe_mask); sigaddset(&sigpipe_mask, SIGPIPE); sigprocmask(SIG_BLOCK, &sigpipe_mask, &saved_mask); - if (server.start(cfgfname, argc, argv) != SERVER_OK) { + /* + * Temporary copy the command line argument + * to pass unchanged to the server instance. + * getopt() will change them when called here + */ + serverargv = (char **)malloc(argc * sizeof(char **)); + if (!serverargv) { + ERROR("OOM starting suricatta, exiting !"); + exit(EXIT_FAILURE); + } + for (int i = 0; i < argc; i++) { + serverargv[i] = argv[i]; + } + + /* + * First check for common properties that do not depend + * from server implementation + */ + if (cfgfname) + read_module_settings(cfgfname, "suricatta", suricatta_settings, + NULL); + optind = 1; + opterr = 0; + + while ((choice = getopt_long(argc, argv, "de", + long_options, NULL)) != -1) { + switch (choice) { + case 'e': + enable = true; + break; + case 'd': + enable = false; + break; + case '?': + break; + } + } + + /* + * Now start a specific implementation of the server + */ + if (server.start(cfgfname, argc, serverargv) != SERVER_OK) { exit(EXIT_FAILURE); } + free(serverargv); TRACE("Server initialized, entering suricatta main loop."); while (true) { From patchwork Sat Feb 8 13:47:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1235281 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::43f; helo=mail-wr1-x43f.google.com; envelope-from=swupdate+bncbcxploxj6ikrbyxx7lyqkgqedsbdaea@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=jp9IeNXm; dkim-atps=neutral Received: from mail-wr1-x43f.google.com (mail-wr1-x43f.google.com [IPv6:2a00:1450:4864:20::43f]) (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 48FD4Q0x6dz9sRR for ; Sun, 9 Feb 2020 00:47:17 +1100 (AEDT) Received: by mail-wr1-x43f.google.com with SMTP id 90sf1451595wrq.6 for ; Sat, 08 Feb 2020 05:47:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581169635; cv=pass; d=google.com; s=arc-20160816; b=VAZxOnYSOfIitArKtO92aT6narDbaqvYdd+LQPFAVzvVySAdidRqWWQ6omMV8qGZQp 1U2jjyvsT9DX3tbvu2SLnLkQUCE6Undm+PYJTph5tRhyb66PJf0Cvfj4sh9Qcq7l7970 5PTxmY5NNKmrdNP1LBxlVJk9DMMedxSgy5tR0Qm2WiRpGKyx9aZrkSrazMwPwB2RtUXf UBj3qAs++vvIsEFizPwcTRm5ZqqvvSJarhmuv6yG+KwBSxL8dp+8d/uArpWJix8UtkXA ETYq6GYiw7DcUCyH1t7yvCjdxw2hbWVlIP2SayWmWwCj/c1KKrkDA9WpBgfdnAP0ZWmL aZVg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=fGBTn6wYPOwJvzlYEmH3GABeq0SvesJyF4gVqwPp6PA=; b=xcyUGO0C3FTjBJXlZB3dckSwFjAjCYt83Kz0HN4IEKqnw4JySAZ2Ekq1MNUzQZYGvG kALUQ60uWDoCkFBKPujvrboR2aIOa8q6A7xFzElN+DlUqial+Tqu+BIGzx1OLicuz6EV uNpXvhQUz4zjy6DqQw162uIFopE38M+RMfPAszDY2Q+YtksWsxqjbwS6/QrAAsrPHvme Al1EYhH+c06SZn+SW91elrKlvgHxegxBLG8tmgUNtBbFaT1tS92s5zZg3X67Y6FtpIQH B4dGCUnM30oTpoyo0N35HNVfYZrTr3QW0u6FYE7QjM4xEFjIacPMkV9CK5Rmec3HbIik XIvg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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:in-reply-to:references :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=fGBTn6wYPOwJvzlYEmH3GABeq0SvesJyF4gVqwPp6PA=; b=jp9IeNXm7WPICvqdHuva21tvivzQJOVnntl6SVS2FzUus7MypfgPWBnLTVsRDwjs+0 Rw781swUJMcEpQY2v6oYyljVMM2usyie4aiIH4tQHIDBdJzjM8KeTo6+TbFQN1gqsTJH Z3Ntwe41Z49Bu/8lIbfovEvgxlEOXy8Zctp+1XSIgtY0pf7iGPvs+pMPqv59uY0MqmYc j2C8WURYRh1576m7rP4GFTGorj4od9JoCIy39eu2L47UgqmUtaR1mCZtHSEHoBWo9GrS C05WyIH5DEprbzyMfGwYbkOZVRFOFzFiPsTSqwgcZTrM4hpIK2uj+Wmhh89bRF9/53Rz 5dBQ== 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 :in-reply-to:references: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=fGBTn6wYPOwJvzlYEmH3GABeq0SvesJyF4gVqwPp6PA=; b=pEqClMH05jRkqgqcUONYQrMLYEl5Cwe8JyfhJHiPvYhEOQFsYJ3t1UK0Gl/72A5xQG RDqp9a6YDtkGS5kNkcZaI1dCcKGG7NurFaGHX+aZNwZofD+K5OsNLzgjs7ztIDHPSLeR AphaKGjuw0XLq23jUs9yy7IIZ8PJHlx2Qi7AE4ODAIf/ViE4kbv7T+D/su8uyKbfZNRk UvuJWfZFleTFiVa0GHMUtasxHCdvAV0BvFYjX5fN3dYws1+wmPSwbeBjgFS/Uw0hXqAJ xjaD8oAP4SKjsat1UPcufme9juQ7bXueZ58RmewG/IeEvhYMs6PJmTvZh8zuKWtgD4ok N8Jw== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAVpxrWVdcp+TxwbMa4KEK6WHkJPEhIP39A3zcYeWsYLQHyEDGbg XOs/3lIQBOY4W3YxeCJBPqU= X-Google-Smtp-Source: APXvYqwCUM0KQJGGZjMFIxnGS7WS3c6ZJ6ly9mcjiDpWrYzWqEMS/1S4js7cgPjo+XRKMqy7Rqmzng== X-Received: by 2002:a1c:6645:: with SMTP id a66mr4749712wmc.121.1581169635125; Sat, 08 Feb 2020 05:47:15 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a7b:c4d0:: with SMTP id g16ls10246956wmk.2.canary-gmail; Sat, 08 Feb 2020 05:47:14 -0800 (PST) X-Received: by 2002:a1c:7f87:: with SMTP id a129mr4699210wmd.156.1581169634417; Sat, 08 Feb 2020 05:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581169634; cv=none; d=google.com; s=arc-20160816; b=wz6lJHA0O8B5X9Iu57lYKdqxlf8TBmJKCmEvlAZjxXLobGtdDE/jPt39bbXm6K9UhI 7CIOhbzzx/jXK0qaU9XQ2Dg9o2VUMdImdU9gCw0ZiEU7Sj0g88q8sXLha6sWzG+PJAxy aFRq2MFx2QqlX9se9kB2pttNFsCNtsZKHCn/y8emYydFo5Sx/tCrW6ICGf0e+FyAE0Ci fm3r0LSpljg9iY8kQ1hEJz2quOiJENvAXg5O872VDs8LP0UnrdzxJKvpSfGQ9ji0l2c7 qYmwx3lQDzula892keIc4OYXB93xbIOoapUpqJUahiqWfK0V3hm3ib/pX+Fg/RPR1nZV aMmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=tWhl8s+nscUWykJUYhodjMqu3/EW7gjtxqaeSUr91UE=; b=O83MDYnGwSMdqpB5PIu8Af7rYz9Dqni8hm0WPbI1M7CQ1+YEmdPU9L+Wh9QPiruedK 8hqnVYljue7HBJf4e+KmN/55FsWz+Qky4tDIwWOfV9Fox+y46IdVG9j/NJH/j1fNNRDr 3c5ny53kLwc+nFRrmRdGYFcnEiU42MLS4P0L1U9eQ9CPT7/db7L5BtmNUhIazcjbG4yX lm3fgYno3bvgT/4of429bfWWk+fNi/3LS5vt12e6XqktZL4gWiVfbR7DCZNeCoiEIxgZ nfJ50fUt2tjM/P8F+OkvP382YduPFr/3TbNPru8DzXZqcu6q5ksGXdagl7U1KNSWtETA QtLQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id i18si135280wrn.0.2020.02.08.05.47.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Feb 2020 05:47:14 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48FD4L1pYPz1qqkS; Sat, 8 Feb 2020 14:47:14 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48FD4L1XgZz1rVvc; Sat, 8 Feb 2020 14:47:14 +0100 (CET) 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 KlOJRNqyOuof; Sat, 8 Feb 2020 14:47:13 +0100 (CET) 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; Sat, 8 Feb 2020 14:47:13 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 63DC545404F9; Sat, 8 Feb 2020 14:47:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id dccsCkVrpiSR; Sat, 8 Feb 2020 14:47:11 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:2001:a61:60cb:9d01:4102:a8ec:5d26:4c4b]) by babic.homelinux.org (Postfix) with ESMTP id 410D44540636; Sat, 8 Feb 2020 14:47:08 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 4/4] examples: add enable attribute to suricatta section Date: Sat, 8 Feb 2020 14:47:05 +0100 Message-Id: <20200208134705.6547-4-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200208134705.6547-1-sbabic@denx.de> References: <20200208134705.6547-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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: , Reorder the attribute and fix/extend comments. Signed-off-by: Stefano Babic --- examples/configuration/swupdate.cfg | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/configuration/swupdate.cfg b/examples/configuration/swupdate.cfg index 8aa5062..6631436 100644 --- a/examples/configuration/swupdate.cfg +++ b/examples/configuration/swupdate.cfg @@ -104,7 +104,16 @@ identify : ( # retry : integer # number of retries to connect to server # retrywait : integer -# cafile : Certificate Authority certificate +# userid : integer +# userID for Webserver process +# groupid : integer +# groupId for Webserver process +# enable : bool +# default=true +# If set to false, suricatta do not try to connect to the server +# Enable can be done then via IPC +# cafile : string +# File with Public Certificate Authority # sslkey : string # path of the file containing the key for ssl connection # sslcert : string @@ -133,6 +142,7 @@ suricatta : loglevel = 10; userid = 1000; groupid = 1000; + enable = true; /* cafile = "/etc/ssl/cafile"; sslkey = "/etc/ssl/sslkey";