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>
This commit is contained in:
Keir Fraser committed 2010-09-22 18:26:01 +01:00
1 parent 2b989e000b
commit f9b43436a8
1 file changed
+1 -4
+1 -4
View File
@@ -340,10 +340,7 @@ static int get_page_sid(struct page_info *page, u32 *sid)
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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.