testparm: Add warning if the netbios name is too long
authorAndreas Schneider <asn@samba.org>
Mon, 27 Apr 2015 14:18:38 +0000 (16:18 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 21 May 2015 18:07:28 +0000 (20:07 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/utils/testparm.c

index 7850b4386ed59db3766367c926251ab0600a9242..5912d18e08581bf66f9f8d2534800cb53e6f2602 100644 (file)
@@ -88,6 +88,11 @@ static int do_global_checks(void)
                                "must differ.\n\n");
        }
 
+       if (strlen(lp_netbios_name()) > 15) {
+               fprintf(stderr, "WARNING: The 'netbios name' is too long "
+                               "(max. 15 chars).\n\n");
+       }
+
        if (!directory_exist_stat(lp_lock_directory(), &st)) {
                fprintf(stderr, "ERROR: lock directory %s does not exist\n\n",
                       lp_lock_directory());