summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_idmap.h
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-04-22 13:52:51 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-03 14:09:13 -0400
commit505e75ba28b42bb3de7a6d55de825091b70cc2b2 (patch)
tree30ea6812c9142ba218bb0b5efdb6c30d9226df16 /src/providers/ldap/sdap_idmap.h
parent817b1bcafff27cc67630dd0cbd36df708c05fccc (diff)
downloadsssd-505e75ba28b42bb3de7a6d55de825091b70cc2b2.tar.gz
sssd-505e75ba28b42bb3de7a6d55de825091b70cc2b2.tar.xz
sssd-505e75ba28b42bb3de7a6d55de825091b70cc2b2.zip
LDAP: Add helper routines for ID-mapping
Diffstat (limited to 'src/providers/ldap/sdap_idmap.h')
-rw-r--r--src/providers/ldap/sdap_idmap.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_idmap.h b/src/providers/ldap/sdap_idmap.h
new file mode 100644
index 000000000..9ac8be133
--- /dev/null
+++ b/src/providers/ldap/sdap_idmap.h
@@ -0,0 +1,52 @@
+/*
+ SSSD
+
+ Authors:
+ Stephen Gallagher <sgallagh@redhat.com>
+
+ Copyright (C) 2012 Red Hat
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef SDAP_IDMAP_H_
+#define SDAP_IDMAP_H_
+
+#include "src/providers/ldap/sdap.h"
+#include "src/providers/ldap/ldap_common.h"
+
+struct sdap_idmap_slice {
+ struct sdap_idmap_slice *prev;
+ struct sdap_idmap_slice *next;
+
+ id_t slice_num;
+};
+
+struct sdap_idmap_ctx {
+ struct sss_idmap_ctx *map;
+ struct sdap_idmap_slice *slices;
+
+ struct sdap_id_ctx *id_ctx;
+};
+
+errno_t sdap_idmap_init(TALLOC_CTX *mem_ctx,
+ struct sdap_id_ctx *id_ctx,
+ struct sdap_idmap_ctx **_idmap_ctx);
+
+errno_t
+sdap_idmap_add_domain(struct sdap_idmap_ctx *idmap_ctx,
+ const char *dom_name,
+ const char *dom_sid,
+ id_t slice);
+#endif /* SDAP_IDMAP_H_ */