diff options
author | Günther Deschner <gd@samba.org> | 2008-02-28 11:02:01 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-28 11:38:01 +0100 |
commit | 39ba91fd8391df61881dc07a04dde7a630f95d39 (patch) | |
tree | 5c584a63c37c82ad49fc17fb1ce0daa9f7f05854 /source3/libnet | |
parent | 97c2dfc52f0f02c2bc605304885128622cf7f750 (diff) | |
download | samba-39ba91fd8391df61881dc07a04dde7a630f95d39.tar.gz samba-39ba91fd8391df61881dc07a04dde7a630f95d39.tar.bz2 samba-39ba91fd8391df61881dc07a04dde7a630f95d39.zip |
Merge all connect ads calls into libnet_join_post_processing_ads().
Guenther
(This used to be commit be96baeffc60d05d8e297034e5253c8b75512ab2)
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 510b9e2e2f..2d00fb094f 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -296,13 +296,6 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx, const char *spn_array[3] = {NULL, NULL, NULL}; char *spn = NULL; - if (!r->in.ads) { - status = libnet_join_connect_ads(mem_ctx, r); - if (!ADS_ERR_OK(status)) { - return status; - } - } - status = libnet_join_find_machine_acct(mem_ctx, r); if (!ADS_ERR_OK(status)) { return status; @@ -358,13 +351,6 @@ static ADS_STATUS libnet_join_set_machine_upn(TALLOC_CTX *mem_ctx, return ADS_SUCCESS; } - if (!r->in.ads) { - status = libnet_join_connect_ads(mem_ctx, r); - if (!ADS_ERR_OK(status)) { - return status; - } - } - status = libnet_join_find_machine_acct(mem_ctx, r); if (!ADS_ERR_OK(status)) { return status; @@ -408,13 +394,6 @@ static ADS_STATUS libnet_join_set_os_attributes(TALLOC_CTX *mem_ctx, return ADS_SUCCESS; } - if (!r->in.ads) { - status = libnet_join_connect_ads(mem_ctx, r); - if (!ADS_ERR_OK(status)) { - return status; - } - } - status = libnet_join_find_machine_acct(mem_ctx, r); if (!ADS_ERR_OK(status)) { return status; @@ -525,6 +504,13 @@ static ADS_STATUS libnet_join_post_processing_ads(TALLOC_CTX *mem_ctx, { ADS_STATUS status; + if (!r->in.ads) { + status = libnet_join_connect_ads(mem_ctx, r); + if (!ADS_ERR_OK(status)) { + return status; + } + } + status = libnet_join_set_machine_spn(mem_ctx, r); if (!ADS_ERR_OK(status)) { libnet_join_set_error_string(mem_ctx, r, |