From patchwork Wed Jan 23 14:20:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Mandel X-Patchwork-Id: 1029977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::237; helo=mail-lj1-x237.google.com; envelope-from=swupdate+bncbcqo32h5t4cbbshquhrakgqefh6oyea@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=menlosystems.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="HhkLKPxO"; dkim-atps=neutral Received: from mail-lj1-x237.google.com (mail-lj1-x237.google.com [IPv6:2a00:1450:4864:20::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43l6s756Jjz9s7T for ; Thu, 24 Jan 2019 01:20:58 +1100 (AEDT) Received: by mail-lj1-x237.google.com with SMTP id t22-v6sf698384lji.14 for ; Wed, 23 Jan 2019 06:20:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1548253256; cv=pass; d=google.com; s=arc-20160816; b=Ihpwaz0nKUIFC1Pgq1TuxTMuPSpcoOTN5VLC593PCeKtorCN70GkS0QU0EH2b5NPoi ct0JF9rzdQhfw7R4VLPufkAJ8KfIss/RChGBb0CH98x+CQhy9xNbh5htOZRfonUpUam8 YuVHcj+us3o3a2YCEAnlMto+2YS4REkPhU5wmzjy9kwWxcYwg2XJMP/NuAaIJjZTE2rv 5qZEA97p4xUbSkowy0OQlM3D8LmnZsDJP2Rc3vO8cM1zvMErEr16NMVG4+Q8rOVpPokr OBK0DC+wwkId4cGYY1s7n2x41Lsb3zK08/5M4EiN9MyCuqalCSZ07CE2/+roE2+fzF/M Z9AQ== 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:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature; bh=PZnJuv3Sk76gQo6IIhT8CaednYRKyfYuiuWThUi0jws=; b=qEerBnYWRglHWF7NRB95mIezbJkcPfIFQLNIZ0j8RhLXkvt6Nep2iaQAjdp+b1tqpV MsWdSDQxZDbNMk4H4E0SlvzAjmUkYIACQbFkPAsTFyLS5vB9guVzjrTkUk1mlTKOCez0 po8dMZqDqdAo08xYUd2+roszE4teRduwRlK6iN5/U7MkpfiBUI6yWt1ert6GVSMCOpTt ZfEUJZ7ls3QCHmp2M7ciD0PxaWT9V3d+x4wZYVHo/jLYnWZElcKjk0P/n6QaER9J6CZH E66egBkoXqPBaUEa2l3me4Q963Qdpmfp77kjKPI6D9gZMh6p+N//22cckngi99XseKhq S4PA== 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 o.mandel@menlosystems.com) smtp.mailfrom=o.mandel@menlosystems.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=PZnJuv3Sk76gQo6IIhT8CaednYRKyfYuiuWThUi0jws=; b=HhkLKPxOoYKJM2akgC9WFklapuxMy4Ow26RnXtGV+gHFJsd4sMszCNEC/tQia/mYSJ zfEqpRaiVyAN3kAumSkyenZshqG4BoiP3HhJ3dlYaKoVoxvp7tas5VN6lm5UVw64lg2+ gEosPpxacw42vfZBoffeeiaOqZHHTPyM35EhkNypgESXIEWs0CXYNgn2qdKMk0gyiNNO CObvHUc6leD/VtMmaaKnDSvXJ1NwNm2PYgwWYYMH73NQbtY0Ch6Hzwqu2ncXBVsMAIAQ 96pMG9TYgYbYTnzeLc1Fv5dIh7gpfg9UwQVkvNeC03/hCS6ztCImG0hptRm5qFMKRU8j mQ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id: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=PZnJuv3Sk76gQo6IIhT8CaednYRKyfYuiuWThUi0jws=; b=hnWWyP/bXXmtLDvoMe8DP4gd0j0L6KPBth5kNrD4J5KJASB63tsatntH0wAauU9GJn fMpRI/GYRUlhre8ELiAd2IsEzSqdbtdxZAz57cms0E99rTsVP7wGFcVja+h27PsdxbHy q1/JajYOoLVQvPGgnN0+G6qRBdYoKChvRBF+AAzO4C/GFH3IC/VtCYWB68bgkIrjp2GE m4Q9CuYx6l5dcNWW7IJhlNuCF6SLxIwreWWsMX/2jrWhXMa9Pl+msKBy03juV3zLlEzD YS9S/6LtZq6YLo4Uc/5Gz/RmPS6IU0CXciwS2PQ3dSnwl4Sa9+ZB7dF7VQL3iBOFEK93 nKXg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJcUukexyp8ZDzy+vmCOGiruoMpYO8xf7WYFFSDnDWb/V1iEQ7mBapS7 ytcMR8WFcaNsge458bdy9lk= X-Google-Smtp-Source: ALg8bN7nv8uqWtzAZ2p+38qDd4Fdy9XqA3w/Dle51pOS6lrsXPTal6gRNHoDcgo5skeh6h70BhGLkQ== X-Received: by 2002:a2e:1291:: with SMTP id 17-v6mr16923ljs.0.1548253256311; Wed, 23 Jan 2019 06:20:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:3fc4:: with SMTP id m187ls264284lfa.1.gmail; Wed, 23 Jan 2019 06:20:55 -0800 (PST) X-Received: by 2002:a19:ee0f:: with SMTP id g15mr206407lfb.3.1548253255670; Wed, 23 Jan 2019 06:20:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548253255; cv=none; d=google.com; s=arc-20160816; b=iii1A1hrx2aPy/rLq0m6eH37Lh14WaJNeypeXz+ay4mf/MO0674kBfc7J+wva6FuDa MD3aj1Bjrateu9TCUHUiB5PC/ZP9fcb5kcR/iDSIYka5/l+SQS1LUc8cGbRUrrdX0o2n 5wpNuncSx3d0x1Z48soZz7eSaJgtmmklLcViMA3VaPqEvz4QbT2C0uHUCmIxX1jMUMlO M14oqiDctzd4h8R736azrEgHnwKKH2XHnhVlyt6mrf93iunIVdCRvLeySnYoKvqHNOfG sUa0lEGsIMMfTnH4kAfx9+GNGUG7F6WJexz/9qFeJmY8BfhP3FZ1INBf3HqHwlQnUu6g LPOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=AM0puY2Z5GF6lS7EFm6Da50lAOpyUEopbIUmUsK/muI=; b=AuuNQZ1SHP8jkTxOZn6Rqdsdi24jLMo2IuxgDQi4tI+k5E70XxIVg09h8Q5quWDX6x UfhONL4mdd9pTQQZAsaSMKJId+rLCPRJKJBa6BHI6fb7UxLvRU6nVR+BSIIiHIDdkcIY hybFpBdKsfXqWRzLPUKl/GDm+ZQe8SxTgkq+o6RScZPUcHwlrTXSlW9hUVRVRB9CxZCT stS2IEB/xaZmUx7o+UNXaHNVP1Dt40UsOymY9culi/enrKbWC75y6PxawlFRQTciiA89 AuffdBbk0ItYLxnS+H1yGSYu46GFsoA8hQoq8uoDdv+eVYF2bcRDx28ea8HWr0/1vlXQ yrbg== 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 o.mandel@menlosystems.com) smtp.mailfrom=o.mandel@menlosystems.com Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id q10-v6si120287lji.4.2019.01.23.06.20.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 06:20:55 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of o.mandel@menlosystems.com) 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 43l6s30Plsz1qvTX; Wed, 23 Jan 2019 15:20:55 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 43l6s30BSbz1qqlF; Wed, 23 Jan 2019 15:20:55 +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 Bu9swM4I9KuC; Wed, 23 Jan 2019 15:20:53 +0100 (CET) X-Auth-Info: zjgSfL1yrobplCHowQ72WH986Le0/0qyb0YIa42bKlUIqK43Ebmd2JwlwEkCzACK Received: from menlobldserver.menlosystems.local (host-141-40-253-35.customer.izb-online.de [141.40.253.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 23 Jan 2019 15:20:53 +0100 (CET) From: Olaf Mandel To: swupdate@googlegroups.com Cc: Stefano Babic , Olaf Mandel Subject: [swupdate] [meta-swupdate][PATCH] Move webpages to safer location Date: Wed, 23 Jan 2019 14:20:42 +0000 Message-Id: <20190123142042.11365-1-o.mandel@menlosystems.com> X-Mailer: git-send-email 2.11.0 X-Original-Sender: o.mandel@menlosystems.com 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 o.mandel@menlosystems.com) smtp.mailfrom=o.mandel@menlosystems.com 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: , Installing the document-root for the swupdate-www package in /www may be unsafe as e.g. lighttpd also installs files and symbolic links into this directory. So move the document root to /www/swupdate, which should be unique enough. Signed-off-by: Olaf Mandel --- recipes-support/swupdate/swupdate.inc | 8 ++++---- recipes-support/swupdate/swupdate/swupdate | 2 +- recipes-support/swupdate/swupdate/swupdate.service | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 5412952..558c79f 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/recipes-support/swupdate/swupdate.inc @@ -20,7 +20,7 @@ INSANE_SKIP_${PN} = "ldflags" PACKAGES =+ "${PN}-www ${PN}-lua" FILES_${PN}-lua += "${libdir}/lua/" -FILES_${PN}-www = "/www/*" +FILES_${PN}-www = "/www/swupdate/*" S = "${WORKDIR}/git/" @@ -116,11 +116,11 @@ do_install () { oe_runmake install - install -m 0755 -d ${D}/www + install -m 0755 -d ${D}/www/swupdate if [ -d ${S}/web-app ];then - cp -R --no-dereference --preserve=mode,links -v ${S}/examples/www/v2/* ${D}/www + cp -R --no-dereference --preserve=mode,links -v ${S}/examples/www/v2/* ${D}/www/swupdate else - install -m 0755 ${S}/www/* ${D}/www + install -m 0755 ${S}/www/* ${D}/www/swupdate fi install -d ${D}${sysconfdir}/init.d diff --git a/recipes-support/swupdate/swupdate/swupdate b/recipes-support/swupdate/swupdate/swupdate index d3debb2..a60bdd8 100644 --- a/recipes-support/swupdate/swupdate/swupdate +++ b/recipes-support/swupdate/swupdate/swupdate @@ -57,7 +57,7 @@ do_start() { *) echo "Starting $DESC ..." cd /home/root - exec $DAEMON -v -w "-r /www" $SWUPDATE_EXTRA_ARGS & + exec $DAEMON -v -w "-r /www/swupdate" $SWUPDATE_EXTRA_ARGS & exit 0 ;; esac diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service index 59f6c10..0ab0da9 100644 --- a/recipes-support/swupdate/swupdate/swupdate.service +++ b/recipes-support/swupdate/swupdate/swupdate.service @@ -6,7 +6,7 @@ Documentation=https://sbabic.github.io/swupdate [Service] ExecStartPre=-/usr/bin/swupdate-env EnvironmentFile=-/tmp/swupdate.env -ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS +ExecStart=/usr/bin/swupdate -v -w "-r /www/swupdate" $SWUPDATE_EXTRA_ARGS [Install] WantedBy=multi-user.target