xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 15 20:00:16 UTC 2024


 Xext/security.c |    1 +
 dix/main.c      |    1 +
 include/os.h    |   10 ----------
 os/audit.h      |   18 ++++++++++++++++++
 os/connection.c |    1 +
 os/log.c        |    3 +++
 os/utils.c      |    8 +++-----
 7 files changed, 27 insertions(+), 15 deletions(-)

New commits:
commit 3843a643e0a25f6efedbcdb687f4d7e268c84d52
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Mon Feb 26 15:24:11 2024 +0100

    os: unexport audit functions
    
    These aren't used by any drivers, so no need to keep them around in the
    public driver API.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1326>

diff --git a/Xext/security.c b/Xext/security.c
index 84c468e62..d1f0df9e4 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
 
 #include "dix/dix_priv.h"
 #include "dix/registry_priv.h"
+#include "os/audit.h"
 
 #include "scrnintstr.h"
 #include "inputstr.h"
diff --git a/dix/main.c b/dix/main.c
index 567e1324e..ea81defba 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -86,6 +86,7 @@ Equipment Corporation.
 #include "dix/callback_priv.h"
 #include "dix/dix_priv.h"
 #include "dix/registry_priv.h"
+#include "os/audit.h"
 
 #include "scrnintstr.h"
 #include "misc.h"
diff --git a/include/os.h b/include/os.h
index 24ab2ba07..94853d26c 100644
--- a/include/os.h
+++ b/include/os.h
@@ -286,8 +286,6 @@ OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
 extern _X_EXPORT OsSigWrapperPtr
 OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
 
-extern _X_EXPORT int auditTrailLevel;
-
 extern _X_EXPORT void
 LockServer(void);
 extern _X_EXPORT void
@@ -639,14 +637,6 @@ LogHdrMessage(MessageType type, const char *msg_format,
 _X_ATTRIBUTE_PRINTF(2, 0)
 _X_ATTRIBUTE_PRINTF(4, 5);
 
-extern _X_EXPORT void
-FreeAuditTimer(void);
-extern _X_EXPORT void
-AuditF(const char *f, ...)
-_X_ATTRIBUTE_PRINTF(1, 2);
-extern _X_EXPORT void
-VAuditF(const char *f, va_list args)
-_X_ATTRIBUTE_PRINTF(1, 0);
 extern _X_EXPORT void
 FatalError(const char *f, ...)
 _X_ATTRIBUTE_PRINTF(1, 2)
diff --git a/os/audit.h b/os/audit.h
new file mode 100644
index 000000000..205109489
--- /dev/null
+++ b/os/audit.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_OS_AUDIT_H
+#define _XSERVER_OS_AUDIT_H
+
+#include <stdarg.h>
+#include <X11/Xfuncproto.h>
+
+extern int auditTrailLevel;
+
+void FreeAuditTimer(void);
+
+void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+void VAuditF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0);
+
+#endif /* _XSERVER_OS_AUDIT_H */
diff --git a/os/connection.c b/os/connection.c
index 71420a248..aad3e74fb 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -99,6 +99,7 @@ SOFTWARE.
 #endif                          /* WIN32 */
 
 #include "dix/dix_priv.h"
+#include "os/audit.h"
 
 #include "misc.h"               /* for typedef of pointer */
 #include "osdep.h"
diff --git a/os/log.c b/os/log.c
index ae02dc746..7e71ff8af 100644
--- a/os/log.c
+++ b/os/log.c
@@ -87,6 +87,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include <stdlib.h>             /* for malloc() */
 #include <errno.h>
 
+#include "os/audit.h"
 #include "os/fmt.h"
 
 #include "input.h"
@@ -902,6 +903,8 @@ static int nrepeat = 0;
 static int oldlen = -1;
 static OsTimerPtr auditTimer = NULL;
 
+int auditTrailLevel = 1;
+
 void
 FreeAuditTimer(void)
 {
diff --git a/os/utils.c b/os/utils.c
index df56b5b9b..7b5e75d38 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -78,6 +78,9 @@ __stdcall unsigned long GetTickCount(void);
 #define TRANS_SERVER
 #define TRANS_REOPEN
 #include <X11/Xtrans/Xtrans.h>
+
+#include "os/audit.h"
+
 #include "input.h"
 #include "dixfont.h"
 #include <X11/fonts/libxfont2.h>
@@ -107,11 +110,8 @@ __stdcall unsigned long GetTickCount(void);
 
 #include "dixstruct.h"
 #include "xkbsrv.h"
-
 #include "picture.h"
-
 #include "miinitext.h"
-
 #include "present.h"
 
 Bool noTestExtensions;
@@ -192,8 +192,6 @@ Bool AllowByteSwappedClients = FALSE;
 Bool PanoramiXExtensionDisabledHack = FALSE;
 #endif
 
-int auditTrailLevel = 1;
-
 char *SeatId = NULL;
 
 sig_atomic_t inSignalContext = FALSE;


More information about the xorg-commit mailing list