diff options
author | Sumit Bose <sbose@redhat.com> | 2012-04-25 09:16:41 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-01 14:22:51 -0400 |
commit | b6dfbf81c61d4431aaa81687ec53e892f8b71edb (patch) | |
tree | 783f2e567335b2a57f8a21ee99847bfb05add78d /src/lib/idmap/sss_idmap_private.h | |
parent | c8a124ac1b03d83016bda02cad5a369ce6fb1cd7 (diff) | |
download | sssd-b6dfbf81c61d4431aaa81687ec53e892f8b71edb.tar.gz sssd-b6dfbf81c61d4431aaa81687ec53e892f8b71edb.tar.bz2 sssd-b6dfbf81c61d4431aaa81687ec53e892f8b71edb.zip |
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.
Diffstat (limited to 'src/lib/idmap/sss_idmap_private.h')
-rw-r--r-- | src/lib/idmap/sss_idmap_private.h | 41 |
1 files changed, 41 insertions, 0 deletions
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 <sbose@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 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_ */ |