Skip to contentSkip to conversation

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

PATCH In review Steve Dickson 1 participant 2 messages Aug 24, 2016 – Aug 25, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpc-gssd: Make the path to the keytab configurable.

Kerberos keytabs don't always live in the '/etc' directory. Allow --sysconfdir flag to define where the keytab directory is in rpc-gssd.service

---
 .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
.gitignore +1 -0
index c247561..126d12c 100644
@@ -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
configure.ac +6 -0
index 4fb108f..d60f3a2 100644
@@ -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
systemd/rpc-gssd.service deleted +0 -19
deleted file mode 100644
index d4a3819..0000000
@@ -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
systemd/rpc-gssd.service.in new file +19 -0
new file mode 100644
index 0000000..1a7911c
@@ -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
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Steve Dickson

Kerberos keytabs don't always live in the '/etc' directory. Allow --sysconfdir flag to define where the keytab directory is in rpc-gssd.service

Committed....

steved.

Quoted 92 lines
---
 .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
.gitignore +1 -0
index c247561..126d12c 100644
@@ -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
configure.ac +6 -0
index 4fb108f..d60f3a2 100644
@@ -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
systemd/rpc-gssd.service deleted +0 -19
deleted file mode 100644
index d4a3819..0000000
@@ -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
systemd/rpc-gssd.service.in new file +19 -0
new file mode 100644
index 0000000..1a7911c
@@ -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