summaryrefslogtreecommitdiff
path: root/source3/smbd
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
commit55bd0867d8610f75e2696b1539ca1b1ca3aa062d (patch)
treea557ec038fe60190d8178ee8dac0a2bae88bc9dc /source3/smbd
parentfb50cf54e58ea99fd0788a540f7b86d2ba7e36b8 (diff)
downloadsamba-55bd0867d8610f75e2696b1539ca1b1ca3aa062d.tar.gz
samba-55bd0867d8610f75e2696b1539ca1b1ca3aa062d.tar.bz2
samba-55bd0867d8610f75e2696b1539ca1b1ca3aa062d.zip
use alpha_strcpy on the domain as it comes off the wire
(This used to be commit 3b9eb528f56b325399e5a4588242bb6d9f9226e2)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a331073093..b7291f5577 100644
--- a/source3/smbd/reply.c
+++ b/source3/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);
}