ldap_common.c revision 16d6c2d2030f0869eed2a8d163cc1cc1bd788838
4006N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
4006N/A#include "providers/ldap/ldap_common.h"
4006N/A#include "providers/fail_over.h"
4006N/A#include "providers/ldap/sdap_async_private.h"
4006N/A#include "providers/krb5/krb5_common.h"
4006N/A#include "db/sysdb_sudo.h"
4006N/A#include "db/sysdb_services.h"
4006N/A#include "db/sysdb_autofs.h"
7161N/A#include "util/sss_krb5.h"
4006N/A#include "util/crypto/sss_crypto.h"
4006N/A#include "providers/ldap/sdap_idmap.h"
if (!new_uri) {
int signum,
int count,
void *siginfo,
void *private_data)
int ret;
orderly_shutdown(0);
const char *realm)
char *sig_realm;
return ENOMEM;
return ENOMEM;
return EOK;
int ret;
struct remove_info_files_ctx);
const char *realm,
const char *service_name)
int ret;
return ENOMEM;
goto done;
goto done;
done:
return ret;
char *default_primary,
char *default_realm,
const char *keytab_path)
char *sasl_primary;
char *desired_primary;
char *primary_realm;
char *sasl_realm;
char *desired_realm;
bool primary_requested = true;
bool realm_requested = true;
if (!desired_primary) {
primary_requested = false;
if (!desired_realm) {
realm_requested = false;
goto done;
goto done;
goto done;
done:
return ret;
if (krberr) {
goto done;
if (krberr) {
goto done;
if (!realm) {
goto done;
done:
return realm;
int ret;
const char *krb5_servers;
const char *krb5_backup_servers;
const char *krb5_realm;
const char *krb5_opt_realm;
goto done;
goto done;
&service);
goto done;
goto done;
goto done;
goto done;
done:
return ret;
const char *service_name,
const char *dns_service_name,
const char *urls,
bool primary)
char *srv_user_data;
if (!tmp_ctx) {
return ENOMEM;
goto done;
for (i = 0; list[i]; i++) {
if (!primary) {
list[i]);
if (!dns_service_name) {
goto done;
if (!srv_user_data) {
goto done;
if (ret) {
goto done;
goto done;
list[i]);
goto done;
if (ret) {
goto done;
done:
return ret;
static inline errno_t
const char *urls)
static inline errno_t
const char *urls)
int ret;
if (!tmp_ctx) {
return ENOMEM;
if (!service) {
goto done;
goto done;
goto done;
if (!urls) {
urls);
goto done;
if (backup_urls) {
goto done;
goto done;
done:
return ret;
char *endptr;
return EOK;
errno = 0;
if (errno != 0) {
return errno;
return EINVAL;
return EINVAL;
return EOK;
const char *ldap_name,
char **sysdb_name)
size_t i;
for (i = 0; i < map_size; i++) {
if (i < map_size) {
if (!*sysdb_name) {
return ENOMEM;
return EOK;
char ***missing_attrs)
size_t i, j, k;
const char **expected_attrs;
char *sysdb_name;
return EINVAL;
if (!tmp_ctx) {
return ENOMEM;
goto done;
if (!missing) {
goto done;
for (i = 0; i < attr_count; i++) {
expected_attrs[i],
&sysdb_name);
goto done;
done:
return ret;
const char *base_filter)
return filter;
const char *sid_attr,
char **_sid_str)
char *sid_str;
return ENOENT;
return ENOMEM;
&sid_str);
return EIO;
return EOK;
struct sdap_id_conn_ctx *
return NULL;
return NULL;
return conn;
struct sdap_id_ctx *
return NULL;
return NULL;
return sdap_ctx;