diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-04-19 15:43:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:26 -0500 |
commit | fb1f83b05d96fb2e5094c2b35765f62a0fc6c26c (patch) | |
tree | f95db84ad59a69979daa8632f07dec4e1c0f0344 | |
parent | d4d04313ea9291a0769fe66ff65895adfb04d89f (diff) | |
download | samba-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)
-rw-r--r-- | source3/utils/net_ads.c | 6 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 7 |
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; |