summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-19 12:55:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:31 -0500
commit3e73885ba4eb0d60d6ed997360e0ea3e17dc154d (patch)
treea82bdac788b770a9db12f536412bd6c612941a1b
parentf021c2da15ac549c253ddc2c0cb4f15fba7bdc07 (diff)
downloadsamba-3e73885ba4eb0d60d6ed997360e0ea3e17dc154d.tar.gz
samba-3e73885ba4eb0d60d6ed997360e0ea3e17dc154d.tar.bz2
samba-3e73885ba4eb0d60d6ed997360e0ea3e17dc154d.zip
r7756: Don't segfault by trying to search for the NULL DN, if the wrong
password was entered. We would not use the results of the search in any case. Andrew Bartlett (This used to be commit edeb908acaaaaab13bef4d2e3fae18d87c07af81)
-rw-r--r--source4/rpc_server/samr/samr_password.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index e7f547bbf3..8fa261cf35 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -400,11 +400,13 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
return NT_STATUS_OK;
failed:
- ret = gendb_search_dn(sam_ctx, mem_ctx,
- domain_dn, &res, dom_attrs);
-
- if (ret != 1) {
- return status;
+ if (domain_dn) {
+ ret = gendb_search_dn(sam_ctx, mem_ctx,
+ domain_dn, &res, dom_attrs);
+
+ if (ret != 1) {
+ return status;
+ }
}
/* on failure we need to fill in the reject reasons */