From 3f0681fb0b2d0744c2ef892883ae5359b43a4a9a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 26 Feb 2008 23:14:29 -0500 Subject: [PATCH] xselinux: Stub out selection protocol requests. --- Xext/xselinux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ Xext/xselinux.h | 3 +++ 2 files changed, 55 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 60ec8d494..d3fe86b3a 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1282,6 +1282,24 @@ ProcSELinuxGetWindowContext(ClientPtr client) return client->noClientException; } +static int +ProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionContext(ClientPtr client) +{ + return Success; +} + static int ProcSELinuxDispatch(ClientPtr client) { @@ -1313,6 +1331,12 @@ ProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return ProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return ProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return ProcSELinuxGetSelectionContext(client); default: return BadRequest; } @@ -1420,6 +1444,28 @@ SProcSELinuxGetWindowContext(ClientPtr client) return ProcSELinuxGetWindowContext(client); } +static int +SProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + REQUEST(SELinuxSetCreateContextReq); + int n; + + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len, n); + return ProcSELinuxSetSelectionCreateContext(client); +} + +static int +SProcSELinuxGetSelectionContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id, n); + return ProcSELinuxGetSelectionContext(client); +} + static int SProcSELinuxDispatch(ClientPtr client) { @@ -1455,6 +1501,12 @@ SProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return SProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return SProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return SProcSELinuxGetSelectionContext(client); default: return BadRequest; } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 7eeea5046..480276154 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -43,6 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_SELinuxSetWindowCreateContext 10 #define X_SELinuxGetWindowCreateContext 11 #define X_SELinuxGetWindowContext 12 +#define X_SELinuxSetSelectionCreateContext 13 +#define X_SELinuxGetSelectionCreateContext 14 +#define X_SELinuxGetSelectionContext 15 typedef struct { CARD8 reqType;