From: <ssm...@us...> - 2007-04-12 15:48:58
|
Revision: 2338 http://svn.sourceforge.net/selinux/?rev=2338&view=rev Author: ssmalley Date: 2007-04-12 08:48:54 -0700 (Thu, 12 Apr 2007) Log Message: ----------- Author: "Xavier Toth" Email: tx...@gm... Subject: seobject.py setransRecords.get_all method return values Date: Tue, 10 Apr 2007 09:01:19 -0500 On 4/10/07, Stephen Smalley <sd...@ty...> wrote: > On Mon, 2007-04-09 at 14:08 -0500, Ted X Toth wrote: > > When you have aliases in your setrans.conf > > seobject.setransRecords().get_all returns a dictionary containing values > > with the last alias whereas the first alias is what I'd like (this is > > also what the os uses). Alternatively it could return an ordered list of > > all of the aliases as the dictionary values or maybe this would be a > > different method. > > Unless such a change would pose a problem for current users of > seobject.setransRecords().get_all, I'd be fine with changing it to > return the first alias, and possibly introduce another method if we need > to return all the aliases (to preserve interface compatibility). cc'd > Dan and Karl since they are likely to be more familiar with how this is > being used today by tools like system-config-selinux. > > Do you want to submit a patch or are you making a RFE? > > -- > Stephen Smalley > National Security Agency > > Here's a patch for the first versus last alias. I'm not sure yet about needing all of the aliases. Ted Modified Paths: -------------- trunk/policycoreutils/semanage/seobject.py Modified: trunk/policycoreutils/semanage/seobject.py =================================================================== --- trunk/policycoreutils/semanage/seobject.py 2007-04-10 19:13:48 UTC (rev 2337) +++ trunk/policycoreutils/semanage/seobject.py 2007-04-12 15:48:54 UTC (rev 2338) @@ -154,7 +154,8 @@ if len(i) != 2: self.comments.append(r) continue - self.ddict[i[0]] = i[1] + if self.ddict.has_key(i[0]) == 0: + self.ddict[i[0]] = i[1] def get_all(self): return self.ddict This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |