diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2023-06-26 22:56:52 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2023-06-26 22:56:52 +0000 |
| commit | b6a943f7197af1a5eb6bb028b9b808ec5016e30c (patch) | |
| tree | cfbb91e940dd89d0e1d46095f43c228d7d079fa0 /lib/ipc/tc.c | |
| parent | 6f4e10db3298f6d65e1e646fe52aaafc3682b788 (diff) | |
heimdal: Vendor import f62e2f278vendor/heimdal/7.8.0-2023-06-10-f62e2f278vendor/heimdal
Heimdal 7.8.0 does not support OpenSSL 3.0. 7.9.0 will but it hasn't
been released yet. We are importing f62e2f278 for its OpenSSL 3.0
support.
Diffstat (limited to 'lib/ipc/tc.c')
| -rw-r--r-- | lib/ipc/tc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/ipc/tc.c b/lib/ipc/tc.c index fb799bba94b7..e366f1789559 100644 --- a/lib/ipc/tc.c +++ b/lib/ipc/tc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Kungliga Tekniska Högskolan + * Copyright (c) 2009 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <krb5-types.h> @@ -62,7 +63,9 @@ usage(int ret) static void reply(void *ctx, int errorcode, heim_idata *rep, heim_icred cred) { - printf("got reply\n"); + printf("got reply errorcode %d, rep %.*s\n", errorcode, + rep->length < INT_MAX ? (int)rep->length : INT_MAX, + (char *)rep->data); heim_ipc_semaphore_signal((heim_isemaphore)ctx); /* tell caller we are done */ } @@ -73,13 +76,18 @@ test_ipc(const char *service) heim_idata req, rep; heim_ipc ipc; int ret; + char buf[128]; + + snprintf(buf, sizeof(buf), "testing heim IPC via %s", service); + + printf("%s\n", buf); ret = heim_ipc_init_context(service, &ipc); if (ret) errx(1, "heim_ipc_init_context: %d", ret); - req.length = 0; - req.data = NULL; + req.length = strlen(buf); + req.data = buf; ret = heim_ipc_call(ipc, &req, &rep, NULL); if (ret) @@ -122,6 +130,9 @@ main(int argc, char **argv) #endif test_ipc("ANY:org.h5l.test-ipc"); test_ipc("UNIX:org.h5l.test-ipc"); +#ifdef HAVE_DOOR_CREATE + test_ipc("DOOR:org.h5l.test-ipc"); +#endif return 0; } |
