Skip to content

Commit

Permalink
[PATCH] selinux: Fix MLS compatibility off-by-one bug
Browse files Browse the repository at this point in the history
Fix an off-by-one error in the MLS compatibility code that was causing
contexts with a MLS suffix to be rejected, preventing sharing partitions
between FC4 and FC5.  Bug reported in

   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188068

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ron Yorston authored and Linus Torvalds committed Apr 19, 2006
1 parent dda27d1 commit ab5703b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/mls.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int mls_context_to_sid(char oldc,

if (!selinux_mls_enabled) {
if (def_sid != SECSID_NULL && oldc)
*scontext += strlen(*scontext);
*scontext += strlen(*scontext)+1;
return 0;
}

Expand Down

0 comments on commit ab5703b

Please sign in to comment.