From 61e6d867c4afd27e0a2358282532c478707f30db Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 5 Jul 2001 04:44:09 +0000 Subject: use alpha_strcpy on DNS names (This used to be commit f6f9e95dd9254c6aad19d4fa1ff891bfa33070b6) --- source3/lib/util_sock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index a55ef1a92e..760ceceede 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1016,6 +1016,12 @@ char *get_socket_name(int fd) pstrcpy(name_buf,"UNKNOWN"); } } + + alpha_strcpy(name_buf, name_buf, "_-.", sizeof(name_buf)); + if (strstr(name_buf,"..")) { + pstrcpy(name_buf, "UNKNOWN"); + } + return name_buf; } -- cgit