Re: chcat fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/20/2009 04:05 PM, Chad Sellers wrote:
On 5/20/09 3:00 PM, "Daniel J Walsh"<dwalsh@xxxxxxxxxx>  wrote:

Expansion of categores is still broken.  Here is a patch to fix.

This message appears to be missing a patch.

Thanks,
Chad


--- nsapolicycoreutils/scripts/chcat	2009-01-13 08:45:35.000000000 -0500
+++ policycoreutils-2.0.62/scripts/chcat	2009-05-04 13:40:26.000000000 -0400
@@ -281,14 +281,14 @@
 def expandCats(cats):
     newcats = []
     for c in cats:
-        if c.find(".") != -1:
-            c = c.split(".")
-            for i in range(int(c[0][1:]), int(c[1][1:]) + 1):
-                x = ("c%d" % i)
-                if x not in newcats:
-                    newcats.append("c%d" % i)
-        else:
-            for i in c.split(","):
+        for i in c.split(","):
+            if i.find(".") != -1:
+                j = i.split(".")
+                for k in range(int(j[0][1:]), int(j[1][1:]) + 1):
+                    x = ("c%d" % k)
+                    if x not in newcats:
+                        newcats.append(x)
+            else:
                 if i not in newcats:
                     newcats.append(i)
     if len(newcats) > 25:

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux