diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-06-03 00:38:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:25 -0500 |
commit | 4c36a59f434665fa94a4ea6c1ce086adf2ed8be0 (patch) | |
tree | a881f272ecac500abe862983bf5b44fc1ceb96ea | |
parent | a115c3e1e2ddb305d558c74d36a6ec8ffcf86926 (diff) | |
download | samba-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)
-rw-r--r-- | source4/libnet/libnet_join.c | 6 |
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); |