Print this page
12236 getmembers_DN doesn't properly handle errors from __ns_ldap_dn2uid
12240 nss_ldap does not properly look up group members by distinguished name

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libsldap/common/ns_internal.h
          +++ new/usr/src/lib/libsldap/common/ns_internal.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
       25 + * Copyright 2020 Joyent, Inc.
  25   26   */
  26   27  
  27   28  
  28   29  #ifndef _NS_INTERNAL_H
  29   30  #define _NS_INTERNAL_H
  30   31  
  31   32  #ifdef __cplusplus
  32   33  extern "C" {
  33   34  #endif
  34   35  
↓ open down ↓ 25 lines elided ↑ open up ↑
  60   61          "Do not edit this file manually; your changes will be lost." \
  61   62          "Please use ldapclient (1M) instead."
  62   63  #define MAXPORTNUMBER           65535
  63   64  #define MAXPORTNUMBER_STR       "65535"
  64   65  #define CREDFILE                0
  65   66  #define CONFIGFILE              1
  66   67  #define UIDNUMFILTER            "(&(objectclass=posixAccount)(uidnumber=%s))"
  67   68  #define UIDNUMFILTER_SSD        "(&(%%s)(uidnumber=%s))"
  68   69  #define UIDFILTER               "(&(objectclass=posixAccount)(uid=%s))"
  69   70  #define UIDFILTER_SSD           "(&(%%s)(uid=%s))"
  70      -#define UIDDNFILTER     "(&(objectclass=posixAccount)(distinguishedName=%s))"
  71      -#define UIDDNFILTER_SSD         "(&(%%s)(distinguishedName=%s))"
       71 +#define UIDDNFILTER             "(objectclass=posixAccount)"
  72   72  
  73   73  #define HOSTFILTER              "(&(objectclass=ipHost)(cn=%s))"
  74   74  #define HOSTFILTER_SSD          "(&(%%s)(cn=%s))"
  75   75  
  76   76  #define SIMPLEPAGECTRLFLAG      1
  77   77  #define VLVCTRLFLAG             2
  78   78  
  79   79  #define LISTPAGESIZE            1000
  80   80  #define ENUMPAGESIZE            100
  81   81  
↓ open down ↓ 676 lines elided ↑ open up ↑
 758  758  char *__s_get_searchref_name(ns_config_t *ptr, SearchRef_t type);
 759  759  char *__s_get_shadowupdate_name(enableShadowUpdate_t type);
 760  760  char *__s_get_hostcertpath(void);
 761  761  void __s_api_free_sessionPool();
 762  762  int __s_api_requestServer(const char *request, const char *server,
 763  763          ns_server_info_t *ret, ns_ldap_error_t **error,  const char *addrType);
 764  764  
 765  765  
 766  766  /* ************ internal sldap-api functions *********** */
 767  767  void    __ns_ldap_freeEntry(ns_ldap_entry_t *ep);
      768 +void    __ns_ldap_freeASearchDesc(ns_ldap_search_desc_t *);
 768  769  void    __s_api_split_key_value(char *buffer, char **name, char **value);
 769  770  int     __s_api_printResult(ns_ldap_result_t *);
 770  771  int     __s_api_getSearchScope(int *, ns_ldap_error_t **);
 771  772  int     __s_api_getDNs(char ***, const char *,
 772  773          ns_ldap_error_t **);
 773  774  int     __s_api_get_search_DNs_v1(char ***, const char *,
 774  775          ns_ldap_error_t **);
 775  776  int     __s_api_getConnection(const char *, const int,
 776  777          const ns_cred_t *, int *,
 777  778          Connection **, ns_ldap_error_t **, int, int, ns_conn_user_t *);
↓ open down ↓ 71 lines elided ↑ open up ↑
 849  850  ns_ldap_error_t *__ns_ldap_LoadConfiguration();
 850  851  ns_ldap_error_t *__ns_ldap_LoadDoorInfo(LineBuf *configinfo, char *domainname,
 851  852                                  ns_config_t *new, int cred_only);
 852  853  ns_ldap_error_t *__ns_ldap_DumpConfiguration(char *filename);
 853  854  ns_ldap_error_t *__ns_ldap_DumpLdif(char *filename);
 854  855  int             __ns_ldap_cache_ping();
 855  856  ns_ldap_error_t *__ns_ldap_print_config(int);
 856  857  void            __ns_ldap_default_config();
 857  858  int             __ns_ldap_download(const char *, char *, char *,
 858  859                                  ns_ldap_error_t **);
 859      -int
 860      -__ns_ldap_check_dns_preq(int foreground,
 861      -                int mode_verbose,
 862      -                int mode_quiet,
 863      -                const char *fname,
 864      -                ns_ldap_self_gssapi_config_t config,
 865      -                ns_ldap_error_t **errpp);
 866      -int
 867      -__ns_ldap_check_gssapi_preq(int foreground,
 868      -                int mode_verbose,
 869      -                int mode_quiet,
 870      -                ns_ldap_self_gssapi_config_t config,
 871      -                ns_ldap_error_t **errpp);
 872      -int
 873      -__ns_ldap_check_all_preq(int foreground,
 874      -                int mode_verbose,
 875      -                int mode_quiet,
 876      -                ns_ldap_self_gssapi_config_t config,
 877      -                ns_ldap_error_t **errpp);
      860 +int __ns_ldap_check_dns_preq(int foreground, int mode_verbose, int mode_quiet,
      861 +    const char *fname, ns_ldap_self_gssapi_config_t config,
      862 +    ns_ldap_error_t **errpp);
 878  863  
      864 +int __ns_ldap_check_gssapi_preq(int foreground, int mode_verbose,
      865 +    int mode_quiet, ns_ldap_self_gssapi_config_t config,
      866 +    ns_ldap_error_t **errpp);
      867 +
      868 +int __ns_ldap_check_all_preq(int foreground, int mode_verbose, int mode_quiet,
      869 +    ns_ldap_self_gssapi_config_t config, ns_ldap_error_t **errpp);
      870 +
 879  871  /* internal un-exposed APIs */
 880  872  ns_cred_t       *__ns_ldap_dupAuth(const ns_cred_t *authp);
 881  873  boolean_t       __s_api_is_auth_matched(const ns_cred_t *auth1,
 882  874                      const ns_cred_t *auth2);
 883  875  int             __s_api_get_SSD_from_SSDtoUse_service(const char *service,
 884  876                          ns_ldap_search_desc_t ***SSDlist,
 885  877                          ns_ldap_error_t **errorp);
 886  878  int             __s_api_prepend_automountmapname(const char *service,
 887  879                          ns_ldap_search_desc_t ***SSDlist,
 888  880                          ns_ldap_error_t ** errorp);
↓ open down ↓ 65 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX