summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-05 04:44:09 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-05 04:44:09 +0000
commit61e6d867c4afd27e0a2358282532c478707f30db (patch)
tree85f59449a13d7d7c6ff811ed02e3105a9bf60274 /source3/lib
parent55bd0867d8610f75e2696b1539ca1b1ca3aa062d (diff)
downloadsamba-61e6d867c4afd27e0a2358282532c478707f30db.tar.gz
samba-61e6d867c4afd27e0a2358282532c478707f30db.tar.bz2
samba-61e6d867c4afd27e0a2358282532c478707f30db.zip
use alpha_strcpy on DNS names
(This used to be commit f6f9e95dd9254c6aad19d4fa1ff891bfa33070b6)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sock.c6
1 files changed, 6 insertions, 0 deletions
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;
}