"Fossies" - the Fresh Open Source Software Archive

Member "sssd-2.2.3/src/providers/ad/ad_pac.h" (30 Nov 2019, 3373 Bytes) of package /linux/misc/sssd-2.2.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ad_pac.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2     SSSD
    3 
    4     Authors:
    5         Sumit Bose <sbose@redhat.com>
    6 
    7     Copyright (C) 2016 Red Hat
    8 
    9     This program is free software; you can redistribute it and/or modify
   10     it under the terms of the GNU General Public License as published by
   11     the Free Software Foundation; either version 3 of the License, or
   12     (at your option) any later version.
   13 
   14     This program is distributed in the hope that it will be useful,
   15     but WITHOUT ANY WARRANTY; without even the implied warranty of
   16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17     GNU General Public License for more details.
   18 
   19     You should have received a copy of the GNU General Public License
   20     along with this program.  If not, see <http://www.gnu.org/licenses/>.
   21 */
   22 
   23 #ifndef AD_PAC_H_
   24 #define AD_PAC_H_
   25 
   26 #include <stdbool.h>
   27 #include <stdint.h>
   28 /* ldb_val is defined as datablob in the Samba header files data_blob.h which
   29  * is included via ndr.h -> samba_util.h -> data_blob.h.
   30  * To allow proper type checking we have to make sure to keep the original
   31  * definition from ldb.h */
   32 #ifdef ldb_val
   33 #error Please make sure to include ad_pac.h before ldb.h
   34 #endif
   35 #include <ndr.h>
   36 #include <gen_ndr/krb5pac.h>
   37 #include <gen_ndr/ndr_krb5pac.h>
   38 #undef ldb_val
   39 
   40 #include "util/util.h"
   41 #include "providers/ldap/ldap_common.h"
   42 
   43 errno_t check_if_pac_is_available(TALLOC_CTX *mem_ctx,
   44                                   struct sss_domain_info *dom,
   45                                   struct dp_id_data *ar,
   46                                   struct ldb_message **_msg);
   47 
   48 errno_t ad_get_data_from_pac(TALLOC_CTX *mem_ctx,
   49                              uint8_t *pac_blob, size_t pac_len,
   50                              struct PAC_LOGON_INFO **_logon_info);
   51 
   52 errno_t ad_get_sids_from_pac(TALLOC_CTX *mem_ctx,
   53                              struct sss_idmap_ctx *idmap_ctx,
   54                              struct PAC_LOGON_INFO *logon_info,
   55                              char **_user_sid_str,
   56                              char **_primary_group_sid_str,
   57                              size_t *_num_sids,
   58                              char *** _sid_list);
   59 
   60 errno_t ad_get_pac_data_from_user_entry(TALLOC_CTX *mem_ctx,
   61                                         struct ldb_message *msg,
   62                                         struct sss_idmap_ctx *idmap_ctx,
   63                                         char **username,
   64                                         char **user_sid,
   65                                         char **primary_group_sid,
   66                                         size_t *num_sids,
   67                                         char ***group_sids);
   68 
   69 struct tevent_req *ad_handle_pac_initgr_send(TALLOC_CTX *mem_ctx,
   70                                              struct be_ctx *be_ctx,
   71                                              struct dp_id_data *ar,
   72                                              struct sdap_id_ctx *id_ctx,
   73                                              struct sdap_domain *sdom,
   74                                              struct sdap_id_conn_ctx *conn,
   75                                              bool noexist_delete,
   76                                              struct ldb_message *msg);
   77 
   78 errno_t ad_handle_pac_initgr_recv(struct tevent_req *req,
   79                                   int *_dp_error, const char **_err,
   80                                   int *sdap_ret);
   81 
   82 #endif /* AD_PAC_H_ */