mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r20102: Do not reference remote_ldb before we initialise it. This should fix
up many of the build farm failures. Andrew Bartlett
This commit is contained in:
parent
a2520bcfa9
commit
924af98ffa
@ -219,14 +219,6 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
|
||||
/* Store the DN of our machine account. */
|
||||
account_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
|
||||
|
||||
account_dn = ldb_dn_new(tmp_ctx, remote_ldb, account_dn_str);
|
||||
if (! ldb_dn_validate(account_dn)) {
|
||||
r->out.error_string = talloc_asprintf(r, "Invalid account dn: %s",
|
||||
account_dn_str);
|
||||
talloc_free(tmp_ctx);
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* Now we know the user's DN, open with LDAP, read and modify a few things */
|
||||
|
||||
remote_ldb_url = talloc_asprintf(tmp_ctx, "ldap://%s",
|
||||
@ -245,6 +237,14 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
account_dn = ldb_dn_new(tmp_ctx, remote_ldb, account_dn_str);
|
||||
if (! ldb_dn_validate(account_dn)) {
|
||||
r->out.error_string = talloc_asprintf(r, "Invalid account dn: %s",
|
||||
account_dn_str);
|
||||
talloc_free(tmp_ctx);
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* search for the user's record */
|
||||
ret = ldb_search(remote_ldb, account_dn, LDB_SCOPE_BASE,
|
||||
NULL, attrs, &res);
|
||||
|
Loading…
Reference in New Issue
Block a user