WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xen/xsm/flask: Fix Flask MLS context gene

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen/xsm/flask: Fix Flask MLS context generation
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Aug 2009 07:05:29 -0700
Delivery-date: Tue, 25 Aug 2009 07:05:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251208687 -3600
# Node ID dc2aebb0e1d08b98a11d2e8a3bf7dc6435338e7f
# Parent  34c489308d45c72442703fec8f9956305c9e72c7
xen/xsm/flask:  Fix Flask MLS context generation

Signed-off-by:  Stephen D. Smalley <sds@xxxxxxxxxxxxx>
---
 xen/xsm/flask/ss/mls.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 34c489308d45 -r dc2aebb0e1d0 xen/xsm/flask/ss/mls.c
--- a/xen/xsm/flask/ss/mls.c    Tue Aug 25 14:57:45 2009 +0100
+++ b/xen/xsm/flask/ss/mls.c    Tue Aug 25 14:58:07 2009 +0100
@@ -105,7 +105,7 @@ void mls_sid_to_context(struct context *
     {
         memcpy(scontextp,
                 policydb.p_sens_val_to_name[context->range.level[l].sens - 1],
-                
strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]));
+                
strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1])+1);
         scontextp += strlen(scontextp);
 
         /* categories */
@@ -124,7 +124,7 @@ void mls_sid_to_context(struct context *
                     else
                         *scontextp++ = ',';
                     nm = policydb.p_cat_val_to_name[prev];
-                    memcpy(scontextp, nm, strlen(nm));
+                    memcpy(scontextp, nm, strlen(nm)+1);
                     scontextp += strlen(nm);
                 }
                 if ( prev < 0 )
@@ -132,7 +132,7 @@ void mls_sid_to_context(struct context *
                 else
                     *scontextp++ = ',';
                 nm = policydb.p_cat_val_to_name[i];
-                memcpy(scontextp, nm, strlen(nm));
+                memcpy(scontextp, nm, strlen(nm)+1);
                 scontextp += strlen(nm);
                 head = i;
             }
@@ -146,7 +146,7 @@ void mls_sid_to_context(struct context *
             else
                 *scontextp++ = ',';
             nm = policydb.p_cat_val_to_name[prev];
-            memcpy(scontextp, nm, strlen(nm));
+            memcpy(scontextp, nm, strlen(nm)+1);
             scontextp += strlen(nm);
         }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen/xsm/flask: Fix Flask MLS context generation, Xen patchbot-unstable <=