1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--- kadmin/server/ovsec_kadmd.c.orig Tue Jan 9 12:21:43 2007
+++ kadmin/server/ovsec_kadmd.c Wed Apr 4 13:53:04 2007
@@ -992,6 +992,8 @@
rpcproc_t proc;
int i;
const char *procname;
+ size_t clen, slen;
+ char *cdots, *sdots;
client.length = 0;
client.value = NULL;
@@ -1000,10 +1002,20 @@
(void) gss_display_name(&minor, client_name, &client, &gss_type);
(void) gss_display_name(&minor, server_name, &server, &gss_type);
- if (client.value == NULL)
+ if (client.value == NULL) {
client.value = "(null)";
- if (server.value == NULL)
+ clen = sizeof("(null)") -1;
+ } else {
+ clen = client.length;
+ }
+ trunc_name(&clen, &cdots);
+ if (server.value == NULL) {
server.value = "(null)";
+ slen = sizeof("(null)") - 1;
+ } else {
+ slen = server.length;
+ }
+ trunc_name(&slen, &sdots);
a = inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr);
proc = msg->rm_call.cb_proc;
@@ -1016,14 +1028,14 @@
}
if (procname != NULL)
krb5_klog_syslog(LOG_NOTICE, "WARNING! Forged/garbled request: %s, "
- "claimed client = %s, server = %s, addr = %s",
- procname, client.value,
- server.value, a);
+ "claimed client = %.*s%s, server = %.*s%s, addr = %s",
+ procname, clen, client.value, cdots,
+ slen, server.value, sdots, a);
else
krb5_klog_syslog(LOG_NOTICE, "WARNING! Forged/garbled request: %d, "
- "claimed client = %s, server = %s, addr = %s",
- proc, client.value,
- server.value, a);
+ "claimed client = %.*s%s, server = %.*s%s, addr = %s",
+ proc, clen, client.value, cdots,
+ slen, server.value, sdots, a);
(void) gss_release_buffer(&minor, &client);
(void) gss_release_buffer(&minor, &server);
|