[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xsm: return unlabeled instead of failing with ENOENT in get_page_sid



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1285176361 -3600
# Node ID 20f1390104457a6e6f0a2b879329bfb4b3a3a160
# Parent  db340d6e9b06c3b98d6d42a177f6ad2199bd1fd0
xsm: return unlabeled instead of failing with ENOENT in get_page_sid

It is better to return an unlabeled SID in the case where dsec is NULL
instead of bailing out with an error.

From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
---
 xen/xsm/flask/hooks.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff -r db340d6e9b06 -r 20f139010445 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Wed Sep 22 18:04:11 2010 +0100
+++ b/xen/xsm/flask/hooks.c     Wed Sep 22 18:26:01 2010 +0100
@@ -340,10 +340,7 @@ static int get_page_sid(struct page_info
         default:
             /*Pages are implicitly labeled by domain ownership!*/
             dsec = d->ssid;
-            if (dsec)
-                *sid = dsec->sid;
-            else
-                rc = -ENOENT;
+            *sid = dsec ? dsec->sid : SECINITSID_UNLABELED;
         break;
     }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.