From e89006d01501e29b7bc1d5e2561fa6473e096c28 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 10 Mar 2025 10:39:11 +0100 Subject: [PATCH] os: auth: factor out auth proto names into defines Signed-off-by: Enrico Weigelt, metux IT consult --- os/auth.c | 4 ++-- os/auth.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/os/auth.c b/os/auth.c index a22980efd..fd1f3f409 100644 --- a/os/auth.c +++ b/os/auth.c @@ -64,7 +64,7 @@ struct protocol { static struct protocol protocols[] = { { - .name = "MIT-MAGIC-COOKIE-1", + .name = XAUTH_PROTO_MIT, .Add = MitAddCookie, .Check = MitCheckCookie, .Reset = MitResetCookie, @@ -74,7 +74,7 @@ static struct protocol protocols[] = { }, #ifdef HASXDMAUTH { - .name = "XDM-AUTHORIZATION-1", + .name = XAUTH_PROTO_XDM, .Add = XdmAddCookie, .Check = XdmCheckCookie, .Reset = XdmResetCookie, diff --git a/os/auth.h b/os/auth.h index 5d23e9ada..b626828c8 100644 --- a/os/auth.h +++ b/os/auth.h @@ -5,6 +5,9 @@ #include "dix.h" +#define XAUTH_PROTO_MIT "MIT-MAGIC-COOKIE-1" +#define XAUTH_PROTO_XDM "XDM-AUTHORIZATION-1" + #define AuthInitArgs void typedef void (*AuthInitFunc) (AuthInitArgs);