|
|
6cf099 |
From 9941803301b127d9326283b7eee9ad29f462574f Mon Sep 17 00:00:00 2001
|
|
|
6cf099 |
From: Pavel Reichl <preichl@redhat.com>
|
|
|
6cf099 |
Date: Thu, 23 Jul 2015 09:52:47 -0400
|
|
|
6cf099 |
Subject: [PATCH 88/90] DYNDNS: rename field of sdap_dyndns_update_state
|
|
|
6cf099 |
|
|
|
6cf099 |
Rename 'use_server_with_nsupdate' to more general name 'fallback_mode'.
|
|
|
6cf099 |
|
|
|
6cf099 |
Resolves:
|
|
|
6cf099 |
https://fedorahosted.org/sssd/ticket/2495
|
|
|
6cf099 |
|
|
|
6cf099 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
6cf099 |
(cherry picked from commit 76604931b11594394a05df10f8370a1b8bb3e54b)
|
|
|
6cf099 |
---
|
|
|
6cf099 |
src/providers/ldap/sdap_dyndns.c | 16 ++++++++--------
|
|
|
6cf099 |
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
6cf099 |
|
|
|
6cf099 |
diff --git a/src/providers/ldap/sdap_dyndns.c b/src/providers/ldap/sdap_dyndns.c
|
|
|
6cf099 |
index f0e3dd855005d00ea19cb5dc283375f58b0d2cca..2a179fd1b5e88bdf2442657ff6fa1dcc55417467 100644
|
|
|
6cf099 |
--- a/src/providers/ldap/sdap_dyndns.c
|
|
|
6cf099 |
+++ b/src/providers/ldap/sdap_dyndns.c
|
|
|
6cf099 |
@@ -58,7 +58,7 @@ struct sdap_dyndns_update_state {
|
|
|
6cf099 |
bool update_ptr;
|
|
|
6cf099 |
bool check_diff;
|
|
|
6cf099 |
enum be_nsupdate_auth auth_type;
|
|
|
6cf099 |
- bool use_server_with_nsupdate;
|
|
|
6cf099 |
+ bool fallback_mode;
|
|
|
6cf099 |
char *update_msg;
|
|
|
6cf099 |
};
|
|
|
6cf099 |
|
|
|
6cf099 |
@@ -100,7 +100,7 @@ sdap_dyndns_update_send(TALLOC_CTX *mem_ctx,
|
|
|
6cf099 |
state->hostname = hostname;
|
|
|
6cf099 |
state->realm = realm;
|
|
|
6cf099 |
state->servername = servername;
|
|
|
6cf099 |
- state->use_server_with_nsupdate = false;
|
|
|
6cf099 |
+ state->fallback_mode = false;
|
|
|
6cf099 |
state->ttl = ttl;
|
|
|
6cf099 |
state->be_res = be_ctx->be_res;
|
|
|
6cf099 |
state->ev = ev;
|
|
|
6cf099 |
@@ -316,7 +316,7 @@ sdap_dyndns_update_step(struct tevent_req *req)
|
|
|
6cf099 |
state = tevent_req_data(req, struct sdap_dyndns_update_state);
|
|
|
6cf099 |
|
|
|
6cf099 |
servername = NULL;
|
|
|
6cf099 |
- if (state->use_server_with_nsupdate == true &&
|
|
|
6cf099 |
+ if (state->fallback_mode == true &&
|
|
|
6cf099 |
state->servername) {
|
|
|
6cf099 |
servername = state->servername;
|
|
|
6cf099 |
}
|
|
|
6cf099 |
@@ -359,9 +359,9 @@ sdap_dyndns_update_done(struct tevent_req *subreq)
|
|
|
6cf099 |
talloc_zfree(subreq);
|
|
|
6cf099 |
if (ret != EOK) {
|
|
|
6cf099 |
/* If the update didn't succeed, we can retry using the server name */
|
|
|
6cf099 |
- if (state->use_server_with_nsupdate == false && state->servername &&
|
|
|
6cf099 |
+ if (state->fallback_mode == false && state->servername &&
|
|
|
6cf099 |
WIFEXITED(child_status) && WEXITSTATUS(child_status) != 0) {
|
|
|
6cf099 |
- state->use_server_with_nsupdate = true;
|
|
|
6cf099 |
+ state->fallback_mode = true;
|
|
|
6cf099 |
DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
6cf099 |
"nsupdate failed, retrying with server name\n");
|
|
|
6cf099 |
ret = sdap_dyndns_update_step(req);
|
|
|
6cf099 |
@@ -400,7 +400,7 @@ sdap_dyndns_update_ptr_step(struct tevent_req *req)
|
|
|
6cf099 |
state = tevent_req_data(req, struct sdap_dyndns_update_state);
|
|
|
6cf099 |
|
|
|
6cf099 |
servername = NULL;
|
|
|
6cf099 |
- if (state->use_server_with_nsupdate == true &&
|
|
|
6cf099 |
+ if (state->fallback_mode == true &&
|
|
|
6cf099 |
state->servername) {
|
|
|
6cf099 |
servername = state->servername;
|
|
|
6cf099 |
}
|
|
|
6cf099 |
@@ -443,9 +443,9 @@ sdap_dyndns_update_ptr_done(struct tevent_req *subreq)
|
|
|
6cf099 |
talloc_zfree(subreq);
|
|
|
6cf099 |
if (ret != EOK) {
|
|
|
6cf099 |
/* If the update didn't succeed, we can retry using the server name */
|
|
|
6cf099 |
- if (state->use_server_with_nsupdate == false && state->servername &&
|
|
|
6cf099 |
+ if (state->fallback_mode == false && state->servername &&
|
|
|
6cf099 |
WIFEXITED(child_status) && WEXITSTATUS(child_status) != 0) {
|
|
|
6cf099 |
- state->use_server_with_nsupdate = true;
|
|
|
6cf099 |
+ state->fallback_mode = true;
|
|
|
6cf099 |
DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
6cf099 |
"nsupdate failed, retrying with server name\n");
|
|
|
6cf099 |
ret = sdap_dyndns_update_ptr_step(req);
|
|
|
6cf099 |
--
|
|
|
6cf099 |
2.4.3
|
|
|
6cf099 |
|