summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-06 11:40:03 +0100
committerAndreas Schneider <asn@samba.org>2013-08-05 10:30:01 +0200
commitc4d6d75cf48aed7b17728e283581366143fa4233 (patch)
tree889e19346f0435839b2113deb6771d738fcfb3c9 /source3
parentcc0cbd4fdc6e07538d67cc41ca07bad1eaebf493 (diff)
downloadsamba-c4d6d75cf48aed7b17728e283581366143fa4233.tar.gz
samba-c4d6d75cf48aed7b17728e283581366143fa4233.tar.bz2
samba-c4d6d75cf48aed7b17728e283581366143fa4233.zip
s3-libnetjoin: add machine_name length check.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_join.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 4582158fca..df3a86d092 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1715,6 +1715,15 @@ static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx,
return WERR_INVALID_PARAM;
}
+ if (strlen(r->in.machine_name) > 15) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "Our netbios name can be at most 15 chars long, "
+ "\"%s\" is %u chars long\n",
+ r->in.machine_name,
+ (unsigned int)strlen(r->in.machine_name));
+ return WERR_INVALID_PARAM;
+ }
+
if (!libnet_parse_domain_dc(mem_ctx, r->in.domain_name,
&r->in.domain_name,
&r->in.dc_name)) {