From 4c36a59f434665fa94a4ea6c1ce086adf2ed8be0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Jun 2005 00:38:51 +0000 Subject: [PATCH] r7203: Fill in the error message and fail if we can't open the secrets database. Andrew Bartlett (This used to be commit 27257170f4ad08c1a86be9c2a5edfa0b3da0b7a0) --- source4/libnet/libnet_join.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index e8fdc28dbd5..65e0006bbea 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);