1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r21548: prevent segv (reference to -1 element of array)

(This used to be commit b5fd72282da85f50a040fd949752bc71023ff055)
This commit is contained in:
Herb Lewis 2007-02-26 22:19:23 +00:00 committed by Gerald (Jerry) Carter
parent 28e2069d1f
commit bdc612a098

View File

@ -497,7 +497,8 @@ NTSTATUS idmap_init(void)
/**** finished adding idmap_passdb backend ****/
/* sort domains so that the default is the last one */
if (def_dom_num != num_domains-1) { /* default is not last, move it */
/* don't sort if no default domain defined */
if (def_dom_num != -1 && def_dom_num != num_domains-1) { /* default is not last, move it */
struct idmap_domain *tmp;
if (pdb_dom_num > def_dom_num) {