One more tweak of adding of user and group (#699713)

This commit is contained in:
Jiri Popelka 2011-09-09 17:16:12 +02:00
parent 34b6412f84
commit 0f0b1e4ee5

View File

@ -456,12 +456,20 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
%pre %pre
# /usr/share/doc/setup/uidgid # /usr/share/doc/setup/uidgid
getent group dhcpd >/dev/null || groupadd --gid 177 --system dhcpd if ! getent group dhcpd >/dev/null ; then
getent passwd dhcpd >/dev/null || \ if ! getent group 177 >/dev/null ; then
useradd --system \ groupadd --system --gid 177 dhcpd
--uid 177 --gid dhcpd \ else
--home /var/lib/dhcpd --shell /sbin/nologin \ groupadd --system dhcpd
--comment "DHCP server" dhcpd fi
fi
if ! getent passwd dhcpd >/dev/null ; then
if ! getent passwd 177 >/dev/null ; then
useradd --system --uid 177 --gid dhcpd --home / --shell /sbin/nologin --comment "DHCP server" dhcpd
else
useradd --system --gid dhcpd --home / --shell /sbin/nologin --comment "DHCP server" dhcpd
fi
fi
exit 0 exit 0
%post %post
@ -629,6 +637,7 @@ fi
%changelog %changelog
* Fri Sep 09 2011 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.2-6 * Fri Sep 09 2011 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.2-6
- PIE-RELRO.patch is not needed anymore, defining _hardened_build does the same - PIE-RELRO.patch is not needed anymore, defining _hardened_build does the same
- One more tweak of adding of user and group (#699713)
* Fri Sep 09 2011 Adam Tkac <atkac redhat com> - 12:4.2.2-5 * Fri Sep 09 2011 Adam Tkac <atkac redhat com> - 12:4.2.2-5
- rebuild against new bind - rebuild against new bind