ad_common.c revision 266110fa0f6eb086f8f88787bb167cea416fe108
b27c7f227c8516589a2bd127c0f74338cf56f0b2Julian Kornberger Stephen Gallagher <sgallagh@redhat.com>
7b8fe34340b2727bb31fe0be67fdf684e47c3609Tim Reddehase Copyright (C) 2012 Red Hat
250e5c1ec05ffb6d1b933f913c3c65934b206957Eugen Kuksa This program is free software; you can redistribute it and/or modify
250e5c1ec05ffb6d1b933f913c3c65934b206957Eugen Kuksa it under the terms of the GNU General Public License as published by
83fda1d7ef5feb39a07c88d231d2343e89057b98Eugen Kuksa the Free Software Foundation; either version 3 of the License, or
83fda1d7ef5feb39a07c88d231d2343e89057b98Eugen Kuksa (at your option) any later version.
along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <ctype.h>
#include "providers/ad/ad_common.h"
#include "providers/dp_dyndns.h"
struct ad_server_data {
bool gc;
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;
cindex++;
return clist;