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..023732d 100644 --- a/nss-pam-ldapd.changes +++ b/nss-pam-ldapd.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Jun 21 12:20:20 UTC 2016 - jengelh@inai.de + +- Do not suppress errors from useradd/groupadd. + Reduce dependencies for it. + +------------------------------------------------------------------- +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..51e81f4 100644 --- a/nss-pam-ldapd.spec +++ b/nss-pam-ldapd.spec @@ -1,7 +1,7 @@ # # spec file for package nss-pam-ldapd # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,7 +28,7 @@ Summary: NSS module and daemon for using LDAP as a naming service License: LGPL-2.1+ Group: Productivity/Networking/LDAP/Clients Url: http://arthurdejong.org/nss-ldapd/ -PreReq: /bin/chmod +Requires(pre): shadow Conflicts: nss_ldap pam_ldap Obsoletes: nss-ldapd < %{version}-%{release} Provides: nss-ldapd = %{version}-%{release} @@ -36,7 +36,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 +52,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 +69,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 +%{_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