All of lore.kernel.org
 help / color / mirror / Atom feed
* This is the current libsepol-patch after the update.
@ 2011-05-03 13:43 Daniel J Walsh
  2011-05-03 13:50 ` Eric Paris
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Walsh @ 2011-05-03 13:43 UTC (permalink / raw)
  To: SELinux, Eric Paris, Steve Lawrence

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I will leave it to Eric to explain the patch.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3ABp0ACgkQrlYvE4MpobMVSACfVM7bandSo7Wgoy/KpTJX7PNQ
EQgAoJ0a8U3sZ6X/EeM1XmfM6DQN26+z
=meWO
-----END PGP SIGNATURE-----

[-- Attachment #2: libsepol-rhat.patch --]
[-- Type: text/plain, Size: 1600 bytes --]

diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c
index b1af365..42bc931 100644
--- a/libsepol/src/expand.c
+++ b/libsepol/src/expand.c
@@ -1181,23 +1181,26 @@ static int copy_role_trans(expand_state_t * state, role_trans_rule_t * rules)
 
 					cur_trans = state->out->role_tr;
 					while (cur_trans) {
+						unsigned int mapped_role;
+
+						mapped_role = state->rolemap[cur->new_role - 1];
+
 						if ((cur_trans->role ==
 								i + 1) &&
 						    (cur_trans->type ==
 								j + 1) &&
 						    (cur_trans->tclass ==
 								k + 1)) {
-							if (cur_trans->
-							    new_role ==
-								cur->new_role) {
+							if (cur_trans->new_role == mapped_role) {
 								break;
 							} else {
 								ERR(state->handle,
-									"Conflicting role trans rule %s %s : %s %s",
+									"Conflicting role trans rule %s %s : %s { %s vs %s }",
 									state->out->p_role_val_to_name[i],
 									state->out->p_type_val_to_name[j],
 									state->out->p_class_val_to_name[k],
-									state->out->p_role_val_to_name[cur->new_role - 1]);
+									state->out->p_role_val_to_name[mapped_role],
+									state->out->p_role_val_to_name[cur_trans->new_role - 1]);
 								return -1;
 							}
 						}
diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
index 6d8ff91..3d8dc80 100644
--- a/libsepol/src/policydb.c
+++ b/libsepol/src/policydb.c
@@ -2280,6 +2280,7 @@ int filename_trans_read(filename_trans_t **t, struct policy_file *fp)
 			lft->next = ft;
 		else
 			*t = ft;
+		lft = ft;
 		rc = next_entry(buf, fp, sizeof(uint32_t));
 		if (rc < 0)
 			return -1;

[-- Attachment #3: libsepol-rhat.patch.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: This is the current libsepol-patch after the update.
  2011-05-03 13:43 This is the current libsepol-patch after the update Daniel J Walsh
@ 2011-05-03 13:50 ` Eric Paris
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Paris @ 2011-05-03 13:50 UTC (permalink / raw)
  To: Daniel J Walsh; +Cc: SELinux, Steve Lawrence

On Tue, 2011-05-03 at 09:43 -0400, Daniel J Walsh wrote:
> I will leave it to Eric to explain the patch.

I'll send patches this afternoon with good changelogs and everything.

-Eric


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-03 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03 13:43 This is the current libsepol-patch after the update Daniel J Walsh
2011-05-03 13:50 ` Eric Paris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.