"Fossies" - the Fresh Open Source Software Archive

Member "sssd-2.2.3/src/util/sss_ldap.h" (30 Nov 2019, 3305 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 "sss_ldap.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2     Authors:
    3         Sumit Bose <sbose@redhat.com>
    4 
    5     Copyright (C) 2009 Red Hat
    6 
    7     This program is free software; you can redistribute it and/or modify
    8     it under the terms of the GNU General Public License as published by
    9     the Free Software Foundation; either version 3 of the License, or
   10     (at your option) any later version.
   11 
   12     This program is distributed in the hope that it will be useful,
   13     but WITHOUT ANY WARRANTY; without even the implied warranty of
   14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15     GNU General Public License for more details.
   16 
   17     You should have received a copy of the GNU General Public License
   18     along with this program.  If not, see <http://www.gnu.org/licenses/>.
   19 */
   20 
   21 #ifndef __SSS_LDAP_H__
   22 #define __SSS_LDAP_H__
   23 
   24 #include <sys/types.h>
   25 #include <sys/socket.h>
   26 #include <ldap.h>
   27 #include <talloc.h>
   28 #include <tevent.h>
   29 
   30 #ifndef LDAP_CONTROL_PWEXPIRED
   31 #define LDAP_CONTROL_PWEXPIRED "2.16.840.1.113730.3.4.4"
   32 #endif
   33 
   34 #ifndef LDAP_CONTROL_PWEXPIRING
   35 #define LDAP_CONTROL_PWEXPIRING "2.16.840.1.113730.3.4.5"
   36 #endif
   37 
   38 #ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE
   39 #define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_DIAGNOSTIC_MESSAGE
   40 #else
   41 #ifdef LDAP_OPT_ERROR_STRING
   42 #define SDAP_DIAGNOSTIC_MESSAGE LDAP_OPT_ERROR_STRING
   43 #else
   44 #error No extended diagnostic message available
   45 #endif
   46 #endif
   47 
   48 const char* sss_ldap_err2string(int err);
   49 
   50 int sss_ldap_get_diagnostic_msg(TALLOC_CTX *mem_ctx,
   51                                 LDAP *ld,
   52                                 char **_errmsg);
   53 
   54 #ifndef LDAP_SERVER_ASQ_OID
   55 #define LDAP_SERVER_ASQ_OID "1.2.840.113556.1.4.1504"
   56 #endif /* LDAP_SERVER_ASQ_OID */
   57 
   58 #ifndef LDAP_SERVER_SD_OID
   59 #define LDAP_SERVER_SD_OID "1.2.840.113556.1.4.801"
   60 #endif /* LDAP_SERVER_SD_OID */
   61 
   62 
   63 /*
   64  * The following four flags specify which security descriptor parts to retrieve
   65  * during sd_search (see  http://msdn.microsoft.com/en-us/library/aa366987.aspx)
   66  */
   67 #define SECINFO_OWNER ( 0x00000001 )
   68 #define SECINFO_GROUP ( 0x00000002 )
   69 #define SECINFO_DACL ( 0x00000004 )
   70 #define SECINFO_SACL ( 0x00000008 )
   71 
   72 int sss_ldap_control_create(const char *oid, int iscritical,
   73                             struct berval *value, int dupval,
   74                             LDAPControl **ctrlp);
   75 
   76 struct tevent_req *sss_ldap_init_send(TALLOC_CTX *mem_ctx,
   77                                       struct tevent_context *ev,
   78                                       const char *uri,
   79                                       struct sockaddr_storage *addr,
   80                                       int addr_len, int timeout);
   81 
   82 int sss_ldap_init_recv(struct tevent_req *req, LDAP **ldap, int *sd);
   83 
   84 struct sdap_options;
   85 struct sdap_search_base;
   86 bool sss_ldap_dn_in_search_bases(TALLOC_CTX *mem_ctx,
   87                                  const char *dn,
   88                                  struct sdap_search_base **search_bases,
   89                                  char **_filter);
   90 
   91 bool sss_ldap_dn_in_search_bases_len(TALLOC_CTX *mem_ctx,
   92                                      const char *dn,
   93                                      struct sdap_search_base **search_bases,
   94                                      char **_filter,
   95                                      int *_match_len);
   96 
   97 char *sss_ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t flags);
   98 
   99 #endif /* __SSS_LDAP_H__ */