From b6dfbf81c61d4431aaa81687ec53e892f8b71edb Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 25 Apr 2012 09:16:41 +0200 Subject: Allow different SID representations in libidmap Besides as strings it is now possible to use binary SIDs or a struct containing all SID information. Functions to convert between these formats are added as well. --- src/lib/idmap/sss_idmap_private.h | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/lib/idmap/sss_idmap_private.h (limited to 'src/lib/idmap/sss_idmap_private.h') diff --git a/src/lib/idmap/sss_idmap_private.h b/src/lib/idmap/sss_idmap_private.h new file mode 100644 index 00000000..776c56ab --- /dev/null +++ b/src/lib/idmap/sss_idmap_private.h @@ -0,0 +1,41 @@ +/* + SSSD + + ID-mapping library - private headers + + Authors: + Sumit Bose + + 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 . +*/ + +#ifndef SSS_IDMAP_PRIVATE_H_ +#define SSS_IDMAP_PRIVATE_H_ + +#define CHECK_IDMAP_CTX(ctx, ret) do { \ + if (ctx == NULL || ctx->alloc_func == NULL || ctx->free_func == NULL) { \ + return ret; \ + } \ +} while(0) + +struct sss_idmap_ctx { + idmap_alloc_func *alloc_func; + void *alloc_pvt; + idmap_free_func *free_func; + struct idmap_domain_info *idmap_domain_info; +}; + +#endif /* SSS_IDMAP_PRIVATE_H_ */ -- cgit