Extra little fix to vl's patch. Make sure the passdb and testparm messages
authorAndrew Bartlett <abartlet@samba.org>
Sun, 3 Nov 2002 14:13:43 +0000 (14:13 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 3 Nov 2002 14:13:43 +0000 (14:13 +0000)
say exactly the same thing - in particular that we can algorithmic rid base ==
1000, and use the BASE_RID macro to avoid the use of magic numbers.

Andrew Bartlett

source/passdb/passdb.c
source/utils/testparm.c

index adc5eb8478c831e4110c02db06fb4344a735ba03..4ce5b93abd58f2658fff9b7e95f7137a904b592d 100644 (file)
@@ -509,9 +509,11 @@ static int algorithmic_rid_base(void)
 
        rid_offset = lp_algorithmic_rid_base();
 
-       if (rid_offset < 1000) {
-               DEBUG(0, ("algorithmic rid base must be above 1000\n"));
-               rid_offset = 1000;
+       if (rid_offset < BASE_RID) {  
+               /* Try to prevent admin foot-shooting, we can't put algorithmic
+                  rids below 1000, that's the 'well known RIDs' on NT */
+               DEBUG(0, ("'algorithmic rid base' must be equal to or above %ld\n", BASE_RID));
+               rid_offset = BASE_RID;
        }
        if (rid_offset & 1) {
                DEBUG(0, ("algorithmic rid base must be even\n"));
index f2636fdafb91b105490fd802b80f6c1f884eb270..c92692fda252503adfd3ca7830f7932046f18415 100644 (file)
@@ -168,8 +168,10 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
                printf("'winbind separator = +' might cause problems with group membership.\n");
        }
 
-       if (lp_algorithmic_rid_base() < 1000) {
-               printf("'algorithmic rid base' must be equal or above 1000.\n");
+       if (lp_algorithmic_rid_base() < BASE_RID) {
+               /* Try to prevent admin foot-shooting, we can't put algorithmic
+                  rids below 1000, that's the 'well known RIDs' on NT */
+               printf("'algorithmic rid base' must be equal to or above %lu\n", BASE_RID);
        }
 
        if (lp_algorithmic_rid_base() & 1) {