summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-05 04:37:48 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-05 04:37:48 +0000
commit79b2e4ef59332b0739daa348ce0cb2515b79aa81 (patch)
tree9ee7343108318b7be747f3ec3e8eac00ba68dead /source/smbd/reply.c
parent0d5ce53fa706598b8a7c0566e3f25539c94d12bd (diff)
downloadsamba-79b2e4ef59332b0739daa348ce0cb2515b79aa81.tar.gz
samba-79b2e4ef59332b0739daa348ce0cb2515b79aa81.tar.xz
samba-79b2e4ef59332b0739daa348ce0cb2515b79aa81.zip
use alpha_strcpy on the domain as it comes off the wire
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index ad3ed4454df..1a0ee646018 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -866,9 +866,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
domain,skip_string(p,1),skip_string(p,2)));
}
- /* don't allow strange characters in usernames */
+ /* don't allow strange characters in usernames or domains */
alpha_strcpy(user, user, ". _-", sizeof(user));
- if (strstr(user, "..")) {
+ alpha_strcpy(domain, domain, ". _-", sizeof(domain));
+ if (strstr(user, "..") || strstr(domain,"..")) {
return bad_password_error(inbuf, outbuf);
}