ad_dyndns.c revision 12a1c64105ff56b39e197264fec2d9aba6b84185
/*
SSSD
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include "providers/ldap/sdap_dyndns.h"
#include "providers/data_provider.h"
#include "providers/dp_dyndns.h"
#include "providers/ad/ad_common.h"
void ad_dyndns_update(void *pvt);
struct ad_options *ad_opts)
{
/* nsupdate is available. Dynamic updates
* are supported
*/
return ret;
}
DP_OPT_DYNDNS_UPDATE) == false) {
return EOK;
}
"Dynamic DNS updates are on. Checking for nsupdate..\n");
ret = be_nsupdate_check();
"DNS updates requested but nsupdate not available\n");
return EOK;
return ret;
}
"to use the AD dynamic DNS updates\n");
return EINVAL;
}
return ret;
}
return ret;
}
return EOK;
}
void ad_dyndns_timer(void *pvt)
{
struct tevent_req *req;
ctx->dyndns_ctx);
/* Not much we can do. Just attempt to reschedule */
return;
}
}
{
return;
}
return ad_dyndns_update(ctx);
}
void ad_dyndns_update(void *pvt)
{
struct tevent_req *req;
/* Schedule timer after provider went offline */
return;
}
}
{
return;
}
}
struct ad_dyndns_update_state {
struct ad_options *ad_ctx;
};
static struct tevent_req *
{
int ret;
struct ad_dyndns_update_state *state;
return NULL;
}
"in progress, not scheduling another update\n");
return req;
}
if (ret != LDAP_SUCCESS) {
goto done;
}
"The LDAP scheme is ldapi://, cannot proceed with update\n");
goto done;
}
"The LDAP URI (%s) did not contain a host name\n",
goto done;
}
false);
if (!subreq) {
"sdap_id_op_connect_send failed: [%d](%s)\n",
goto done;
}
done:
}
return req;
}
{
struct tevent_req);
"Dynamic DNS update failed [%d]: %s\n",
return;
}
}
{
return EOK;
}