Blame SPECS/xguest.spec

5bcfd1
Summary: Creates xguest user as a locked down user 
5bcfd1
Name: xguest
5bcfd1
Version: 1.0.10
639ce4
Release: 32%{?dist}
5bcfd1
License: GPLv2+
5bcfd1
Group: System Environment/Base
5bcfd1
BuildArch: noarch
5bcfd1
Source: http://people.fedoraproject.org/~dwalsh/xguest/%{name}-%{version}.tar.bz2
5bcfd1
URL: http://people.fedoraproject.org/~dwalsh/xguest/
5bcfd1
5bcfd1
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5bcfd1
Requires(pre): pam >= 0.99.8.1-17 selinux-policy-targeted > 3.6.3-12
5bcfd1
Requires(pre): policycoreutils-sandbox
5bcfd1
5bcfd1
%description
5bcfd1
Installing this package sets up the xguest user to be used as a temporary
5bcfd1
account to switch to or as a kiosk user account. The account is disabled unless
5bcfd1
SELinux is in enforcing mode. The user is only allowed to log in via graphical login program.
5bcfd1
The home and temporary directories of the user will be polyinstantiated and
5bcfd1
mounted on tmpfs.
5bcfd1
5bcfd1
%prep
5bcfd1
%setup -q
5bcfd1
5bcfd1
%build
5bcfd1
5bcfd1
%clean
5bcfd1
%{__rm} -fR %{buildroot}
5bcfd1
5bcfd1
%install
5bcfd1
%{__rm} -fR %{buildroot}
5bcfd1
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/security/namespace.d/
5bcfd1
%{__mkdir} -p %{buildroot}/var/lib/xguest/home
5bcfd1
install -m0644 xguest.conf %{buildroot}/%{_sysconfdir}/security/namespace.d/
5bcfd1
5bcfd1
%post
5bcfd1
if [ $1 -eq 1 ]; then
5bcfd1
semanage user -a  -S targeted -P xguest -R xguest_r xguest_u  2> /dev/null  || :
5bcfd1
(useradd -c "Guest" -Z xguest_u -d /var/lib/xguest/home/xguest xguest || semanage login -a -S targeted -s xguest_u xguest || semanage login -m -S targeted -s xguest_u xguest) 2>/dev/null || exit 1
5bcfd1
head -1 /dev/urandom | passwd xguest --stdin > /dev/null
5bcfd1
5bcfd1
echo "xguest:exclusive" >> /etc/security/sepermit.conf
5bcfd1
5bcfd1
semanage -S targeted -i - << _EOF
5bcfd1
boolean -m --on allow_polyinstantiation 
5bcfd1
boolean -m --on xguest_connect_network
5bcfd1
boolean -m --on xguest_mount_media
5bcfd1
boolean -m --on xguest_use_bluetooth
5bcfd1
_EOF
5bcfd1
fi
5bcfd1
5bcfd1
%files
5bcfd1
%defattr(-,root,root)
5bcfd1
%{_sysconfdir}/security/namespace.d/xguest.conf
5bcfd1
%doc README LICENSE
5bcfd1
%dir /var/lib/xguest/home
5bcfd1
%dir /var/lib/xguest
5bcfd1
5bcfd1
%preun
5bcfd1
if [ $1 -eq 0 ]; then
5bcfd1
sed -i '/^xguest/d' /etc/security/sepermit.conf
5bcfd1
5bcfd1
fi
5bcfd1
5bcfd1
%triggerpostun -- xguest < 1.0.10-31
5bcfd1
head -1 /dev/urandom | passwd xguest --stdin >/dev/null
5bcfd1
exit 0
5bcfd1
5bcfd1
%changelog
639ce4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.10-32
639ce4
- Mass rebuild 2013-12-27
639ce4
5bcfd1
* Mon Sep 2 2013 Dan Walsh <dwalsh@redhat.com> - 1.0.10-32
5bcfd1
- remove excess noice from post install scripts
5bcfd1
5bcfd1
* Thu Aug 29 2013 Dan Walsh <dwalsh@redhat.com> - 1.0.10-31
5bcfd1
- Fix to add random password on upgrade
5bcfd1
5bcfd1
* Mon Aug 26 2013 Dan Walsh <dwalsh@redhat.com> - 1.0.10-30
5bcfd1
- Add random password so xguest will show up in gdm.
5bcfd1
5bcfd1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-29
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5bcfd1
5bcfd1
* Mon May 13 2013 Dan Walsh <dwalsh@redhat.com> - 1.0.10-28
5bcfd1
- Remove sabayon support from xguest, no longer supported.
5bcfd1
- Remove /etc/skel directories
5bcfd1
5bcfd1
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-7
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5bcfd1
5bcfd1
* Mon Jan 14 2013 Dan Walsh <dwalsh@redhat.com> - 1.0.10-26
5bcfd1
- Remove /etc/security/namespace.d from payload 
5bcfd1
5bcfd1
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-5
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5bcfd1
5bcfd1
* Mon Jul 2 2012 Dan Walsh <dwalsh@redhat.com> - 1.0.10-4
5bcfd1
- Remove Requirement for gdm
5bcfd1
- Fix xguest entry in /etc/shadow so gdm lists it
5bcfd1
5bcfd1
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-3
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5bcfd1
5bcfd1
* Wed Dec 7 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.10-2
5bcfd1
- Change xguest homedir to be /var/lib/xguest/home/xguest
5bcfd1
5bcfd1
* Fri Sep 23 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.10-1
5bcfd1
- Make sure none of the gpk apps start on the desktop
5bcfd1
5bcfd1
* Tue Aug 2 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.9-6
5bcfd1
- Change location of xguest home dir to /var/lib/xguest/home
5bcfd1
5bcfd1
* Wed Jun 15 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.9-5
5bcfd1
- Add requires for selinux-policy-targeted
5bcfd1
5bcfd1
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-4
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5bcfd1
5bcfd1
* Tue Feb 1 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.9-3
5bcfd1
- Fix boolean handling in the post install
5bcfd1
5bcfd1
* Wed Jan 5 2011 Dan Walsh <dwalsh@redhat.com> - 1.0.9-2
5bcfd1
- Fix semanage boolean line to use -i -
5bcfd1
5bcfd1
* Wed Oct 6 2010 Dan Walsh <dwalsh@redhat.com> - 1.0.9-1
5bcfd1
- Fix placement of xguest.zip file
5bcfd1
5bcfd1
* Tue Feb 9 2010 Dan Walsh <dwalsh@redhat.com> - 1.0.8-3
5bcfd1
- Fix sabayon remove
5bcfd1
5bcfd1
* Mon Jan 25 2010 Dan Walsh <dwalsh@redhat.com> - 1.0.8-2
5bcfd1
- Fix sabayon installation
5bcfd1
5bcfd1
* Wed Nov 25 2009 Dan Walsh <dwalsh@redhat.com> - 1.0.8-1
5bcfd1
- Fix sabayon file
5bcfd1
5bcfd1
* Wed Aug 26 2009 Dan Walsh <dwalsh@redhat.com> - 1.0.7-7
5bcfd1
- Switch to use policycoreutils-sandbox init script
5bcfd1
5bcfd1
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-6
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5bcfd1
5bcfd1
* Tue Jun 23 2009 Dan Walsh <dwalsh@redhat.com> - 1.0.7-5
5bcfd1
- Changed to require policycoreutils-python
5bcfd1
5bcfd1
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-3
5bcfd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5bcfd1
5bcfd1
* Fri Jan 30 2009 Dan Walsh <dwalsh@redhat.com> - 1.0.7-1
5bcfd1
- Change xguest init script to have proper summary
5bcfd1
5bcfd1
* Thu Jan 22 2009 Dan Walsh <dwalsh@redhat.com> - 1.0.6-8
5bcfd1
- Modify xguest to be able to be installed in a livecd
5bcfd1
5bcfd1
* Fri Apr 4 2008 Dan Walsh <dwalsh@redhat.com> - 1.0.6-7
5bcfd1
- Require newer version of policy
5bcfd1
5bcfd1
* Wed Mar 19 2008 Dan Walsh <dwalsh@redhat.com> - 1.0.6-6
5bcfd1
- Change gecos field to say "Guest"
5bcfd1
5bcfd1
* Wed Feb 27 2008 Dan Walsh <dwalsh@redhat.com> - 1.0.6-5
5bcfd1
- Leave xguest_u assignment on preun and always set the user to xguest_u on install
5bcfd1
5bcfd1
* Mon Feb 11 2008 Florian La Roche <laroche@redhat.com> - 1.0.6-4
5bcfd1
- fix post requires on pam
5bcfd1
5bcfd1
* Thu Jan 31 2008 Dan Walsh <dwalsh@redhat.com> - 1.0.6-3
5bcfd1
- Add support for exclusive login for xguest
5bcfd1
5bcfd1
* Tue Dec 18 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.6-2
5bcfd1
- Remove lines from namespace.init on package removal
5bcfd1
5bcfd1
* Mon Dec 17 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.6-1
5bcfd1
- Remove xguest init.d script on uninstall
5bcfd1
- Fix description
5bcfd1
5bcfd1
5bcfd1
* Fri Dec 7 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.5-2
5bcfd1
- Turn on the xguest booleans
5bcfd1
5bcfd1
* Fri Dec 7 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.5-1
5bcfd1
- Allow xguest to run nm-applet
5bcfd1
5bcfd1
* Tue Nov 27 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.4-2
5bcfd1
- Fix permissions on /etc/init.d/xguest
5bcfd1
5bcfd1
* Wed Nov 21 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.4-1
5bcfd1
- Add mount code to allow sharing of file system so hal and automount will work.
5bcfd1
- I have added an initscript to set the / as shared and /tmp, /var/tmp and /home/xguest as private
5bcfd1
5bcfd1
* Fri Oct 26 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.3-1
5bcfd1
- Remove exit lines
5bcfd1
- Add LICENSE
5bcfd1
5bcfd1
* Mon Oct 22 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.2-1
5bcfd1
- Cleanup spec file
5bcfd1
5bcfd1
* Mon Oct 22 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.1-2
5bcfd1
- Turn on allow_polyinstantiation boolean
5bcfd1
5bcfd1
* Fri Oct 12 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.1-1
5bcfd1
- Add sabayon support
5bcfd1
5bcfd1
* Thu Sep 13 2007 Dan Walsh <dwalsh@redhat.com> - 1.0.0-1
5bcfd1
- Initial version