Files
sablink-distro/app-admin/system-config-users/files/system-config-users-kill-rpm.patch
T
2010-04-11 17:55:29 +02:00

36 lines
1.6 KiB
Diff

diff -Nurp system-config-users-1.2.96.orig/src/mainWindow.py system-config-users-1.2.96/src/mainWindow.py
--- system-config-users-1.2.96.orig/src/mainWindow.py 2010-03-31 11:38:17.000000000 +0200
+++ system-config-users-1.2.96/src/mainWindow.py 2010-04-11 17:53:45.060057458 +0200
@@ -26,7 +26,6 @@ import gobject
import gtk.glade
import string
import os
-import rpm
import shutil
import libuser
@@ -652,9 +651,6 @@ class mainWindow:
dlg.run ()
dlg.destroy ()
return
- ts = rpm.TransactionSet ()
- if ts.dbMatch ("basenames", homeDir).count () > 0 or ts.dbMatch ("basenames", os.path.abspath (homeDir)).count () > 0 or ts.dbMatch ("basenames", os.path.realpath (homeDir)).count () > 0:
- errMsgs.append (_("- An installed software package contains this directory."))
if uid < 500 or (user == "nfsnobody" and (long (uid) == 65534L or long (uid) == 4294967294L)):
errMsgs.append (_("- A system user owns this directory and removing it may impair the system's integrity."))
if not os.access(homeDir, os.W_OK):
@@ -910,12 +906,7 @@ class mainWindow:
self.on_properties_activate()
def isSELinuxInstalled(self):
- ts = rpm.TransactionSet()
-
- mi = ts.dbMatch('name', 'policy-sources')
- if mi.count() > 0:
- return True
- return False
+ return os.path.lexists("/usr/sbin/getenforce") and os.access("/usr/sbin/getenforce", os.X_OK)
def isSELinuxEnabled(self):
if self.isSELinuxInstalled():