summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-core
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2018-09-07 15:09:36 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-07 21:23:40 -0400
commit92aa5ba20b42551ab5d26db057dced01e72bf667 (patch)
tree1feca824e65c11a9c21ee0145eeacb6db340fa90 /meta-phosphor/recipes-core
parent50fad98b749604543914b7e5a54d443dbf6b0541 (diff)
downloadtalos-openbmc-92aa5ba20b42551ab5d26db057dced01e72bf667.tar.gz
talos-openbmc-92aa5ba20b42551ab5d26db057dced01e72bf667.zip
nsswitch: Add LDAP lookup in passwd, group and shadow maps
The Name Service Switch (NSS) configuration file (nsswitch.conf), is used by the GNU C Library to determine the sources from which to obtain name-service information in a range of categories, and in what order With the introduction of LDAP we have to add the LDAP as a source for the name service info for the various maps/database(passwd, group, shadow). (From meta-phosphor rev: 68f0934af8ebb0332e5075728d8006e4d846bd78) Change-Id: I0781da24c50278e439e953d595d275fbfc6bf48a Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-core')
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf20
-rw-r--r--meta-phosphor/recipes-core/base-files/base-files_%.bbappend10
2 files changed, 30 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf b/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf
new file mode 100644
index 000000000..78141f644
--- /dev/null
+++ b/meta-phosphor/recipes-core/base-files/base-files/nsswitch_ldap.conf
@@ -0,0 +1,20 @@
+# /etc/nsswitch.conf
+#
+# Example configuration of GNU Name Service Switch functionality.
+# If you have the `glibc-doc' and `info' packages installed, try:
+# `info libc "Name Service Switch"' for information about this file.
+
+passwd: files ldap
+group: files ldap
+shadow: files ldap
+
+hosts: files dns
+networks: files
+
+protocols: db files
+services: db files
+ethers: db files
+rpc: db files
+
+netgroup: nis
+
diff --git a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
index 5da4025f8..1dd38a40a 100644
--- a/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
+++ b/meta-phosphor/recipes-core/base-files/base-files_%.bbappend
@@ -1,7 +1,17 @@
FILESEXTRAPATHS_prepend_df-obmc-ubi-fs := "${THISDIR}/${PN}/df-ubi:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
RDEPENDS_${PN}_append_df-obmc-ubi-fs = " preinit-mounts"
+SRC_URI += " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'file://nsswitch_ldap.conf', '', d)}"
+
do_install_append() {
+
install -d ${D}/srv
+
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ldap', d)}" ]; then
+ install -D -m 600 ${WORKDIR}/nsswitch_ldap.conf ${D}/${sysconfdir}/
+ fi
}
OpenPOWER on IntegriCloud