diff options
-rw-r--r-- | src/providers/ad/ad_dyndns.c | 1 | ||||
-rw-r--r-- | src/providers/dp_dyndns.c | 12 | ||||
-rw-r--r-- | src/providers/dp_dyndns.h | 2 | ||||
-rw-r--r-- | src/providers/ipa/ipa_dyndns.c | 16 | ||||
-rw-r--r-- | src/providers/ldap/sdap_dyndns.c | 13 | ||||
-rw-r--r-- | src/providers/ldap/sdap_dyndns.h | 1 |
6 files changed, 3 insertions, 42 deletions
diff --git a/src/providers/ad/ad_dyndns.c b/src/providers/ad/ad_dyndns.c index aac7d8b0a..5f8638128 100644 --- a/src/providers/ad/ad_dyndns.c +++ b/src/providers/ad/ad_dyndns.c @@ -233,7 +233,6 @@ ad_dyndns_update_send(struct ad_options *ctx) DP_OPT_DYNDNS_IFACE), dp_opt_get_string(ctx->basic, AD_HOSTNAME), - NULL, dp_opt_get_string(ctx->basic, AD_KRB5_REALM), state->servername, diff --git a/src/providers/dp_dyndns.c b/src/providers/dp_dyndns.c index 3171e6909..ae3f913ee 100644 --- a/src/providers/dp_dyndns.c +++ b/src/providers/dp_dyndns.c @@ -436,7 +436,7 @@ fail: errno_t be_nsupdate_create_fwd_msg(TALLOC_CTX *mem_ctx, const char *realm, - const char *zone, const char *servername, + const char *servername, const char *hostname, const unsigned int ttl, uint8_t remove_af, struct sss_iface_addr *addresses, char **_update_msg) @@ -459,16 +459,6 @@ be_nsupdate_create_fwd_msg(TALLOC_CTX *mem_ctx, const char *realm, goto done; } - if (zone) { - DEBUG(SSSDBG_FUNC_DATA, - "Setting the zone explicitly to [%s].\n", zone); - update_msg = talloc_asprintf_append(update_msg, "zone %s.\n", zone); - if (update_msg == NULL) { - ret = ENOMEM; - goto done; - } - } - update_msg = nsupdate_msg_add_fwd(update_msg, addresses, hostname, ttl, remove_af); if (update_msg == NULL) { diff --git a/src/providers/dp_dyndns.h b/src/providers/dp_dyndns.h index 3cc8d1226..9f72331b6 100644 --- a/src/providers/dp_dyndns.h +++ b/src/providers/dp_dyndns.h @@ -89,7 +89,7 @@ sss_iface_addr_list_as_str_list(TALLOC_CTX *mem_ctx, errno_t be_nsupdate_create_fwd_msg(TALLOC_CTX *mem_ctx, const char *realm, - const char *zone, const char *servername, + const char *servername, const char *hostname, const unsigned int ttl, uint8_t remove_af, struct sss_iface_addr *addresses, char **_update_msg); diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c index 83009ff2a..e7026eb27 100644 --- a/src/providers/ipa/ipa_dyndns.c +++ b/src/providers/ipa/ipa_dyndns.c @@ -153,9 +153,7 @@ ipa_dyndns_update_send(struct ipa_options *ctx) struct ipa_dyndns_update_state *state; struct tevent_req *req, *subreq; struct sdap_id_ctx *sdap_ctx = ctx->id_ctx->sdap_id_ctx; - char *dns_zone; const char *servername; - int i; DEBUG(SSSDBG_TRACE_FUNC, "Performing update\n"); @@ -175,19 +173,6 @@ ipa_dyndns_update_send(struct ipa_options *ctx) } state->ipa_ctx->dyndns_ctx->last_refresh = time(NULL); - dns_zone = dp_opt_get_string(ctx->basic, IPA_DOMAIN); - if (!dns_zone) { - ret = EIO; - goto done; - } - - /* The DNS zone for IPA is the lower-case - * version of the IPA domain - */ - for (i = 0; dns_zone[i] != '\0'; i++) { - dns_zone[i] = tolower(dns_zone[i]); - } - if (strncmp(ctx->service->sdap->uri, "ldap://", 7) != 0) { DEBUG(SSSDBG_CRIT_FAILURE, "Unexpected format of LDAP URI.\n"); @@ -209,7 +194,6 @@ ipa_dyndns_update_send(struct ipa_options *ctx) DP_OPT_DYNDNS_IFACE), dp_opt_get_string(ctx->basic, IPA_HOSTNAME), - dns_zone, dp_opt_get_string(ctx->basic, IPA_KRB5_REALM), servername, diff --git a/src/providers/ldap/sdap_dyndns.c b/src/providers/ldap/sdap_dyndns.c index 0f0e63ee2..f0e3dd855 100644 --- a/src/providers/ldap/sdap_dyndns.c +++ b/src/providers/ldap/sdap_dyndns.c @@ -47,7 +47,6 @@ struct sdap_dyndns_update_state { struct dp_option *opts; const char *hostname; - const char *dns_zone; const char *realm; const char *servername; int ttl; @@ -61,7 +60,6 @@ struct sdap_dyndns_update_state { enum be_nsupdate_auth auth_type; bool use_server_with_nsupdate; char *update_msg; - size_t pass_num; }; static void sdap_dyndns_update_addrs_done(struct tevent_req *subreq); @@ -82,7 +80,6 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, enum be_nsupdate_auth auth_type, const char *ifname, const char *hostname, - const char *dns_zone, const char *realm, const char *servername, const int ttl, @@ -101,7 +98,6 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, state->check_diff = check_diff; state->update_ptr = dp_opt_get_bool(opts, DP_OPT_DYNDNS_UPDATE_PTR); state->hostname = hostname; - state->dns_zone = dns_zone; state->realm = realm; state->servername = servername; state->use_server_with_nsupdate = false; @@ -110,7 +106,6 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, state->ev = ev; state->opts = opts; state->auth_type = auth_type; - state->pass_num = 0; /* fallback servername is overriden by user option */ conf_servername = dp_opt_get_string(opts, DP_OPT_DYNDNS_SERVER); @@ -317,7 +312,6 @@ sdap_dyndns_update_step(struct tevent_req *req) struct sdap_dyndns_update_state *state; const char *servername; struct tevent_req *subreq; - const char *dns_zone = NULL; state = tevent_req_data(req, struct sdap_dyndns_update_state); @@ -327,11 +321,7 @@ sdap_dyndns_update_step(struct tevent_req *req) servername = state->servername; } - if (state->pass_num > 0) { - dns_zone = state->dns_zone; - } - - ret = be_nsupdate_create_fwd_msg(state, state->realm, dns_zone, + ret = be_nsupdate_create_fwd_msg(state, state->realm, servername, state->hostname, state->ttl, state->remove_af, state->addresses, @@ -340,7 +330,6 @@ sdap_dyndns_update_step(struct tevent_req *req) DEBUG(SSSDBG_OP_FAILURE, "Can't get addresses for DNS update\n"); return ret; } - state->pass_num++; /* Fork a child process to perform the DNS update */ subreq = be_nsupdate_send(state, state->ev, state->auth_type, diff --git a/src/providers/ldap/sdap_dyndns.h b/src/providers/ldap/sdap_dyndns.h index 7aaff5d2c..a9481b794 100644 --- a/src/providers/ldap/sdap_dyndns.h +++ b/src/providers/ldap/sdap_dyndns.h @@ -39,7 +39,6 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, enum be_nsupdate_auth auth_type, const char *ifname, const char *hostname, - const char *dns_zone, const char *realm, const char *servername, const int ttl, |