summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-19 15:43:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:26 -0500
commitfb1f83b05d96fb2e5094c2b35765f62a0fc6c26c (patch)
treef95db84ad59a69979daa8632f07dec4e1c0f0344 /source3
parentd4d04313ea9291a0769fe66ff65895adfb04d89f (diff)
downloadsamba-fb1f83b05d96fb2e5094c2b35765f62a0fc6c26c.tar.gz
samba-fb1f83b05d96fb2e5094c2b35765f62a0fc6c26c.tar.bz2
samba-fb1f83b05d96fb2e5094c2b35765f62a0fc6c26c.zip
r15137: Refuse to join if our netbios name is longer than 15 chars. I think this is
sufficient to fix bug #3659. Volker (This used to be commit 0ef5e4372c45a60d66a902a6dbca58ae98529358)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_ads.c6
-rw-r--r--source3/utils/net_rpc.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 93d564bea0..11e7ae0282 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -727,6 +727,12 @@ int net_ads_join(int argc, const char **argv)
return -1;
}
+ if (strlen(global_myname()) > 15) {
+ d_printf("Our netbios name can only be 15 chars long, \"%s\""
+ " is %d chars long\n",
+ global_myname(), strlen(global_myname()));
+ return -1;
+ }
if (argc > 0) {
org_unit = argv[0];
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index e8667cbf7b..0060a39c31 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -395,6 +395,13 @@ int net_rpc_join(int argc, const char **argv)
return -1;
}
+ if (strlen(global_myname()) > 15) {
+ d_printf("Our netbios name can only be 15 chars long, \"%s\""
+ " is %d chars long\n",
+ global_myname(), strlen(global_myname()));
+ return -1;
+ }
+
if ((net_rpc_perform_oldjoin(argc, argv) == 0))
return 0;