summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2012-09-19 15:31:57 +0200
committerGünther Deschner <gd@samba.org>2012-10-02 16:22:31 +0200
commita2fec69b0958f75e31c702e25017eeae6a92be0d (patch)
tree4814d876ea5d53bf384417866c394977485b3b96 /source3
parent06f3b1f0b0dcf9355a8d634cdb62f1f0a8ea4dbe (diff)
downloadsamba-a2fec69b0958f75e31c702e25017eeae6a92be0d.tar.gz
samba-a2fec69b0958f75e31c702e25017eeae6a92be0d.tar.bz2
samba-a2fec69b0958f75e31c702e25017eeae6a92be0d.zip
s3-net: pass down struct net_context to the dns update calls.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_ads.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index b1d55f10b0..3b671fc600 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1131,7 +1131,8 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
const struct sockaddr_storage *sslist,
size_t num_addrs );
-static NTSTATUS net_update_dns_internal(TALLOC_CTX *ctx, ADS_STRUCT *ads,
+static NTSTATUS net_update_dns_internal(struct net_context *c,
+ TALLOC_CTX *ctx, ADS_STRUCT *ads,
const char *machine_name,
const struct sockaddr_storage *addrs,
int num_addrs)
@@ -1242,7 +1243,8 @@ done:
return status;
}
-static NTSTATUS net_update_dns_ext(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads,
+static NTSTATUS net_update_dns_ext(struct net_context *c,
+ TALLOC_CTX *mem_ctx, ADS_STRUCT *ads,
const char *hostname,
struct sockaddr_storage *iplist,
int num_addrs)
@@ -1274,18 +1276,18 @@ static NTSTATUS net_update_dns_ext(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads,
iplist = iplist_alloc;
}
- status = net_update_dns_internal(mem_ctx, ads, machine_name,
+ status = net_update_dns_internal(c, mem_ctx, ads, machine_name,
iplist, num_addrs);
SAFE_FREE(iplist_alloc);
return status;
}
-static NTSTATUS net_update_dns(TALLOC_CTX *mem_ctx, ADS_STRUCT *ads, const char *hostname)
+static NTSTATUS net_update_dns(struct net_context *c, TALLOC_CTX *mem_ctx, ADS_STRUCT *ads, const char *hostname)
{
NTSTATUS status;
- status = net_update_dns_ext(mem_ctx, ads, hostname, NULL, 0);
+ status = net_update_dns_ext(c, mem_ctx, ads, hostname, NULL, 0);
return status;
}
#endif
@@ -1315,7 +1317,7 @@ static int net_ads_join_usage(struct net_context *c, int argc, const char **argv
}
-static void _net_ads_join_dns_updates(TALLOC_CTX *ctx, struct libnet_JoinCtx *r)
+static void _net_ads_join_dns_updates(struct net_context *c, TALLOC_CTX *ctx, struct libnet_JoinCtx *r)
{
#if defined(WITH_DNS_UPDATES)
ADS_STRUCT *ads_dns = NULL;
@@ -1389,7 +1391,7 @@ static void _net_ads_join_dns_updates(TALLOC_CTX *ctx, struct libnet_JoinCtx *r)
goto done;
}
- status = net_update_dns(ctx, ads_dns, NULL);
+ status = net_update_dns(c, ctx, ads_dns, NULL);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf( stderr, _("DNS update failed: %s\n"),
nt_errstr(status));
@@ -1545,7 +1547,7 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
* If the dns update fails, we still consider the join
* operation as succeeded if we came this far.
*/
- _net_ads_join_dns_updates(ctx, r);
+ _net_ads_join_dns_updates(c, ctx, r);
TALLOC_FREE(r);
TALLOC_FREE( ctx );
@@ -1641,7 +1643,7 @@ static int net_ads_dns_register(struct net_context *c, int argc, const char **ar
return -1;
}
- ntstatus = net_update_dns_ext(ctx, ads, hostname, addrs, num_addrs);
+ ntstatus = net_update_dns_ext(c, ctx, ads, hostname, addrs, num_addrs);
if (!NT_STATUS_IS_OK(ntstatus)) {
d_fprintf( stderr, _("DNS update failed!\n") );
ads_destroy( &ads );