From d30515b11bea3171b2ba0373f0eda132992538b7 Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Mon, 10 Nov 2014 12:24:05 -0500 Subject: nfs: Add '--with-nss-modules' configure option to specify nss modules From: Sami Wagiaalla I was having trouble setting up NFS on Atomic Host. It turns out there is an issue when rpcbind is trying to find the uid of the rpc user. OSTree based operating systems store user information for system users such as the rpc user in /usr/lib/passwd and leaves /etc/passwd for humans users. This is enabled by the use of the nss module nss-altfiles which allows one to specify additional files to be added the the passwd database. rpcbind however overrides the rule added to /etc/nsswitch.conf and removes "altfiles" from the list of modules by doing the following: __nss_configure_lookup("passwd", "files"); This was added in commit 77f7556878d1fe03dc ("[...]use __nss_configure_lookup() to restrict the [rpc user] lookup") to remove "nis" form the list of modules and prevent rpcbind from having a circular dependency on itself. In an OSTree based operating system however this prevents rpcbind from finding the rpc user and the service cannot start. This patch adds an option --with-nss-modules which allows one to specify the nss modules which should be searched for user information. The default setting is "files" which preserves the current behavior, but this enables one to add other modules to the search path. Signed-off-by: Sami Wagiaalla Signed-off-by: Steve Dickson --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 39181f0..5a88cc7 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,13 @@ AC_ARG_WITH([rpcuser], ,, [with_rpcuser=root]) AC_SUBST([rpcuser], [$with_rpcuser]) +AC_ARG_WITH([nss_modules], + AS_HELP_STRING([--with-nss-modules=NSS_MODULES] + , [Sets the nss module search list to the given space-delimited string. + For example --with-nss-modules="files altfiles" @<:@default=files@:>@]) + ,, [with_nss_modules=files]) +AC_SUBST([nss_modules], [$with_nss_modules]) + PKG_CHECK_MODULES([TIRPC], [libtirpc]) AS_IF([test x$enable_libwrap = xyes], [ -- cgit v1.2.1