diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-06 22:53:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-08-14 23:51:02 +0200 |
commit | 8145ab51b05aa86b2f1a21b49383f55e50b0a2e3 (patch) | |
tree | 6889f7d6cb72299d7d778ddbb3c9157e230e1a09 /src/providers | |
parent | db5f9ab3feb85aa444eab20428ca2b98801b6783 (diff) | |
download | sssd-8145ab51b05aa86b2f1a21b49383f55e50b0a2e3.tar.gz sssd-8145ab51b05aa86b2f1a21b49383f55e50b0a2e3.tar.xz sssd-8145ab51b05aa86b2f1a21b49383f55e50b0a2e3.zip |
DYNDNS: Add a new option dyndns_server
Some environments use a different DNS server than identity server. For
these environments, it would be useful to be able to override the DNS
server used to perform DNS updates.
This patch adds a new option dyndns_server that, if set, would be used
to hardcode a DNS server address into the nsupdate message.
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ad/ad_opts.h | 1 | ||||
-rw-r--r-- | src/providers/dp_dyndns.c | 1 | ||||
-rw-r--r-- | src/providers/dp_dyndns.h | 1 | ||||
-rw-r--r-- | src/providers/ipa/ipa_opts.h | 1 | ||||
-rw-r--r-- | src/providers/ldap/sdap_dyndns.c | 7 |
5 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ad/ad_opts.h b/src/providers/ad/ad_opts.h index d685edcb4..00586a7ad 100644 --- a/src/providers/ad/ad_opts.h +++ b/src/providers/ad/ad_opts.h @@ -275,6 +275,7 @@ struct dp_option ad_dyndns_opts[] = { { "dyndns_update_ptr", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE }, { "dyndns_force_tcp", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, { "dyndns_auth", DP_OPT_STRING, { "gss-tsig" }, NULL_STRING }, + { "dyndns_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, DP_OPTION_TERMINATOR }; diff --git a/src/providers/dp_dyndns.c b/src/providers/dp_dyndns.c index c254d7893..9a726bd43 100644 --- a/src/providers/dp_dyndns.c +++ b/src/providers/dp_dyndns.c @@ -1180,6 +1180,7 @@ static struct dp_option default_dyndns_opts[] = { { "dyndns_update_ptr", DP_OPT_BOOL, BOOL_TRUE, BOOL_FALSE }, { "dyndns_force_tcp", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, { "dyndns_auth", DP_OPT_STRING, { "gss-tsig" }, NULL_STRING }, + { "dyndns_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, DP_OPTION_TERMINATOR }; diff --git a/src/providers/dp_dyndns.h b/src/providers/dp_dyndns.h index a8a20ec6f..3cc8d1226 100644 --- a/src/providers/dp_dyndns.h +++ b/src/providers/dp_dyndns.h @@ -55,6 +55,7 @@ enum dp_dyndns_opts { DP_OPT_DYNDNS_UPDATE_PTR, DP_OPT_DYNDNS_FORCE_TCP, DP_OPT_DYNDNS_AUTH, + DP_OPT_DYNDNS_SERVER, DP_OPT_DYNDNS /* attrs counter */ }; diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h index f6c40dddb..78949e3dd 100644 --- a/src/providers/ipa/ipa_opts.h +++ b/src/providers/ipa/ipa_opts.h @@ -62,6 +62,7 @@ struct dp_option ipa_dyndns_opts[] = { { "dyndns_update_ptr", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, { "dyndns_force_tcp", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, { "dyndns_auth", DP_OPT_STRING, { "gss-tsig" }, NULL_STRING }, + { "dyndns_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, DP_OPTION_TERMINATOR }; diff --git a/src/providers/ldap/sdap_dyndns.c b/src/providers/ldap/sdap_dyndns.c index a463a2fce..01f4f1722 100644 --- a/src/providers/ldap/sdap_dyndns.c +++ b/src/providers/ldap/sdap_dyndns.c @@ -92,6 +92,7 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, struct tevent_req *req; struct tevent_req *subreq; struct sdap_dyndns_update_state *state; + const char *conf_servername; req = tevent_req_create(mem_ctx, &state, struct sdap_dyndns_update_state); if (req == NULL) { @@ -111,6 +112,12 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx, state->auth_type = auth_type; state->pass_num = 0; + conf_servername = dp_opt_get_string(opts, DP_OPT_DYNDNS_SERVER); + if (conf_servername != NULL) { + state->servername = conf_servername; + state->use_server_with_nsupdate = true; + } + if (ifname) { /* Unless one family is restricted, just replace all * address families during the update |