Author: vlendec Date: 2005-12-27 22:11:40 +0000 (Tue, 27 Dec 2005) New Revision: 12524
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12524 Log: Fix two issues with RID allocation. First, in get_free_rid_range, the 'return True' was just missing. Without it we could have completely removed the if statements, both values are overwritten later anyway. Jerry, in smbldap_util you initialize the nextrid attributes to the _upper_ end of the range. This just is wrong I think. Please look over it. Thanks, Volker Modified: trunk/source/lib/smbldap_util.c trunk/source/passdb/passdb.c Changeset: Modified: trunk/source/lib/smbldap_util.c =================================================================== --- trunk/source/lib/smbldap_util.c 2005-12-27 21:11:09 UTC (rev 12523) +++ trunk/source/lib/smbldap_util.c 2005-12-27 22:11:40 UTC (rev 12524) @@ -161,13 +161,13 @@ { fstring rid_str; - fstr_sprintf( rid_str, "%i", rid_high|USER_RID_TYPE ); + fstr_sprintf( rid_str, "%i", rid_low|USER_RID_TYPE ); DEBUG(10,("setting next available user rid [%s]\n", rid_str)); smbldap_set_mod(&mods, LDAP_MOD_ADD, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_USERRID), rid_str); - fstr_sprintf( rid_str, "%i", rid_high|GROUP_RID_TYPE ); + fstr_sprintf( rid_str, "%i", rid_low|GROUP_RID_TYPE ); DEBUG(10,("setting next available group rid [%s]\n", rid_str)); smbldap_set_mod(&mods, LDAP_MOD_ADD, get_attr_key2string(dominfo_attr_list, LDAP_ATTR_NEXT_GROUPRID), Modified: trunk/source/passdb/passdb.c =================================================================== --- trunk/source/passdb/passdb.c 2005-12-27 21:11:09 UTC (rev 12523) +++ trunk/source/passdb/passdb.c 2005-12-27 22:11:40 UTC (rev 12524) @@ -1955,6 +1955,7 @@ if (!lp_enable_rid_algorithm()) { *low = BASE_RID; *high = (uint32)-1; + return True; } if (!get_free_ugid_range(&id_low, &id_high)) {
