xselinux: Relax ownership restriction on SetSelectionUseContext.

Instead, clients should keep track of the selection instances they use.
(cherry picked from commit 0952d12717)

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
This commit is contained in:
Eamon Walsh 2009-05-11 15:27:46 -04:00
parent 0fbf6f30f7
commit a9f85dcefb

View file

@ -1349,15 +1349,6 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
goto out;
privPtr = &serverClient->devPrivates;
}
else if (offset == USE_SEL) {
/* Selection use context currently requires no selections owned */
Selection *pSel;
for (pSel = CurrentSelections; pSel; pSel = pSel->next)
if (pSel->client == client) {
rc = BadMatch;
goto out;
}
}
ptr = dixLookupPrivate(privPtr, subjectKey);
pSid = (security_id_t *)(ptr + offset);