From 88812d6821bc2d82da304232ddc1b631d025c6e7b7346b46ac21c86329f529f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 23 Mar 2016 10:08:13 +0000 Subject: [PATCH] - Require shadow and do not output the error out of useradd OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=99 --- vsftpd.changes | 5 +++++ vsftpd.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vsftpd.changes b/vsftpd.changes index d5f6c5a..dd87e43 100644 --- a/vsftpd.changes +++ b/vsftpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 23 10:07:55 UTC 2016 - tchvatal@suse.com + +- Require shadow and do not output the error out of useradd + ------------------------------------------------------------------- Tue Mar 22 14:27:27 UTC 2016 - tchvatal@suse.com diff --git a/vsftpd.spec b/vsftpd.spec index 68e5dae..b91fc26 100644 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -74,7 +74,7 @@ BuildRequires: libcap-devel BuildRequires: openssl-devel BuildRequires: pam-devel Requires: logrotate -Requires(pre): %{_sbindir}/useradd +Requires(pre): shadow Provides: ftp-server BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with_systemd} @@ -151,7 +151,7 @@ install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %pre -getent passwd ftpsecure >/dev/null || useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure 2> /dev/null +getent passwd ftpsecure >/dev/null || useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty %if %{with_systemd} %service_add_pre %{name}.service %{name}@.service %{name}.socket %endif