From patchwork Thu Apr 3 10:53:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 336601 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 61772140086 for ; Thu, 3 Apr 2014 21:53:39 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 5ECC33FF14 for ; Thu, 3 Apr 2014 12:53:34 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail01.prevas.se (mail01.prevas.se [62.95.78.3]) by hugin.dotsrc.org (Postfix) with ESMTPS id 0725A3F82C for ; Thu, 3 Apr 2014 12:53:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=1342; q=dns/txt; s=ironport1; t=1396522411; x=1428058411; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=tDintR+KRZAuntr2+uPv/Q0LkrTg3SPXW8ye6Pr0CaI=; b=ztq4RjhT9F6M0fTRTya1ZxC8XlqEWvRDWrMZqoPme3rOVY1A6cSKR+OJ 03A73a3WWTaTAVjL9l4dTAtGUEDr3bd7PogiJHcYOqLyemZqlyT11Kykt mGu6chV85rHvbeTenex6wY+2IDK5NxVOXyIgcE047AFTmPydCF1bnCSV1 E=; X-IronPort-AV: E=Sophos;i="4.97,786,1389740400"; d="scan'208";a="4566612" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport1.prevas.se with ESMTP/TLS/AES128-SHA; 03 Apr 2014 12:53:30 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Thu, 3 Apr 2014 12:53:30 +0200 Received: by localhost (Postfix, from userid 30007) id 8E630681EEA; Thu, 3 Apr 2014 10:53:30 +0000 (UTC) From: To: Subject: [PATCH 5/5] vsftpd: Allow for setting FTP_HOME through USE flag Date: Thu, 3 Apr 2014 10:53:27 +0000 Message-ID: <0a1f9a456cea4834cb1c645732c46323012d62c6.1396522190.git.christian.braunersorensen@prevas.dk> X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen USE_ftp_home: Set to a dirname, to where the ftp has to be. Signed-off-by: Christian Sørensen --- recipes/vsftpd/files/passwd | 2 +- recipes/vsftpd/vsftpd.inc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/vsftpd/files/passwd b/recipes/vsftpd/files/passwd index 4ddc3c7..49aa493 100644 --- a/recipes/vsftpd/files/passwd +++ b/recipes/vsftpd/files/passwd @@ -1,2 +1,2 @@ -ftp:*:75:75::/home/ftp:/bin/false +ftp:*:75:75::PLACEHOLDER_FTP_HOME:/bin/false nobody:x:65534:65534:nobody:/nonexisting:/bin/sh diff --git a/recipes/vsftpd/vsftpd.inc b/recipes/vsftpd/vsftpd.inc index 8179e2e..b312422 100644 --- a/recipes/vsftpd/vsftpd.inc +++ b/recipes/vsftpd/vsftpd.inc @@ -54,6 +54,12 @@ do_install() { install -d ${D}${sysconfdir}/init.d/ install -m 755 ${SRCDIR}/init ${D}${sysconfdir}/init.d/vsftpd } +RECIPE_FLAGS += "ftp_home" +DEFAULT_USE_ftp_home = "/home/ftp" +do_install[postfuncs] += "do_install_set_ftp_home" +do_install_set_ftp_home() { + sed -i -e "s|PLACEHOLDER_FTP_HOME|${USE_ftp_home}|" ${D}${sysconfdir}/passwd.d/${PN}.1 +} RECIPE_FLAGS += "vsftpd_sysvinit_start vsftpd_sysvinit_stop" DEFAULT_USE_vsftpd_sysvinit_start = "20"