From patchwork Wed Aug 24 19:14:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 9298237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CD9A607EE for ; Wed, 24 Aug 2016 19:21:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EB0A290D6 for ; Wed, 24 Aug 2016 19:21:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12042290E3; Wed, 24 Aug 2016 19:21:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 108AC290D6 for ; Wed, 24 Aug 2016 19:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755452AbcHXTVl (ORCPT ); Wed, 24 Aug 2016 15:21:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755142AbcHXTVk (ORCPT ); Wed, 24 Aug 2016 15:21:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 377AAC0AA39D for ; Wed, 24 Aug 2016 19:14:57 +0000 (UTC) Received: from steved.boston.devel.redhat.com (vpn-58-14.rdu2.redhat.com [10.10.58.14]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7OJEu1A030419 for ; Wed, 24 Aug 2016 15:14:56 -0400 From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH] rpc-gssd: Make the path to the keytab configurable. Date: Wed, 24 Aug 2016 15:14:55 -0400 Message-Id: <1472066095-15650-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 24 Aug 2016 19:14:57 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Kerberos keytabs don't always live in the '/etc' directory. Allow --sysconfdir flag to define where the keytab directory is in rpc-gssd.service Signed-off-by: Steve Dickson --- .gitignore | 1 + configure.ac | 6 ++++++ systemd/rpc-gssd.service | 19 ------------------- systemd/rpc-gssd.service.in | 19 +++++++++++++++++++ 4 files changed, 26 insertions(+), 19 deletions(-) delete mode 100644 systemd/rpc-gssd.service create mode 100644 systemd/rpc-gssd.service.in diff --git a/.gitignore b/.gitignore index c247561..126d12c 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,7 @@ tests/nsm_client/nlm_sm_inter_xdr.c utils/nfsidmap/nfsidmap systemd/nfs-server-generator systemd/nfs-config.service +systemd/rpc-gssd.service # cscope database files cscope.* # generic editor backup et al diff --git a/configure.ac b/configure.ac index 4fb108f..d60f3a2 100644 --- a/configure.ac +++ b/configure.ac @@ -516,9 +516,15 @@ AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"]) AC_SUBST([_libexecdir]) AC_CONFIG_COMMANDS_PRE([eval eval _libexecdir=$libexecdir]) +# make _sysconfdir available for substituion in config files +# 2 "evals" needed late to expand variable names. +AC_SUBST([_sysconfdir]) +AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sysconfdir]) + AC_CONFIG_FILES([ Makefile systemd/nfs-config.service + systemd/rpc-gssd.service linux-nfs/Makefile support/Makefile support/export/Makefile diff --git a/systemd/rpc-gssd.service b/systemd/rpc-gssd.service deleted file mode 100644 index d4a3819..0000000 --- a/systemd/rpc-gssd.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=RPC security service for NFS client and server -DefaultDependencies=no -Conflicts=umount.target -Requires=var-lib-nfs-rpc_pipefs.mount -After=var-lib-nfs-rpc_pipefs.mount - -ConditionPathExists=/etc/krb5.keytab - -PartOf=nfs-utils.service - -Wants=nfs-config.service -After=nfs-config.service - -[Service] -EnvironmentFile=-/run/sysconfig/nfs-utils - -Type=forking -ExecStart=/usr/sbin/rpc.gssd $GSSDARGS diff --git a/systemd/rpc-gssd.service.in b/systemd/rpc-gssd.service.in new file mode 100644 index 0000000..1a7911c --- /dev/null +++ b/systemd/rpc-gssd.service.in @@ -0,0 +1,19 @@ +[Unit] +Description=RPC security service for NFS client and server +DefaultDependencies=no +Conflicts=umount.target +Requires=var-lib-nfs-rpc_pipefs.mount +After=var-lib-nfs-rpc_pipefs.mount + +ConditionPathExists=@_sysconfdir@/krb5.keytab + +PartOf=nfs-utils.service + +Wants=nfs-config.service +After=nfs-config.service + +[Service] +EnvironmentFile=-/run/sysconfig/nfs-utils + +Type=forking +ExecStart=/usr/sbin/rpc.gssd $GSSDARGS