sss_nss_idmap
1.15.3
|
00001 /* 00002 SSSD 00003 00004 NSS Responder ID-mapping interface 00005 00006 Authors: 00007 Sumit Bose <sbose@redhat.com> 00008 00009 Copyright (C) 2013 Red Hat 00010 00011 This program is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation; either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 #ifndef SSS_NSS_IDMAP_H_ 00026 #define SSS_NSS_IDMAP_H_ 00027 00028 #include <stdint.h> 00029 00033 enum sss_id_type { 00034 SSS_ID_TYPE_NOT_SPECIFIED = 0, 00035 SSS_ID_TYPE_UID, 00036 SSS_ID_TYPE_GID, 00037 SSS_ID_TYPE_BOTH /* used for user or magic private groups */ 00038 }; 00039 00040 struct sss_nss_kv { 00041 char *key; 00042 char *value; 00043 }; 00044 00062 int sss_nss_getsidbyname(const char *fq_name, char **sid, 00063 enum sss_id_type *type); 00064 00076 int sss_nss_getsidbyid(uint32_t id, char **sid, enum sss_id_type *type); 00077 00089 int sss_nss_getnamebysid(const char *sid, char **fq_name, 00090 enum sss_id_type *type); 00091 00102 int sss_nss_getidbysid(const char *sid, uint32_t *id, 00103 enum sss_id_type *id_type); 00104 00123 int sss_nss_getorigbyname(const char *fq_name, struct sss_nss_kv **kv_list, 00124 enum sss_id_type *type); 00125 00138 int sss_nss_getnamebycert(const char *cert, char **fq_name, 00139 enum sss_id_type *type); 00140 00153 int sss_nss_getlistbycert(const char *cert, char ***fq_name, 00154 enum sss_id_type **type); 00155 00161 void sss_nss_free_kv(struct sss_nss_kv *kv_list); 00162 #endif /* SSS_NSS_IDMAP_H_ */