From 9f727145af851ac2f673c004d6e5c45e55bf2879de8680c579e193adda46a877 Mon Sep 17 00:00:00 2001 From: Howard Guo Date: Mon, 20 Jun 2016 08:07:13 +0000 Subject: [PATCH] Accepting request 402943 from home:jubalh:branches:network:ldap OBS-URL: https://build.opensuse.org/request/show/402943 OBS-URL: https://build.opensuse.org/package/show/network:ldap/nss-pam-ldapd?expand=0&rev=5 --- nslcd-user-conf.dif | 15 --------------- nss-pam-ldapd.changes | 20 ++++++++++++++++++++ nss-pam-ldapd.spec | 11 ++++++++--- 3 files changed, 28 insertions(+), 18 deletions(-) delete mode 100644 nslcd-user-conf.dif diff --git a/nslcd-user-conf.dif b/nslcd-user-conf.dif deleted file mode 100644 index ebbfa07..0000000 --- a/nslcd-user-conf.dif +++ /dev/null @@ -1,15 +0,0 @@ -Index: nss-pam-ldapd-0.7.12/nslcd.conf -=================================================================== ---- nss-pam-ldapd-0.7.12.orig/nslcd.conf -+++ nss-pam-ldapd-0.7.12/nslcd.conf -@@ -5,8 +5,8 @@ - # See the manual page nslcd.conf(5) for more information. - - # The user and group nslcd should run as. --uid nslcd --gid nslcd -+#uid nslcd -+#gid nslcd - - # The uri pointing to the LDAP server to use for name lookups. - # Multiple entries may be specified. The address that is used diff --git a/nss-pam-ldapd.changes b/nss-pam-ldapd.changes index 1d8b066..7fa7163 100644 --- a/nss-pam-ldapd.changes +++ b/nss-pam-ldapd.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Jun 17 11:59:06 UTC 2016 - mvetter@suse.com + +- Explicityly disable nslcd-utils otherwise it will auto-enable them + if python is present. This can lead to different builds depending on + environment. And creation of files %{_datadir}/nslcd-utils/*.py? + %{_bindir}/chsh.ldap, %{_bindir}/getent.ldap + +------------------------------------------------------------------- +Thu Jun 16 10:46:01 UTC 2016 - mvetter@suse.com + +- Package all installed files + +------------------------------------------------------------------- +Thu Jun 16 09:17:21 UTC 2016 - mvetter@suse.com + +- Create user and group nslcd. +- Remove nslcd-user-conf.dif: + It shouldn't be run as root. + ------------------------------------------------------------------- Wed Jun 15 12:19:09 UTC 2016 - jengelh@inai.de diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec index b202522..1d8d337 100644 --- a/nss-pam-ldapd.spec +++ b/nss-pam-ldapd.spec @@ -29,6 +29,7 @@ License: LGPL-2.1+ Group: Productivity/Networking/LDAP/Clients Url: http://arthurdejong.org/nss-ldapd/ PreReq: /bin/chmod +PreReq: shadow Conflicts: nss_ldap pam_ldap Obsoletes: nss-ldapd < %{version}-%{release} Provides: nss-ldapd = %{version}-%{release} @@ -36,7 +37,6 @@ Source: nss-pam-ldapd-%{version}.tar.gz Source1: baselibs.conf Source2: nslcd.service Source100: nss-pam-ldapd-rpmlintrc -Patch0: nslcd-user-conf.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -53,14 +53,14 @@ connections, authentication, attribute translation, etc. %prep %setup -q -%patch0 -p1 %build %{?suse_update_config:%{suse_update_config -f}} autoreconf export CPPFLAGS="-I/usr/include/sasl" %configure --libdir=/%{_lib} \ - --with-pam-seclib-dir=/%{_lib}/security + --with-pam-seclib-dir=/%{_lib}/security \ + --disable-utils make %{?_smp_mflags} %install @@ -70,6 +70,11 @@ install -p -m644 %{S:2} $RPM_BUILD_ROOT/%{_unitdir}/ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcnslcd %pre +# creating groupd and user nslcd +%{_bindir}/getent group nslcd >/dev/null || %{_sbindir}/groupadd -r nslcd 2>/dev/null +%{_bindir}/getent passwd nslcd >/dev/null || \ + %{_sbindir}/useradd -r -g nslcd -d / -s /sbin/nologin \ + -c "nslcd ldap user" nslcd %service_add_pre nslcd.service %post