git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28e2069
)
r21548: prevent segv (reference to -1 element of array)
author
Herb Lewis
<herb@samba.org>
Mon, 26 Feb 2007 22:19:23 +0000
(22:19 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:18:12 +0000
(12:18 -0500)
(This used to be commit
b5fd72282da85f50a040fd949752bc71023ff055
)
source3/nsswitch/idmap.c
patch
|
blob
|
history
diff --git
a/source3/nsswitch/idmap.c
b/source3/nsswitch/idmap.c
index 92c5ca135537298babec629dbf4760e11ffc7087..d69fd68e1031f27589ae9f8140caf8cdf63fa9be 100644
(file)
--- a/
source3/nsswitch/idmap.c
+++ b/
source3/nsswitch/idmap.c
@@
-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) {