summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-03 00:38:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:25 -0500
commit4c36a59f434665fa94a4ea6c1ce086adf2ed8be0 (patch)
treea881f272ecac500abe862983bf5b44fc1ceb96ea /source4
parenta115c3e1e2ddb305d558c74d36a6ec8ffcf86926 (diff)
downloadsamba-4c36a59f434665fa94a4ea6c1ce086adf2ed8be0.tar.gz
samba-4c36a59f434665fa94a4ea6c1ce086adf2ed8be0.tar.bz2
samba-4c36a59f434665fa94a4ea6c1ce086adf2ed8be0.zip
r7203: Fill in the error message and fail if we can't open the secrets database.
Andrew Bartlett (This used to be commit 27257170f4ad08c1a86be9c2a5edfa0b3da0b7a0)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_join.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index e8fdc28dbd..65e0006bbe 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -359,6 +359,12 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx,
/* Local secrets are stored in secrets.ldb */
ldb = secrets_db_connect(mem_ctx);
+ if (!ldb) {
+ r->generic.out.error_string
+ = talloc_asprintf(mem_ctx,
+ "Could not open secrets database\n");
+ return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ }
/* join domain */
status = libnet_JoinDomain(ctx, mem_ctx, &r2);