dix: replace XACE_SERVER_ACCESS by direct callback

Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-17 17:24:55 +02:00
committed by Enrico Weigelt
parent bd41233e47
commit 6168868906
13 changed files with 56 additions and 35 deletions

View File

@@ -92,6 +92,7 @@ SOFTWARE.
#include <errno.h>
#include <sys/types.h>
#include "dix/server_priv.h"
#include "os/xhostname.h"
#ifndef WIN32
@@ -1262,7 +1263,7 @@ AuthorizedClient(ClientPtr client)
return Success;
/* untrusted clients can't change host access */
rc = XaceHookServerAccess(client, DixManageAccess);
rc = dixCallServerAccessCallback(client, DixManageAccess);
if (rc != Success)
return rc;

View File

@@ -92,6 +92,7 @@ SOFTWARE.
#endif /* WIN32 */
#include "dix/dix_priv.h"
#include "dix/server_priv.h"
#include "os/audit.h"
#include "os/auth.h"
#include "os/client_priv.h"
@@ -871,7 +872,7 @@ OnlyListenToOneClient(ClientPtr client)
{
int rc;
rc = XaceHookServerAccess(client, DixGrabAccess);
rc = dixCallServerAccessCallback(client, DixGrabAccess);
if (rc != Success)
return rc;