ad_common.c revision ba4a81e933deebb416603369b447ead6ebaa040d
2ronwalf along with this program. If not, see <http://www.gnu.org/licenses/>.
2ronwalf#include "providers/ad/ad_common.h"
2ronwalf#include "providers/dp_dyndns.h"
2ronwalfstruct ad_server_data {
static struct sdap_options *
if (!id_opts) {
return NULL;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
return id_opts;
fail:
return NULL;
struct ad_options *
const char *realm,
const char *hostname)
return NULL;
return NULL;
return NULL;
return NULL;
return NULL;
return ad_options;
static errno_t
const char *conf_path,
if (!id_opts) {
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
done:
return ret;
const char *conf_path,
int gret;
char *domain;
char *server;
char *realm;
char *ad_hostname;
goto done;
if (!domain) {
goto done;
if (!server) {
if (gret != 0) {
goto done;
goto done;
if (!realm) {
goto done;
goto done;
goto done;
done:
return ret;
static errno_t
const char *fo_service,
const char *fo_gc_service,
const char *servers,
const char *ad_domain,
bool primary)
size_t i;
char **list;
goto done;
for (i = 0; list[i]; i++) {
if (!primary) {
list[i]));
goto done;
false, sdata);
goto done;
goto done;
false, sdata);
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
done:
return ret;
static inline errno_t
const char *ad_domain)
static inline errno_t
const char *ad_domain)
const char *primary_servers,
const char *backup_servers,
const char *krb5_realm,
const char *ad_service,
const char *ad_gc_service,
const char *ad_domain,
if (!service) {
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
if (!krb5_realm) {
goto done;
goto done;
if (!primary_servers) {
goto done;
if (backup_servers) {
goto done;
return ret;
goto done;
goto done;
done:
return ret;
char *address;
const char *safe_address;
char *new_uri;
int new_port;
const char *srv_name;
if (!tmp_ctx) {
if (!service) {
goto done;
if (!srvaddr) {
goto done;
goto done;
goto done;
if (!new_uri) {
goto done;
goto done;
new_port);
sizeof(struct sockaddr_storage));
goto done;
goto done;
address);
goto done;
done:
static errno_t
char *krb5_realm;
char *keytab_path;
goto done;
if (!krb5_realm) {
goto done;
krb5_realm));
if (keytab_path) {
keytab_path));
goto done;
done:
return ret;
const char *conf_path,
return ENOMEM;
return ret;
NULL);
return ret;
return ret;
return EOK;
char *default_search_base;
size_t o;
if (default_search_base) {
search_base_options[o])) {
goto done;
search_base_options[o])));
done:
return ret;
const char *ad_servers;
const char *krb5_realm;
&krb5_options);
goto done;
ad_servers));
if (!krb5_realm) {
goto done;
krb5_realm));
done:
return ret;
return ret;
return EOK;
struct ad_id_ctx *
return NULL;
return NULL;
return NULL;
return ad_ctx;
struct sdap_id_conn_ctx *
return NULL;
return conn;
struct sdap_id_conn_ctx **
int cindex = 0;
return clist;
cindex++;
return clist;