Blame SPECS/mcstrans.spec

a5f30d
Summary: SELinux Translation Daemon
a5f30d
Name: mcstrans
e941f2
Version: 3.3
e941f2
Release: 1%{?dist}
a5f30d
License: GPL+
a5f30d
Url: https://github.com/SELinuxProject/selinux/wiki
e941f2
Source: https://github.com/SELinuxProject/selinux/releases/download/3.3/mcstrans-3.3.tar.gz
a5f30d
Source2: secolor.conf.8
e941f2
# fedora-selinux/selinux: git format-patch -N 3.3 -- mcstrans
a5f30d
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
a5f30d
# Patch list start
a5f30d
Patch0001: 0001-mcstrans-Fir-RESOURCE_LEAK-and-USE_AFTER_FREE-coveri.patch
a5f30d
Patch0002: 0002-mcstrans-Fix-USER_AFTER_FREE-problem.patch
a5f30d
Patch0003: 0003-mcstrans-Do-not-accept-incomplete-contexts.patch
a5f30d
Patch0004: 0004-mcstrans-fix-RESOURCE_LEAK-CWE-772.patch
a5f30d
# Patch list end
a5f30d
BuildRequires: gcc
a5f30d
BuildRequires: make
a5f30d
BuildRequires: libselinux-devel >= %{version}
a5f30d
BuildRequires: libcap-devel pcre-devel libsepol-devel libsepol-static
a5f30d
BuildRequires: systemd
a5f30d
Requires: pcre
a5f30d
%{?systemd_requires}
a5f30d
Provides: setransd
a5f30d
Provides: libsetrans
a5f30d
a5f30d
%description
a5f30d
Security-enhanced Linux is a feature of the Linux® kernel and a number
a5f30d
of utilities with enhanced security functionality designed to add
a5f30d
mandatory access controls to Linux.  The Security-enhanced Linux
a5f30d
kernel contains new architectural components originally developed to
a5f30d
improve the security of the Flask operating system. These
a5f30d
architectural components provide general support for the enforcement
a5f30d
of many kinds of mandatory access control policies, including those
a5f30d
based on the concepts of Type Enforcement®, Role-based Access
a5f30d
Control, and Multi-level Security.
a5f30d
a5f30d
mcstrans provides an translation daemon to translate SELinux categories 
a5f30d
from internal representations to user defined representation.
a5f30d
a5f30d
%prep
a5f30d
%autosetup -p 2 -n mcstrans-%{version}
a5f30d
a5f30d
%build
a5f30d
%set_build_flags
a5f30d
a5f30d
%make_build LIBDIR="%{_libdir}"
a5f30d
a5f30d
%install
a5f30d
rm -rf %{buildroot}
a5f30d
mkdir -p %{buildroot}/%{_lib}
a5f30d
mkdir -p %{buildroot}/%{_libdir}
a5f30d
mkdir -p %{buildroot}%{_usr}/share/mcstrans
a5f30d
mkdir -p %{buildroot}%{_sysconfdir}/selinux/mls/setrans.d
a5f30d
a5f30d
%make_install LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" SBINDIR="%{_sbindir}"
a5f30d
rm -f %{buildroot}%{_libdir}/*.a
a5f30d
cp -r share/* %{buildroot}%{_usr}/share/mcstrans/
a5f30d
# Systemd 
a5f30d
mkdir -p %{buildroot}%{_unitdir}
a5f30d
ln -s %{_unitdir}/mcstrans.service %{buildroot}/%{_unitdir}/mcstransd.service
a5f30d
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/mcstrans
a5f30d
install -m644 %{SOURCE2} %{buildroot}%{_mandir}/man8/
a5f30d
a5f30d
%post 
a5f30d
%systemd_post mcstransd.service
a5f30d
a5f30d
%preun
a5f30d
%systemd_preun mcstransd.service
a5f30d
a5f30d
%postun 
a5f30d
%systemd_postun mcstransd.service
a5f30d
a5f30d
%files
a5f30d
%{_mandir}/man8/mcs.8.gz
a5f30d
%{_mandir}/man8/mcstransd.8.gz
a5f30d
%{_mandir}/man5/setrans.conf.5.gz
a5f30d
%{_mandir}/ru/man8/mcs.8.gz
a5f30d
%{_mandir}/ru/man8/mcstransd.8.gz
a5f30d
%{_mandir}/ru/man5/setrans.conf.5.gz
a5f30d
%{_mandir}/man8/secolor.conf.8.gz
a5f30d
/usr/sbin/mcstransd
a5f30d
%{_unitdir}/mcstrans.service
a5f30d
%{_unitdir}/mcstransd.service
a5f30d
%dir %{_sysconfdir}/selinux/mls/setrans.d
a5f30d
a5f30d
%dir %{_usr}/share/mcstrans
a5f30d
a5f30d
%defattr(0644,root,root,0755)
a5f30d
%dir %{_usr}/share/mcstrans/util
a5f30d
%dir %{_usr}/share/mcstrans/examples
a5f30d
%{_usr}/share/mcstrans/examples/*
a5f30d
a5f30d
%defattr(0755,root,root,0755)
a5f30d
%{_usr}/share/mcstrans/util/*
a5f30d
a5f30d
%changelog
e941f2
* Fri Oct 22 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3-1
e941f2
- SELinux userspace 3.3 release
e941f2
e941f2
* Mon Oct 11 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3-0.rc3.1
e941f2
- SELinux userspace 3.3-rc3 release
e941f2
e941f2
* Wed Sep 29 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3-0.rc2.1
e941f2
- SELinux userspace 3.3-rc2 release
e941f2
a5f30d
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.2-4
a5f30d
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a5f30d
  Related: rhbz#1991688
a5f30d
a5f30d
* Thu Aug  5 2021 Petr Lautrbach <plautrba@redhat.com> - 3.2-3
a5f30d
- Fix RESOURCE_LEAK (CWE-772)
a5f30d
a5f30d
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.2-2
a5f30d
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a5f30d
a5f30d
* Tue Mar  9 2021 Petr Lautrbach <plautrba@redhat.com> - 3.2-1
a5f30d
- SELinux userspace 3.2 release
a5f30d
a5f30d
* Sun Feb  7 2021 Petr Lautrbach <plautrba@redhat.com> - 3.2-0.rc2.1
a5f30d
- SELinux userspace 3.2-rc2 release
a5f30d
a5f30d
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2-0.rc1.1.1
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a5f30d
a5f30d
* Fri Jan 22 2021 Petr Lautrbach <plautrba@redhat.com> - 3.2-0.rc1.1
a5f30d
- SELinux userspace 3.2-rc1 release
a5f30d
a5f30d
* Tue Jul 28 2020 Tom Stellard <tstellar@redhat.com> - 3.1-3
a5f30d
- Use make macros
a5f30d
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
a5f30d
a5f30d
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a5f30d
a5f30d
* Thu Jul 16 2020 Petr Lautrbach <plautrba@redhat.com> - 3.1-1
a5f30d
- SELinux userspace 3.1 release
a5f30d
a5f30d
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-2
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a5f30d
a5f30d
* Fri Dec  6 2019 Petr Lautrbach <plautrba@redhat.com> - 3.0-1
a5f30d
- SELinux userspace 3.0 release
a5f30d
a5f30d
* Mon Nov 11 2019 Petr Lautrbach <plautrba@redhat.com> - 3.0-0.rc1.1
a5f30d
- SELinux userspace 3.0-rc1 release candidate
a5f30d
a5f30d
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9-2
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a5f30d
a5f30d
* Tue Mar 19 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-1
a5f30d
- SELinux userspace 2.9 release
a5f30d
a5f30d
* Mon Mar 11 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-0.rc2.1
a5f30d
- SELinux userspace 2.9-rc2 release
a5f30d
a5f30d
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9-0.rc1.1.1
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a5f30d
a5f30d
* Wed Jan 30 2019 Petr Lautrbach <plautrba@redhat.com> - 2.9-0.rc1.1
a5f30d
- Update to mcstrans-2.9-rc1
a5f30d
a5f30d
* Tue Oct  2 2018 Petr Lautrbach <plautrba@redhat.com> - 2.8-1
a5f30d
- Update to mcstrans-2.8
a5f30d
a5f30d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-13
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a5f30d
a5f30d
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-12
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a5f30d
a5f30d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-11
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a5f30d
a5f30d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-10
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a5f30d
a5f30d
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-9
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a5f30d
a5f30d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-8
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a5f30d
a5f30d
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-7
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a5f30d
a5f30d
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-6
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a5f30d
a5f30d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-5
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a5f30d
a5f30d
* Wed Mar 19 2014 Karsten Hopp |karsten@redhat.com> - 0.3.4-4
a5f30d
- fix changelog order so that it builds with a recent rpm
a5f30d
a5f30d
* Wed Oct 16 2013 Dan Walsh <dwalsh@redhat.com> - 0.3.4-3
a5f30d
- Make mcstrans PIE and fully relro 
a5f30d
- Resolves: #983268
a5f30d
a5f30d
* Tue Oct 15 2013 Dan Walsh <dwalsh@redhat.com> - 0.3.4-2
a5f30d
- Add RELRO support for long running services
a5f30d
a5f30d
* Thu Sep 12 2013 Dan Walsh <dwalsh@redhat.com> - 0.3.4-1
a5f30d
- Update to latest version/applying patches
a5f30d
- Move binary to /usr/sbin rather then /sbin
a5f30d
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-8
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a5f30d
a5f30d
* Tue Mar 26 2013 Dan Walsh <dwalsh@redhat.com> - 0.3.3-7
a5f30d
- Add secolor.conf.5 man page
a5f30d
- Make mcstransd watch for content being written to /run/setrans for files names containing translations.
a5f30d
-- This will allow apps like libvirt to write content nameing randomly selected MCS labels
a5f30d
- Fix memory leak in mcstransd
a5f30d
a5f30d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-6
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a5f30d
a5f30d
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-5
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a5f30d
a5f30d
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 0.3.3-4
a5f30d
- Rebuild against PCRE 8.30
a5f30d
a5f30d
* Thu Feb 2 2012 Dan Walsh <dwalsh@redhat.com> - 0.3.3-3
a5f30d
- Fix the systemd service file
a5f30d
a5f30d
* Wed Feb 1 2012 Dan Walsh <dwalsh@redhat.com> - 0.3.3-2
a5f30d
- Update to upstream
a5f30d
- Write pid file
a5f30d
a5f30d
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-2
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a5f30d
a5f30d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-1
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a5f30d
a5f30d
* Wed Jan  5 2011 Ted X Toth <txtoth@gmail.com> - 0.3.2-0
a5f30d
- Add constraints
a5f30d
- Add setrans.conf man page
a5f30d
- Fix mixed raw and translated range bug
a5f30d
- Moved todo comments to TODO file
a5f30d
a5f30d
* Fri Oct 16 2009 Dan Walsh <dwalsh@redhat.com> 0.3.1-4
a5f30d
- Add mcstransd man page
a5f30d
a5f30d
* Thu Sep 17 2009 Miroslav Grepl <mgrepl@redhat.com> 0.3.1-3
a5f30d
- Fix init script
a5f30d
a5f30d
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
a5f30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a5f30d
a5f30d
* Thu Feb 5 2009 Joe Nall <joe@nall.com> 0.3.1-1
a5f30d
- Rewrite translations to allow individual word/category mapping
a5f30d
- Eamon Walsh's color mapping changes
a5f30d
a5f30d
* Wed May 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.2.11-2
a5f30d
- fix license tag
a5f30d
a5f30d
* Wed May 7 2008 Dan Walsh <dwalsh@redhat.com> 0.2.11-1
a5f30d
- More fixes from Jim Meyering
a5f30d
a5f30d
* Tue May 6 2008 Dan Walsh <dwalsh@redhat.com> 0.2.10-1
a5f30d
- More error checking on failed strdup
a5f30d
a5f30d
* Tue May 6 2008 Dan Walsh <dwalsh@redhat.com> 0.2.9-1
a5f30d
- Start mcstrans before netlabel
a5f30d
a5f30d
* Mon Apr 14 2008 Dan Walsh <dwalsh@redhat.com> 0.2.8-1
a5f30d
- Fix error handling
a5f30d
a5f30d
* Tue Feb 12 2008 Dan Walsh <dwalsh@redhat.com> 0.2.7-2
a5f30d
- Rebuild for gcc 4.3
a5f30d
a5f30d
* Tue Oct 30 2007 Steve Conklin <sconklin@redhat.com> - 0.2.7-1
a5f30d
- Folded current patches into tarball
a5f30d
a5f30d
* Thu Oct 25 2007 Steve Conklin <sconklin@redhat.com> - 0.2.6-3
a5f30d
- Fixed a compile problem with max_categories
a5f30d
a5f30d
* Thu Oct 25 2007 Steve Conklin <sconklin@redhat.com> - 0.2.6-2
a5f30d
- Fixed some init script errors
a5f30d
a5f30d
* Thu Sep 13 2007 Dan Walsh <dwalsh@redhat.com> 0.2.6-1
a5f30d
- Check for max_categories and error out
a5f30d
a5f30d
* Thu Mar 1 2007 Dan Walsh <dwalsh@redhat.com> 0.2.5-1
a5f30d
- Fix case where s0=""
a5f30d
a5f30d
* Mon Feb 26 2007 Dan Walsh <dwalsh@redhat.com> 0.2.4-1
a5f30d
- Translate range if fully specified correctly
a5f30d
a5f30d
* Mon Feb 12 2007 Dan Walsh <dwalsh@redhat.com> 0.2.3-1
a5f30d
- Additional fix to handle ssh root/sysadm_r/s0:c1,c2
a5f30d
Resolves: #224637
a5f30d
a5f30d
* Mon Feb 5 2007 Dan Walsh <dwalsh@redhat.com> 0.2.1-1
a5f30d
- Rewrite to handle MLS properly
a5f30d
Resolves: #225355
a5f30d
a5f30d
* Mon Jan 29 2007 Dan Walsh <dwalsh@redhat.com> 0.1.10-2
a5f30d
- Cleanup memory when complete
a5f30d
a5f30d
* Mon Dec 4 2006 Dan Walsh <dwalsh@redhat.com> 0.1.10-1
a5f30d
- Fix Memory Leak
a5f30d
Resolves: #218173
a5f30d
a5f30d
* Thu Sep 21 2006 Dan Walsh <dwalsh@redhat.com> 0.1.9-1
a5f30d
- Add -pie
a5f30d
- Fix compiler warnings
a5f30d
- Fix Memory Leak
a5f30d
Resolves: #218173
a5f30d
a5f30d
* Wed Sep 13 2006 Peter Jones <pjones@redhat.com> - 0.1.8-3
a5f30d
- Fix subsys locking in init script
a5f30d
a5f30d
* Wed Aug 23 2006 Dan Walsh <dwalsh@redhat.com> 0.1.8-1
a5f30d
- Only allow one version to run
a5f30d
a5f30d
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - sh: line 0: fg: no job control
a5f30d
- rebuild
a5f30d
a5f30d
* Mon Jun 19 2006 Dan Walsh <dwalsh@redhat.com> 0.1.7-1
a5f30d
- Apply sgrubb patch to only call getpeercon on translations
a5f30d
a5f30d
* Tue Jun 6 2006 Dan Walsh <dwalsh@redhat.com> 0.1.6-1
a5f30d
- Exit gracefully when selinux is not enabled
a5f30d
a5f30d
* Mon May 15 2006 Dan Walsh <dwalsh@redhat.com> 0.1.5-1
a5f30d
- Fix sighup handling
a5f30d
a5f30d
* Mon May 15 2006 Dan Walsh <dwalsh@redhat.com> 0.1.4-1
a5f30d
- Add patch from sgrubb
a5f30d
- 	Fix 64 bit size problems
a5f30d
- 	Increase the open file limit
a5f30d
-	Make sure maximum size is not exceeded
a5f30d
a5f30d
* Fri May 12 2006 Dan Walsh <dwalsh@redhat.com> 0.1.3-1
a5f30d
- Move initscripts to /etc/rc.d/init.d
a5f30d
a5f30d
* Thu May 11 2006 Dan Walsh <dwalsh@redhat.com> 0.1.2-1
a5f30d
- Drop Privs
a5f30d
a5f30d
* Mon May 8 2006 Dan Walsh <dwalsh@redhat.com> 0.1.1-1
a5f30d
- Initial Version
a5f30d
- This daemon reuses the code from libsetrans