sdap_idmap.h revision bfb40893be20b45279a40188cf16ef0eec1f9423
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere/*
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere SSSD
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere Authors:
8468be3efdd76e64e871fe3799397721f988ff42noodl Stephen Gallagher <sgallagh@redhat.com>
a0150d3262def12738daa9eb9d47bd34fe918b9algentis
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere Copyright (C) 2012 Red Hat
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere This program is free software; you can redistribute it and/or modify
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere it under the terms of the GNU General Public License as published by
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere the Free Software Foundation; either version 3 of the License, or
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere (at your option) any later version.
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere This program is distributed in the hope that it will be useful,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere but WITHOUT ANY WARRANTY; without even the implied warranty of
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere GNU General Public License for more details.
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere You should have received a copy of the GNU General Public License
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere along with this program. If not, see <http://www.gnu.org/licenses/>.
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere*/
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere#ifndef SDAP_IDMAP_H_
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere#define SDAP_IDMAP_H_
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere#include "src/providers/ldap/sdap.h"
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere#include "src/providers/ldap/ldap_common.h"
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfcleretypedef errno_t (find_new_domain_fn_t)(struct sdap_idmap_ctx *idmap_ctx,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere const char *dom_name,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere const char *dom_sid_str);
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclerestruct sdap_idmap_ctx {
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere struct sss_idmap_ctx *map;
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere struct sdap_id_ctx *id_ctx;
486f2b10850d759f95ed4682a22ba196337a5f1clgentis find_new_domain_fn_t *find_new_domain;
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere};
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclereerrno_t sdap_idmap_init(TALLOC_CTX *mem_ctx,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere struct sdap_id_ctx *id_ctx,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere struct sdap_idmap_ctx **_idmap_ctx);
999942e8e84bcae9b439ab30a040b1b997b343c9gryzor
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclereerrno_t
e3659090e9bb9934465dbb6c6212ba4c512190b0jfcleresdap_idmap_add_domain(struct sdap_idmap_ctx *idmap_ctx,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere const char *dom_name,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere const char *dom_sid,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere id_t slice);
486f2b10850d759f95ed4682a22ba196337a5f1clgentis
999942e8e84bcae9b439ab30a040b1b997b343c9gryzorerrno_t
fc18300f84cb9535e8ccf81dfb8b700012878af4lgentissdap_idmap_get_dom_sid_from_object(TALLOC_CTX *mem_ctx,
fc18300f84cb9535e8ccf81dfb8b700012878af4lgentis const char *object_sid,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere char **dom_sid_str);
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclereerrno_t
e3659090e9bb9934465dbb6c6212ba4c512190b0jfcleresdap_idmap_sid_to_unix(struct sdap_idmap_ctx *idmap_ctx,
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere const char *sid_str,
8468be3efdd76e64e871fe3799397721f988ff42noodl id_t *id);
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere
e3659090e9bb9934465dbb6c6212ba4c512190b0jfclere#endif /* SDAP_IDMAP_H_ */
999942e8e84bcae9b439ab30a040b1b997b343c9gryzor