s3-testparm: Throw warning when 'workgroup' and 'netbios name' are identical.
authorKarolin Seeger <kseeger@samba.org>
Wed, 24 Mar 2010 13:55:15 +0000 (14:55 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Mar 2010 14:09:23 +0000 (15:09 +0100)
Address bug #7285 (NetBIOS Namespace Clash Handling).

Karolin

source3/utils/testparm.c

index 3204de27d431b30fa2251081678302f9c6684746..73e173e20975f7803aeb6fdac49423a045d82840 100644 (file)
@@ -77,6 +77,12 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
                ret = 1;
        }
 
+       if (strequal(lp_workgroup(), global_myname())) {
+               fprintf(stderr, "WARNING: 'workgroup' and 'netbios name' " \
+                       "must differ.\n");
+               ret = 1;
+       }
+
        if (!directory_exist_stat(lp_lockdir(), &st)) {
                fprintf(stderr, "ERROR: lock directory %s does not exist\n",
                       lp_lockdir());