xserver: Branch 'master' - 2 commits

Eamon Walsh ewalsh at kemper.freedesktop.org
Tue Feb 26 19:10:02 PST 2008


 Xext/security.c |    2 ++
 Xext/xselinux.c |   31 -------------------------------
 2 files changed, 2 insertions(+), 31 deletions(-)

New commits:
commit 4632ea22580c31d44b0786321668d9e78f02900e
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 26 22:00:52 2008 -0500

    xselinux: Rip out the selection code in advance of polyinstantiation support.
    
    This resolves an issue where BadWindow errors were being thrown.

diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index 5aa2ad3..60ec8d4 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -951,42 +951,11 @@ static void
 SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
 {
     SelectionInfoRec *rec = calldata;
-    SELinuxSubjectRec *subj;
-    SELinuxObjectRec *obj;
 
     switch (rec->kind) {
     case SelectionSetOwner:
-	/* save off the "real" owner of the selection */
-	rec->selection->alt_client = rec->selection->client;
-	rec->selection->alt_window = rec->selection->window;
-
-	/* figure out the new label for the content */
-	subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
-	obj = dixLookupPrivate(&rec->selection->devPrivates, objectKey);
-	sidput(obj->sid);
-
-	if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION,
-			       &obj->sid) < 0) {
-	    ErrorF("SELinux: a compute_create call failed!\n");
-	    obj->sid = unlabeled_sid;
-	}
-	break;
-
     case SelectionGetOwner:
-	/* restore the real owner */
-	rec->selection->window = rec->selection->alt_window;
-	break;
-
     case SelectionConvertSelection:
-	/* redirect the convert request if necessary */
-	if (securityManager && securityManager != rec->client) {
-	    rec->selection->client = securityManager;
-	    rec->selection->window = securityWindow;
-	} else {
-	    rec->selection->client = rec->selection->alt_client;
-	    rec->selection->window = rec->selection->alt_window;
-	}
-	break;
     default:
 	break;
     }
commit c8e979b3b800e4c58be454daa0213285d4ee6510
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Feb 26 21:34:22 2008 -0500

    security: Register resource names in the server-side name registry.

diff --git a/Xext/security.c b/Xext/security.c
index 27ef382..cd67120 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1105,6 +1105,8 @@ SecurityExtensionInit(INITARGS)
 	return;
 
     RTEventClient |= RC_NEVERRETAIN;
+    RegisterResourceName(SecurityAuthorizationResType, "SecurityAuthorization");
+    RegisterResourceName(RTEventClient, "SecurityEventClient");
 
     /* Allocate the private storage */
     if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec)))


More information about the xorg-commit mailing list