diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-05 04:34:50 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-05 04:34:50 +0000 |
commit | 55bd0867d8610f75e2696b1539ca1b1ca3aa062d (patch) | |
tree | a557ec038fe60190d8178ee8dac0a2bae88bc9dc /source3 | |
parent | fb50cf54e58ea99fd0788a540f7b86d2ba7e36b8 (diff) | |
download | samba-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')
-rw-r--r-- | source3/smbd/reply.c | 11 |
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); } |