From patchwork Sat Apr 25 10:53:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Darbyshire-Bryant X-Patchwork-Id: 464487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0A46714007F for ; Sat, 25 Apr 2015 20:54:36 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 89CCC28BBE0; Sat, 25 Apr 2015 12:53:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 62F6E280329 for ; Sat, 25 Apr 2015 12:53:11 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 HELO_IP_IN_CL_SUBNET=-1.2 (check from: .darbyshire-bryant. - helo: .emea01-am1-obe.outbound.protection.outlook. - helo-domain: .outlook.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7.7 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0089.outbound.protection.outlook.com [157.56.112.89]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 25 Apr 2015 12:53:03 +0200 (CEST) Received: from HE1PR07MB0937.eurprd07.prod.outlook.com (25.162.27.143) by HE1PR07MB0794.eurprd07.prod.outlook.com (25.162.24.145) with Microsoft SMTP Server (TLS) id 15.1.136.25; Sat, 25 Apr 2015 10:54:01 +0000 Authentication-Results: lists.openwrt.org; dkim=none (message not signed) header.d=none; Received: from [IPv6:2001:470:183f:da2b::717c:e11c] (2001:470:183f:da2b::717c:e11c) by HE1PR07MB0937.eurprd07.prod.outlook.com (25.162.27.143) with Microsoft SMTP Server (TLS) id 15.1.148.16; Sat, 25 Apr 2015 10:53:59 +0000 Message-ID: <553B7237.6040408@darbyshire-bryant.me.uk> Date: Sat, 25 Apr 2015 11:53:43 +0100 From: Kevin Darbyshire-Bryant User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: References: <553B52FA.2080700@darbyshire-bryant.me.uk> <553B57A3.1080306@iki.fi> <553B6259.4090307@darbyshire-bryant.me.uk> In-Reply-To: <553B6259.4090307@darbyshire-bryant.me.uk> X-Originating-IP: [2001:470:183f:da2b::717c:e11c] X-ClientProxiedBy: DM2PR07CA0050.namprd07.prod.outlook.com (10.141.52.178) To HE1PR07MB0937.eurprd07.prod.outlook.com (25.162.27.143) X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0937; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0794; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(42186005)(46102003)(40100003)(80316001)(36756003)(568964001)(19580405001)(122386002)(512944002)(74482002)(5890100001)(19580395003)(110136001)(33656002)(450100001)(92566002)(2950100001)(59896002)(86362001)(575784001)(87976001)(107886001)(65806001)(2351001)(65956001)(77156002)(15975445007)(87266999)(76176999)(229853001)(50986999)(65816999)(54356999)(62966003)(3826002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB0937; H:[IPv6:2001:470:183f:da2b::717c:e11c]; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006)(3002001); SRVR:HE1PR07MB0937; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0937; X-Forefront-PRVS: 0557CBAD84 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2015 10:53:59.3142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0937 X-OriginatorOrg: darbyshire-bryant.me.uk Subject: [OpenWrt-Devel] [PATCH] [uci] luci-upnp Remove upnp service disable on upgrade X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Current behaviour on system upgrade is to disabled the 'upnpd' service on first boot. This was originally implemented in 2008 (https://github.com/openwrt/luci/commit/66fa0eb0e8e206d26e16615941c60b22b5004649) as a security feature. The 'auto disable' function only occurs on first boot after an upgrade and only if the luci-upnp package is installed. In all other cases auto disabling of 'upnpd/miniupnpd' service does not occur. This is inconsistent & confusing, not only in user interface/state handling but also in security. Either a) disable the service at first boot after upgrade in all cases b) Treat upnp like any other service on the router, leaving it in its configured state across upgrades, whether luci-upnp package is installed or not. c) Consider disabling all optional services across upgrade (transmission, samba, asterisk, etc...) The patch takes option b) and stops luci-upnp from disabling the service on first boot after an upgrade. Signed-off-by: Kevin Darbyshire-Bryant diff --git a/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp b/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp deleted file mode 100755 index fe22a3e..0000000 --- a/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -/etc/init.d/miniupnpd enabled && { - /etc/init.d/miniupnpd stop - /etc/init.d/miniupnpd disable -} - -rm -f /tmp/luci-indexcache -exit 0