summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-05 04:34:50 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-05 04:34:50 +0000
commit3b9eb528f56b325399e5a4588242bb6d9f9226e2 (patch)
tree8c39d44532f4aabc61279bec108d866673122e52 /source
parent0c61e54f152eca6b7607fcce9ea512bc60a19060 (diff)
downloadsamba-3b9eb528f56b325399e5a4588242bb6d9f9226e2.tar.gz
samba-3b9eb528f56b325399e5a4588242bb6d9f9226e2.tar.xz
samba-3b9eb528f56b325399e5a4588242bb6d9f9226e2.zip
use alpha_strcpy on the domain as it comes off the wire
Diffstat (limited to 'source')
-rw-r--r--source/smbd/reply.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index a3310730933..b7291f55770 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -836,15 +836,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
domain,native_os,native_lanman));
}
- /* don't allow for weird usernames */
+ /* don't allow for weird usernames or domains */
alpha_strcpy(user, user, ". _-", sizeof(user));
- if (strstr(user, "..")) {
- return bad_password_error(inbuf, outbuf);
- }
-
- /* don't allow for weird usernames */
- 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);
}