rpms/smolt/devel selinux.patch,NONE,1.1 smolt.spec,1.30,1.31
Michael Patrick McGrath (mmcgrath)
fedora-extras-commits at redhat.com
Fri Sep 28 15:56:00 UTC 2007
- Previous message (by thread): rpms/rpmlint/devel rpmlint.config,1.15,1.16 rpmlint.spec,1.39,1.40
- Next message (by thread): rpms/i810switch/devel dead.package, NONE, 1.1 .cvsignore, 1.3, NONE Makefile, 1.1, NONE i810switch-0.6.2.makefile.patch, 1.1, NONE i810switch-0.6.5-add-i945.patch, 1.1, NONE i810switch.spec, 1.10, NONE sources, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mmcgrath
Update of /cvs/extras/rpms/smolt/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv733
Modified Files:
smolt.spec
Added Files:
selinux.patch
Log Message:
Fixed selinux issue in #311181
selinux.patch:
--- NEW FILE selinux.patch ---
--- /tmp/smolt.py 2007-09-28 10:47:24.000000000 -0500
+++ client/smolt.py 2007-08-13 15:46:43.000000000 -0500
@@ -196,24 +196,18 @@
self.formfactor = hostInfo['system.formfactor']
except:
self.formfactor = 'Unknown'
-
try:
- import selinux
- try:
- if selinux.is_selinux_enabled() == 1:
- self.selinux_enabled = True
- else:
- self.selinux_enabled = False
- except:
- self.selinux_enabled = False
+ retcode = os.system('/usr/sbin/selinuxenabled')
+ self.selinux_enabled = os.WIFEXITED(recode) and os.WEXITCODE(retcode) == 0
+ except:
+ self.selinux_enabled = False
+ if self.selinux_enabled:
try:
- self.selinux_enforce = selinux.selinux_getpolicytype()[1]
+ self.selinux_enforce = os.popen('LANG=C /usr/sbin/getenforce').read().strip()
except:
- self.selinux_enforce = "Unknown"
- except ImportError:
- self.selinux_enabled = "Not installed"
- self.selinux_enforce = "Not Installed"
-
+ self.selinux_enforce = 'Disabled'
+ else:
+ self.selinux_enforce = 'Disabled'
def ignoreDevice(device):
ignore = 1
@@ -273,8 +267,8 @@
except:
raise SystemBusError, _('Could not bind to dbus. Is dbus running?')
+ mgr = self.dbus_get_interface(systemBus, 'org.freedesktop.Hal', '/org/freedesktop/Hal/Manager', 'org.freedesktop.Hal.Manager')
try:
- mgr = self.dbus_get_interface(systemBus, 'org.freedesktop.Hal', '/org/freedesktop/Hal/Manager', 'org.freedesktop.Hal.Manager')
all_dev_lst = mgr.GetAllDevices()
except:
raise SystemBusError, _('Could not connect to hal, is it running?'), _('Run "service haldaemon start" as root')
Index: smolt.spec
===================================================================
RCS file: /cvs/extras/rpms/smolt/devel/smolt.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- smolt.spec 28 Sep 2007 02:35:16 -0000 1.30
+++ smolt.spec 28 Sep 2007 15:55:27 -0000 1.31
@@ -1,7 +1,7 @@
Name: smolt
Summary: Fedora hardware profiler
Version: 0.9.8.4
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPL
Group: Applications/Internet
URL: http://hosted.fedoraproject.org/projects/smolt
@@ -12,6 +12,7 @@
Source: https://hosted.fedoraproject.org/projects/smolt/attachment/wiki/WikiStart/%{name}-%{version}.tar.gz
Patch0: firstboot.patch
Patch1: languages.patch
+Patch2: selinux.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -68,6 +69,7 @@
%setup -q
%patch0 -p0
%patch1 -p0
+%patch2 -p0
%build
cd client/
@@ -181,6 +183,9 @@
%{_bindir}/smoltGui
%changelog
+* Fri Sep 28 2007 Mike McGrath <mmcgrath at redhat.com> 0.9.8.4-7
+- Fixed Selinux
+
* Thu Sep 27 2007 Mike McGrath <mmcgrath at redhat.com> 0.9.8.4-6
- Added translations
- Previous message (by thread): rpms/rpmlint/devel rpmlint.config,1.15,1.16 rpmlint.spec,1.39,1.40
- Next message (by thread): rpms/i810switch/devel dead.package, NONE, 1.1 .cvsignore, 1.3, NONE Makefile, 1.1, NONE i810switch-0.6.2.makefile.patch, 1.1, NONE i810switch-0.6.5-add-i945.patch, 1.1, NONE i810switch.spec, 1.10, NONE sources, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list