]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] selinux: Fix MLS compatibility off-by-one bug
authorRon Yorston <rmy@tigress.co.uk>
Wed, 19 Apr 2006 05:21:04 +0000 (22:21 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 24 Apr 2006 16:56:04 +0000 (09:56 -0700)
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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/selinux/ss/mls.c

index 640d0bfdbc6819e4ffa7845f1e10e92b5640e14a..84047f69f9c1b4d0bdfbbfe511457d6a62c18dad 100644 (file)
@@ -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;
        }