diff mbox

rpc-gssd: Make the path to the keytab configurable.

Message ID 1472066095-15650-1-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson Aug. 24, 2016, 7:14 p.m. UTC
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 <steved@redhat.com>
---
 .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

Comments

Steve Dickson Aug. 25, 2016, 11:45 a.m. UTC | #1
On 08/24/2016 03:14 PM, Steve Dickson wrote:
> 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 <steved@redhat.com>
Committed.... 

steved.
> ---
>  .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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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