debuggers.hg

changeset 22253:20f139010445

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@tycho.nsa.gov>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Sep 22 18:26:01 2010 +0100 (2010-09-22)
parents db340d6e9b06
children e20ee3a57645
files xen/xsm/flask/hooks.c
line diff
     1.1 --- a/xen/xsm/flask/hooks.c	Wed Sep 22 18:04:11 2010 +0100
     1.2 +++ b/xen/xsm/flask/hooks.c	Wed Sep 22 18:26:01 2010 +0100
     1.3 @@ -340,10 +340,7 @@ static int get_page_sid(struct page_info
     1.4          default:
     1.5              /*Pages are implicitly labeled by domain ownership!*/
     1.6              dsec = d->ssid;
     1.7 -            if (dsec)
     1.8 -                *sid = dsec->sid;
     1.9 -            else
    1.10 -                rc = -ENOENT;
    1.11 +            *sid = dsec ? dsec->sid : SECINITSID_UNLABELED;
    1.12          break;
    1.13      }
    1.14