source: projects/specs/branches/6/r/rpcbind/rpcbind-vl.spec @ 9829

Revision 9829, 8.5 KB checked in by iwamoto, 8 years ago (diff)

rpcbind: fix CVE-2015-7236

Line 
1%{!?_initddir:%define _initddir /etc/rc.d/init.d}
2
3Name:           rpcbind
4Version:        0.2.0
5Release:        6%{?_dist_release}
6Summary:        Universal Addresses to RPC Program Number Mapper
7Group:          System Environment/Daemons
8License:        GPL
9URL:            http://nfsv4.bullopensource.org
10
11BuildRoot:      %{_tmppath}/%{name}-%{version}-root
12Source0:        http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
13Source1: rpcbind.init
14
15Patch100: rpcbind-0.2.0-usage-fix.patch
16Patch200: rpcbind-0.2.0-CVE-2015-7236.patch
17
18Requires: glibc-common setup
19Conflicts: man-pages < 2.43-12
20BuildRequires: automake, autoconf, libtool
21BuildRequires: libtirpc-devel
22BuildRequires: quota
23BuildRequires: tcp_wrappers
24#BuildRequires: quota-devel
25#BuildRequires: tcp_wrappers-devel
26Requires(pre): /usr/sbin/groupadd  /usr/sbin/groupdel
27Requires(pre): /usr/sbin/useradd  /usr/sbin/userdel
28Requires(pre): coreutils
29Requires(post): /sbin/chkconfig
30Requires(post): /sbin/chkconfig
31
32#Provides: portmap = %{version}-%{release}
33Provides: portmap = 4.0-66%{_dist_release}
34Obsoletes: portmap <= 4.0-65.3
35
36Vendor: Project Vine
37Distribution: Vine Linux
38
39%description
40The rpcbind utility is a server that converts RPC program numbers into
41universal addresses.  It must be running on the host to be able to make
42RPC calls on a server on that machine.
43
44%prep
45%setup -q
46%patch100 -p1
47%patch200 -p1 -b .CVE-2015-7236
48
49%build
50%ifarch s390 s390x
51PIE="-fPIE"
52%else
53PIE="-fpie"
54%endif
55export PIE
56
57RPCBUSR=rpc
58RPCBDIR=/var/lib/rpcbind
59CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
60
61autoreconf -fisv
62%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
63    --enable-warmstarts \
64    --with-statedir="$RPCBDIR" \
65    --with-rpcuser="$RPCBUSR" \
66    --enable-libwrap \
67    --enable-debug
68
69make all
70
71
72%install
73rm -rf %{buildroot}
74mkdir -p %{buildroot}/sbin
75mkdir -p %{buildroot}/usr/sbin
76mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
77mkdir -p %{buildroot}%{_mandir}/man8
78mkdir -p %{buildroot}/var/lib/rpcbind
79
80install -m 755 src/rpcbind ${RPM_BUILD_ROOT}/sbin
81install -m 755 src/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
82install -m 644 man/rpcbind.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
83install -m 644 man/rpcinfo.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
84install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind
85
86%clean
87rm -rf %{buildroot}
88
89%pre
90
91# Check the validity of the rpc uid and gid.
92# If they don't exist, create them
93# If they exist but are the wrong value, remove them
94#   and recreate them with the correct value
95# If they exist and are the correct value do nothing
96rpcid=`getent passwd rpc | cut -d: -f 3`
97if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
98        /usr/sbin/userdel  rpc 2> /dev/null || :
99        /usr/sbin/groupdel rpc 2> /dev/null || :
100fi
101if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
102        /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
103        /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
104        -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
105fi
106%post
107/sbin/chkconfig --add %{name}
108
109%preun
110if [ $1 -eq 0 ]; then
111    service rpcbind stop > /dev/null 2>&1
112    /sbin/chkconfig --del %{name}
113        /usr/sbin/userdel  rpc 2>/dev/null || :
114        /usr/sbin/groupdel rpc 2>/dev/null || :
115        rm -rf /var/lib/rpcbind
116fi
117%postun
118if [ "$1" -ge "1" ]; then
119    service rpcbind condrestart > /dev/null 2>&1
120fi
121
122%files
123%defattr(-,root,root)
124%doc AUTHORS ChangeLog README
125/sbin/rpcbind
126%{_sbindir}/rpcinfo
127%{_mandir}/man8/*
128%config %{_initddir}/rpcbind
129
130%dir %attr(700,rpc,rpc) /var/lib/rpcbind
131
132%changelog
133* Sat Sep 26 2015 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 0.2.0-6
134- add patch200 for fix CVE-2015-7236
135- add Vendor/Distri tags
136
137* Sun Feb 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.0-5
138- Initial build for Vine Linux
139
140* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
141- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
142
143* Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
144- Requires(pre): coreutils for cut(1).
145
146* Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
147- Fixed pre scriptle failure during upgrades (bz 507364)
148- Corrected the usage info to match what the rpcbind man
149    page says. (bz 466332)
150- Correct package issues (bz 503508)
151
152* Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
153- Updated to latest upstream release: 0.2.0
154
155* Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
156- Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
157
158* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
159- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
160
161* Wed Nov 19 2008 Steve Dickson <steved@redhat.com>  0.1.7-1
162- Update to latest upstream release: 0.1.7
163
164* Tue Sep 30 2008 Steve Dickson <steved@redhat.com>  0.1.6-3
165- Fixed a typo in the rpcbind.init script that stop warm starts
166  from happening with conrestarts
167- Fixed scriptlet failure (bz 462533)
168
169* Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
170- Added usptream patches 01 thru 03 that do:
171    * Introduce helpers for ipprot/netid mapping
172    * Change how we decide on the netids to use for portmap
173    * Simplify port live check in pmap_svc.c
174
175* Wed Jul  9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
176- Updated to latest upstream release 0.1.6
177
178* Wed Jul  2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
179- Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
180
181* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
182- Removed the documentation about the non-existent
183  '-L' flag (bz 446915)
184
185* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
186- Set password and service lookups to be local (bz 447092)
187
188* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
189- rpcbind needs to downgrade to non-priviledgied group.
190
191* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
192- Updated to latest upstream release 0.1.5
193
194* Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
195- Fixed a warning in pmap_svc.c
196- Cleaned up warmstarts so uid are longer needed, also
197  changed condrestarts to use warmstarts. (bz 428496)
198
199* Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
200- Fixed connectivity with Mac OS clients by making sure handle_reply()
201  sets the correct fromlen in its recvfrom() call (bz 244492)
202
203* Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
204- Changed is_loopback() and check_access() see if the calling
205  address is an address on a local interface, just not a loopback
206  address (bz 358621).
207
208* Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
209- Reworked logic in initscript so the correct exit is
210  used when networking does not exist or is set up
211  incorrectly.
212
213* Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
214- Corrected a typo in the initscript from previous
215  commit.
216
217* Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
218- Fixed typo in Summary (bz 331811)
219- Corrected init script (bz 247046)
220
221* Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
222- Fixed typo in init script (bz 248285)
223- Added autoconf rules to turn on secure host checking
224  via libwrap. Also turned on host check by default (bz 248284)
225- Changed init script to start service in runlevel 2 (bz 251568)
226- Added a couple missing Requires(pre) (bz 247134)
227
228* Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
229- Fixed condrestarts (bz 241332)
230
231* Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
232- Fixed an ipv6 related segfault on startup (bz 240873)
233
234* Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
235- Added dependency on setup which contains the correct
236  rpcbind /etc/service entry which in turns stops
237  rpcbind from haning when NIS is enabled. (bz 236865)
238
239* Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
240- change man-pages requires into a conflicts as we don't have to have
241  man-pages installed, but if we do, we need the newer version
242
243* Fri Apr  6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
244- Fixed the Provides and Obsoletes statments to correctly
245  obsolete the portmap package.
246* Tue Apr  3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
247- Added dependency on glibc-common which allows the
248  rpcinfo command to be installed in the correct place.
249- Added dependency on man-pages so the rpcinfo man
250  pages don't conflict.
251- Added the creation of /var/lib/rpcbind which will be
252  used to store state files.
253- Make rpcbind run with the 'rpc' uid/gid when it exists.
254
255* Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
256- Initial commit
257- Spec reviewed (bz 228894)
258- Added the Provides/Obsoletes which should
259  cause rpcbind to replace portmapper
Note: See TracBrowser for help on using the repository browser.