xselinux: Implement swapped protocol request logic.

This commit is contained in:
Eamon Walsh 2007-12-20 20:32:07 -05:00 committed by Eamon Walsh
parent 1bbf64ab11
commit f3780ece52

View File

@ -1198,69 +1198,82 @@ SProcSELinuxSetSelectionManager(ClientPtr client)
return ProcSELinuxSetSelectionManager(client); return ProcSELinuxSetSelectionManager(client);
} }
static int
SProcSELinuxGetSelectionManager(ClientPtr client)
{
return ProcSELinuxGetSelectionManager(client);
}
static int static int
SProcSELinuxSetDeviceCreateContext(ClientPtr client) SProcSELinuxSetDeviceCreateContext(ClientPtr client)
{ {
return ProcSELinuxSetDeviceCreateContext(client); REQUEST(SELinuxSetCreateContextReq);
} int n;
static int REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
SProcSELinuxGetDeviceCreateContext(ClientPtr client) swaps(&stuff->context_len,n);
{ return ProcSELinuxSetDeviceCreateContext(client);
return ProcSELinuxGetDeviceCreateContext(client);
} }
static int static int
SProcSELinuxSetDeviceContext(ClientPtr client) SProcSELinuxSetDeviceContext(ClientPtr client)
{ {
REQUEST(SELinuxSetContextReq);
int n;
REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq);
swapl(&stuff->id,n);
swaps(&stuff->context_len,n);
return ProcSELinuxSetDeviceContext(client); return ProcSELinuxSetDeviceContext(client);
} }
static int static int
SProcSELinuxGetDeviceContext(ClientPtr client) SProcSELinuxGetDeviceContext(ClientPtr client)
{ {
REQUEST(SELinuxGetContextReq);
int n;
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
swapl(&stuff->id,n);
return ProcSELinuxGetDeviceContext(client); return ProcSELinuxGetDeviceContext(client);
} }
static int static int
SProcSELinuxSetPropertyCreateContext(ClientPtr client) SProcSELinuxSetPropertyCreateContext(ClientPtr client)
{ {
return ProcSELinuxSetPropertyCreateContext(client); REQUEST(SELinuxSetCreateContextReq);
} int n;
static int REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
SProcSELinuxGetPropertyCreateContext(ClientPtr client) swaps(&stuff->context_len,n);
{ return ProcSELinuxSetPropertyCreateContext(client);
return ProcSELinuxGetPropertyCreateContext(client);
} }
static int static int
SProcSELinuxGetPropertyContext(ClientPtr client) SProcSELinuxGetPropertyContext(ClientPtr client)
{ {
REQUEST(SELinuxGetPropertyContextReq);
int n;
REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq);
swapl(&stuff->window,n);
swapl(&stuff->property,n);
return ProcSELinuxGetPropertyContext(client); return ProcSELinuxGetPropertyContext(client);
} }
static int static int
SProcSELinuxSetWindowCreateContext(ClientPtr client) SProcSELinuxSetWindowCreateContext(ClientPtr client)
{ {
return ProcSELinuxSetWindowCreateContext(client); REQUEST(SELinuxSetCreateContextReq);
} int n;
static int REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
SProcSELinuxGetWindowCreateContext(ClientPtr client) swaps(&stuff->context_len,n);
{ return ProcSELinuxSetWindowCreateContext(client);
return ProcSELinuxGetWindowCreateContext(client);
} }
static int static int
SProcSELinuxGetWindowContext(ClientPtr client) SProcSELinuxGetWindowContext(ClientPtr client)
{ {
REQUEST(SELinuxGetContextReq);
int n;
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
swapl(&stuff->id,n);
return ProcSELinuxGetWindowContext(client); return ProcSELinuxGetWindowContext(client);
} }
@ -1278,11 +1291,11 @@ SProcSELinuxDispatch(ClientPtr client)
case X_SELinuxSetSelectionManager: case X_SELinuxSetSelectionManager:
return SProcSELinuxSetSelectionManager(client); return SProcSELinuxSetSelectionManager(client);
case X_SELinuxGetSelectionManager: case X_SELinuxGetSelectionManager:
return SProcSELinuxGetSelectionManager(client); return ProcSELinuxGetSelectionManager(client);
case X_SELinuxSetDeviceCreateContext: case X_SELinuxSetDeviceCreateContext:
return SProcSELinuxSetDeviceCreateContext(client); return SProcSELinuxSetDeviceCreateContext(client);
case X_SELinuxGetDeviceCreateContext: case X_SELinuxGetDeviceCreateContext:
return SProcSELinuxGetDeviceCreateContext(client); return ProcSELinuxGetDeviceCreateContext(client);
case X_SELinuxSetDeviceContext: case X_SELinuxSetDeviceContext:
return SProcSELinuxSetDeviceContext(client); return SProcSELinuxSetDeviceContext(client);
case X_SELinuxGetDeviceContext: case X_SELinuxGetDeviceContext:
@ -1290,13 +1303,13 @@ SProcSELinuxDispatch(ClientPtr client)
case X_SELinuxSetPropertyCreateContext: case X_SELinuxSetPropertyCreateContext:
return SProcSELinuxSetPropertyCreateContext(client); return SProcSELinuxSetPropertyCreateContext(client);
case X_SELinuxGetPropertyCreateContext: case X_SELinuxGetPropertyCreateContext:
return SProcSELinuxGetPropertyCreateContext(client); return ProcSELinuxGetPropertyCreateContext(client);
case X_SELinuxGetPropertyContext: case X_SELinuxGetPropertyContext:
return SProcSELinuxGetPropertyContext(client); return SProcSELinuxGetPropertyContext(client);
case X_SELinuxSetWindowCreateContext: case X_SELinuxSetWindowCreateContext:
return SProcSELinuxSetWindowCreateContext(client); return SProcSELinuxSetWindowCreateContext(client);
case X_SELinuxGetWindowCreateContext: case X_SELinuxGetWindowCreateContext:
return SProcSELinuxGetWindowCreateContext(client); return ProcSELinuxGetWindowCreateContext(client);
case X_SELinuxGetWindowContext: case X_SELinuxGetWindowContext:
return SProcSELinuxGetWindowContext(client); return SProcSELinuxGetWindowContext(client);
default: default: