Files
ports/security/gssproxy/files/patch-src_gp__creds.c
Jochen Neumeister 59c3b1a0f7 security/gssproxy: Add new Port
GSS Proxy allows processes to perform GSSAPI operations, such as
Kerberos authentication, through a privileged daemon. This separates
credential handling from the application and lets services access
keytabs and credential caches without holding the privileges directly.

WWW: https://github.com/gssapi/gssproxy

Sponsored by:	Netzkommune GmbH

Required for: FreeIPA server port
2026-07-22 00:48:24 +02:00

30 lines
671 B
C

--- src/gp_creds.c.orig 2026-07-21 10:43:49 UTC
+++ src/gp_creds.c
@@ -3,7 +3,11 @@
#include "config.h"
#include <stdio.h>
#include <sys/socket.h>
+#ifdef __FreeBSD__
+#include <pthread_np.h>
+#else
#include <sys/syscall.h>
+#endif
#include <sys/types.h>
#include <errno.h>
#include <string.h>
@@ -267,10 +271,14 @@ static int ensure_segregated_ccache(struct gp_call_ctx
return ENOMEM;
}
+#ifdef __FreeBSD__
+ tid = pthread_getthreadid_np();
+#else
do {
errno = 0;
tid = syscall(SYS_gettid);
} while (tid == -1 && errno == EINTR);
+#endif
ret = asprintf(&buf, "MEMORY:internal_%d", tid);
if (ret == -1) {