diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-02 07:48:26 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-16 13:28:14 -0400 |
commit | 48a038d077ed2de18a5211e010c18ab680107293 (patch) | |
tree | 935c9f46ddf480f9482ed545b5dfda0e0a739112 /src/providers/ldap | |
parent | af971fb6cf853c3a5f41aa00918013903aba1ff3 (diff) | |
download | sssd-48a038d077ed2de18a5211e010c18ab680107293.tar.gz sssd-48a038d077ed2de18a5211e010c18ab680107293.tar.bz2 sssd-48a038d077ed2de18a5211e010c18ab680107293.zip |
Add dynamic DNS updates to FreeIPA
This adds two new options:
ipa_dyndns_update: Boolean value to select whether this client
should automatically update its IP address in FreeIPA DNS.
ipa_dyndns_iface: Choose an interface manually to use for
updating dynamic DNS. Default is to use the interface associated
with the LDAP connection to FreeIPA.
This patch supports A and AAAA records. It relies on the presence
of the nsupdate tool from the bind-utils package to perform the
actual update step. The location of this utility is set at build
time, but its availability is determined at runtime (so clients
that do not require dynamic update capability do not need to meet
this dependency).
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/sdap_async_private.h | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_fd_events.c | 28 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/providers/ldap/sdap_async_private.h b/src/providers/ldap/sdap_async_private.h index 75597c6d..c74a7e60 100644 --- a/src/providers/ldap/sdap_async_private.h +++ b/src/providers/ldap/sdap_async_private.h @@ -34,6 +34,8 @@ void sdap_ldap_result(struct tevent_context *ev, struct tevent_fd *fde, int setup_ldap_connection_callbacks(struct sdap_handle *sh, struct tevent_context *ev); +int get_fd_from_ldap(LDAP *ldap, int *fd); + errno_t sdap_set_connected(struct sdap_handle *sh, struct tevent_context *ev); int sdap_op_add(TALLOC_CTX *memctx, struct tevent_context *ev, diff --git a/src/providers/ldap/sdap_fd_events.c b/src/providers/ldap/sdap_fd_events.c index 11527789..32782963 100644 --- a/src/providers/ldap/sdap_fd_events.c +++ b/src/providers/ldap/sdap_fd_events.c @@ -33,6 +33,20 @@ struct sdap_fd_events { #endif }; +int get_fd_from_ldap(LDAP *ldap, int *fd) +{ + int ret; + + ret = ldap_get_option(ldap, LDAP_OPT_DESC, fd); + if (ret != LDAP_OPT_SUCCESS) { + DEBUG(1, ("Failed to get fd from ldap!!\n")); + *fd = -1; + return EIO; + } + + return EOK; +} + #ifdef HAVE_LDAP_CONNCB static int remove_connection_callback(TALLOC_CTX *mem_ctx) { @@ -135,20 +149,6 @@ static void sdap_ldap_connect_callback_del(LDAP *ld, Sockbuf *sb, #else -static int get_fd_from_ldap(LDAP *ldap, int *fd) -{ - int ret; - - ret = ldap_get_option(ldap, LDAP_OPT_DESC, fd); - if (ret != LDAP_OPT_SUCCESS) { - DEBUG(1, ("Failed to get fd from ldap!!\n")); - *fd = -1; - return EIO; - } - - return EOK; -} - static int sdap_install_ldap_callbacks(struct sdap_handle *sh, struct tevent_context *ev) { |