git.samba.org
/
jpeach
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a646744
)
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
Herb Lewis
<herb@samba.org>
Mon, 26 Feb 2007 22:19:23 +0000
(22:19 +0000)
source/nsswitch/idmap.c
patch
|
blob
|
history
diff --git
a/source/nsswitch/idmap.c
b/source/nsswitch/idmap.c
index 92c5ca135537298babec629dbf4760e11ffc7087..d69fd68e1031f27589ae9f8140caf8cdf63fa9be 100644
(file)
--- a/
source/nsswitch/idmap.c
+++ b/
source/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) {