[Fwd: Re: seobject.py setransRecords.get_all method return values]
Quoted 15 lines · Stephen Smalley
Quoted 6 lines · Ted X Toth
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.
Quoted 7 lines
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
seobject.py renamed from seobject.py.orig +2 -1
@@ -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
Stephen Smalley
AppliedQuoted 35 lines · Ted X Toth
email message attachment (Re:
seobject.pysetransRecords.get_all method return values)Quoted 33 lines
-------- Forwarded Message --------
From: Xavier Toth <[email protected]>
To: Stephen Smalley <[email protected]>
Cc: Daniel J Walsh <[email protected]>, Karl MacMillan <[email protected]>
Subject: Re:seobject.pysetransRecords.get_all method return values
Date: Tue, 10 Apr 2007 09:01:19 -0500Quoted 15 lines · Stephen Smalley
Quoted 6 lines · Ted X Toth
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.
Quoted 7 lines
Do you want to submit a patch or are you making a RFE?
--
Stephen Smalley
National Security AgencyHere's a patch for the first versus last alias. I'm not sure yet about needing all of the aliases.
Just for future reference, please make patches that will apply with -p0 or -p1 from the top of the tree.
Thanks, applied as of policycoreutils 2.0.9.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.