From patchwork Thu Feb 20 07:07:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Kooi X-Patchwork-Id: 24971 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 86F8E2066E for ; Thu, 20 Feb 2014 07:07:52 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf3832463pab.11 for ; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=4PD3eo58dMCsiqeI64KkcIaHhtQNBAino+WURYDIiTg=; b=kUod4oWx/dREuI63usq3UkroYYdtFdovmjVAAYRh5jhmXsZEtXFm62PVnCSefJjxGX +IasSVk69R7abLTgftKL8uIUHSotT6dF+F0AMpEc0Iokoq+uEYei4FaOk/gVLvi74rHI LCMbkNAYq3E1wb3R1TKqppvm/7hie7dAOcNvE7ZcY4FUXb5ghO4IfjEp1gM9fHcBpPA/ +5ZK1Ep89prJDYEOsmCeLxTK3msfq54EZg3IcSXIY885rUMsbZU6k78yX1/UHV1Yiwgm EL45GlPk8r8nMgt7dzKW37XDCPgdx9ZcJltMIdwT9DB1jw9vXFFiX5zLh0VllS8rQFxz cSIQ== X-Gm-Message-State: ALoCoQkdBR5vKch+W38NyPtUO4e1GSJ5r3l8jvQBtvu98NKsvUf449C2p5R7+EAGM+sigLXGErs7 X-Received: by 10.66.122.69 with SMTP id lq5mr79995pab.17.1392880071710; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.72 with SMTP id e66ls403786qge.67.gmail; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-Received: by 10.52.68.106 with SMTP id v10mr56446vdt.59.1392880071554; Wed, 19 Feb 2014 23:07:51 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id yt16si1093892vcb.117.2014.02.19.23.07.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Feb 2014 23:07:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so1493315vcb.15 for ; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr121950vdb.8.1392880071468; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp34210vcz; Wed, 19 Feb 2014 23:07:51 -0800 (PST) X-Received: by 10.68.242.68 with SMTP id wo4mr340909pbc.32.1392880070653; Wed, 19 Feb 2014 23:07:50 -0800 (PST) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id iw5si2271525pac.324.2014.02.19.23.07.49 for ; Wed, 19 Feb 2014 23:07:50 -0800 (PST) Received-SPF: pass (google.com: domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 298416F1FA; Thu, 20 Feb 2014 07:07:37 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mail.openembedded.org (Postfix) with ESMTP id 376B16F1ED for ; Thu, 20 Feb 2014 07:07:26 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id k14so281611wgh.1 for ; Wed, 19 Feb 2014 23:07:27 -0800 (PST) X-Received: by 10.194.170.133 with SMTP id am5mr246519wjc.42.1392880046945; Wed, 19 Feb 2014 23:07:26 -0800 (PST) Received: from localhost ([2001:610:612:0:5e51:4fff:fec8:7c15]) by mx.google.com with ESMTPSA id ff7sm58841831wic.10.2014.02.19.23.07.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 23:07:26 -0800 (PST) From: Koen Kooi To: openembedded-core@lists.openembedded.org Date: Thu, 20 Feb 2014 08:07:22 +0100 Message-Id: <1392880042-22584-1-git-send-email-koen.kooi@linaro.org> X-Mailer: git-send-email 1.8.4.2 Cc: Koen Kooi , Koen Kooi Subject: [OE-core] [PATCHv2] openssh: enable PAM at runtime based on DISTRO_FEATURES X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: koen.kooi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Koen Kooi Everything is setup to use PAM except for the server config. If 'pam' is in DISTRO_FEATURES the configs will be changed to enable it. Syslog will now show: Feb 19 09:28:36 beast sshd[2980]: pam_unix(sshd:session): session opened for user koen by (uid=0) And more importantly: koen@beast:~$ loginctl SESSION UID USER SEAT c1 1000 koen seat0 c3 1000 koen seat0 c13 1000 koen 3 sessions listed. Systemd now registers the session properly so it won't kill things like 'screen' and 'tmux' when disconnecting the ssh session. Signed-off-by: Koen Kooi --- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb index 9c0bb48..b5e84d4 100644 --- a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb +++ b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb @@ -80,8 +80,8 @@ do_compile_append () { do_install_append () { if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -d ${D}${sysconfdir}/pam.d - install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd + install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd + sed -i -e 's:#UsePAM no:UsePAM yes:' ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config fi install -d ${D}${sysconfdir}/init.d